Showing posts with label type. Show all posts
Showing posts with label type. Show all posts

Sunday, March 25, 2012

Alerts Not Working

I defined an Alert in Enterprise Manager for Severity 19 - Fatal Error In Resource. The alert is enabled, the type is "sql server event alert" and the alert is defined against a specific database. SQLSERVERAGENT and SQL Mail session are both started. I test the alert using the following statement in the specified database.

raiserror (50001,19,1) with log

A message is placed in the SQL Server log, however no alert is fired. The alert history indicates the alert has never occurred. What am I missing?

Thanks, DaveHere's an update.

I refreshed EM earlier in the day and still saw no history. This time I disconnected and reconnected the instance. For some reason I have to do this in certain situations. After reconnecting I noticed a history existed under a demo for Severity 19. I didn't realize the demos were enabled. I just disabled the demo alert and all appears to be working.

Thanks, Dave|||all the demos are enabled for each of the severity levels if you are defining errors soley based on severity they will as you found out hit first
also ...
[BOL] Says

Error messages with a severity level of 19 or higher stop the current batch. Errors messages with a severity level of 20 or higher are considered fatal errors and terminate the client connection. Errors messages in this range may affect all of the processes in the database, and may indicate that a database or object is damaged. Error messages with a severity level from 19 through 25 are written to the error log.

you might want to consider refining your alert to fire on the event id's that are acutally being thrown..
just a suggest

by the way good debugging on your part.|||The error message I'm seeing is being generated by a vendor's software package.

Error: 1204, Severity: 19, State: 1
The SQL Server cannot obtain a LOCK resource at this time. Rerun your statement when there are fewer active users or ask the system administrator to check the SQL Server lock and memory configuration..

There are multiple performance problems associated with this application. I suspect the error above is connected to many of the problems. I don't believe the database is damaged. I'm guessing it's just a matter of poorly written code. Now I have to figure out how to setup Profiler to look for this error.

Thanks, Dave|||http://www.sql-server-performance.com/deadlocks.asp to prevent deadlocks and error defined.

Ensure to run the statement in batches if it is affecting large number of rows. Another option is to specify a hint like table or page lock so that the number of locks can be reduced.

What are lock settings defined at SQL server?|||The lock setting is still at the default of 0. I'm not sure what code is causing this problem to occur. I need to setup Profiler to trap the logic. I just setup Profiler to look for Severity 19, but the filter does not appear to be working. I'm still seeing all server activity. Am I missing something?

- Filters
- Severity
- Equals 19

Dave|||Oh, then follow this link http://www.sql-server-performance.com/blocking.asp to monitor the blocking and capture the trace.|||Not missing much about profiler. Any null value is returned as a valid hit. You may want to just run profiler to a table with the SQL statement complete, RPC complete, and some of the error events getting logged. Once you have a pile of data in a table, you can run queries off of that for severity 19, then try to work back via the identity column to figure out what statement did it.|||Can you tell Profiler to ignore NULL?

I'll give your suggestion a try.

Thankssql

Thursday, March 22, 2012

Alert type not available

I've installed a new instance of SQL Server 2000 and applied SP3a.
I want to create a new SQL Server performance condition alert from the
Enterprise Manager, but this type of alert is not available. Only the type
SQL Server event alert is available. How can I make the performance condition
alerts available?
Wilbert,
Are your performance counters missing also in perfmon? If so, this
article should fix your problem.
PRB: SQL Performance Monitor Counters Missing
http://support.microsoft.com/?id=227662
Mark Allison, SQL Server MVP
http://www.markallison.co.uk
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Wilbert wrote:
> I've installed a new instance of SQL Server 2000 and applied SP3a.
> I want to create a new SQL Server performance condition alert from the
> Enterprise Manager, but this type of alert is not available. Only the type
> SQL Server event alert is available. How can I make the performance condition
> alerts available?
|||Hello Mark,
The problem seems to be another instance of SQL on the same machine that is
used for Veritas. In this instance, the performance counters are available.
Is there a way to get the counters available for the second instance aswell?
Regards, Wilbert
"Mark Allison" wrote:

> Wilbert,
> Are your performance counters missing also in perfmon? If so, this
> article should fix your problem.
> PRB: SQL Performance Monitor Counters Missing
> http://support.microsoft.com/?id=227662
> --
> Mark Allison, SQL Server MVP
> http://www.markallison.co.uk
> Looking for a SQL Server replication book?
> http://www.nwsu.com/0974973602.html
>
> Wilbert wrote:
>

Alert type not available

I've installed a new instance of SQL Server 2000 and applied SP3a.
I want to create a new SQL Server performance condition alert from the
Enterprise Manager, but this type of alert is not available. Only the type
SQL Server event alert is available. How can I make the performance conditio
n
alerts available?Wilbert,
Are your performance counters missing also in perfmon? If so, this
article should fix your problem.
PRB: SQL Performance Monitor Counters Missing
http://support.microsoft.com/?id=227662
Mark Allison, SQL Server MVP
http://www.markallison.co.uk
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Wilbert wrote:
> I've installed a new instance of SQL Server 2000 and applied SP3a.
> I want to create a new SQL Server performance condition alert from the
> Enterprise Manager, but this type of alert is not available. Only the type
> SQL Server event alert is available. How can I make the performance condit
ion
> alerts available?|||Hello Mark,
The problem seems to be another instance of SQL on the same machine that is
used for Veritas. In this instance, the performance counters are available.
Is there a way to get the counters available for the second instance aswell?
Regards, Wilbert
"Mark Allison" wrote:

> Wilbert,
> Are your performance counters missing also in perfmon? If so, this
> article should fix your problem.
> PRB: SQL Performance Monitor Counters Missing
> http://support.microsoft.com/?id=227662
> --
> Mark Allison, SQL Server MVP
> http://www.markallison.co.uk
> Looking for a SQL Server replication book?
> http://www.nwsu.com/0974973602.html
>
> Wilbert wrote:
>sql

Alert type not available

I've installed a new instance of SQL Server 2000 and applied SP3a.
I want to create a new SQL Server performance condition alert from the
Enterprise Manager, but this type of alert is not available. Only the type
SQL Server event alert is available. How can I make the performance condition
alerts available?Wilbert,
Are your performance counters missing also in perfmon? If so, this
article should fix your problem.
PRB: SQL Performance Monitor Counters Missing
http://support.microsoft.com/?id=227662
--
Mark Allison, SQL Server MVP
http://www.markallison.co.uk
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Wilbert wrote:
> I've installed a new instance of SQL Server 2000 and applied SP3a.
> I want to create a new SQL Server performance condition alert from the
> Enterprise Manager, but this type of alert is not available. Only the type
> SQL Server event alert is available. How can I make the performance condition
> alerts available?|||Hello Mark,
The problem seems to be another instance of SQL on the same machine that is
used for Veritas. In this instance, the performance counters are available.
Is there a way to get the counters available for the second instance aswell?
Regards, Wilbert
"Mark Allison" wrote:
> Wilbert,
> Are your performance counters missing also in perfmon? If so, this
> article should fix your problem.
> PRB: SQL Performance Monitor Counters Missing
> http://support.microsoft.com/?id=227662
> --
> Mark Allison, SQL Server MVP
> http://www.markallison.co.uk
> Looking for a SQL Server replication book?
> http://www.nwsu.com/0974973602.html
>
> Wilbert wrote:
> > I've installed a new instance of SQL Server 2000 and applied SP3a.
> > I want to create a new SQL Server performance condition alert from the
> > Enterprise Manager, but this type of alert is not available. Only the type
> > SQL Server event alert is available. How can I make the performance condition
> > alerts available?
>

Alert on deadlock

I have created an SQL Agent Alert which should notify me whenever
a deadlock is occured on sql server. The following are the details:

Type : Performance Condition Alert
Object : SQLServerLocks
Counter : Number of deadlocks/sec
Instance: Database
Alert : If counter value rises above 0

I got deadlock situation a couple of times on server but i have never received any notification. It seems this settings doenot work. Pls. advise!

Thanks

Is the SQL Agent definitely running ?

If so, "Test" that that the SQL Agent can create a mail session. Right click SQL Server Agent, choose Properties, click the test button.

|||yes. Nothing wrong with sql agent. as such i get other alerts but not this one.|||Is the occurrence count still zero ?
Under the Response tab try reducing the "delay between responses". I recall reading somewhere that if at the time SQL samples the counters there may well not be a deadlock. i.e. the delay between responses is sufficiently high for the condition to disappear before SQL samples the data.

Alert is not Firing

I have configured the alert of
Type SQL Server event alert
for the severity 016-Miscellaneous user Error
DB is all Database
In response tab, I have confiured the job.
I have created one procedure in pubs dB like
create proc test
as
begin
raiserror('going to configure ',16,1)
end
After that I have executed this Stored Procedure.
exec test.
My understanding is that now the alert should be fired and then it
should execute a job. But it is not at all happening. I.e The alert is
not at all firing.
Kindly give some solution.
Microsoft SQL Server 2000 - 8.00.2039 (Intel X86) May 3 2005
23:18:38 Copyright (c) 1988-2003 Microsoft Corporation Developer
Edition on Windows NT 5.1 (Build 2600: Service Pack 2)
Thanks and regards
Praveen.AAlert firing is based on the eventlog. Make sure you write to eventlog. Use either WITH LOG for
RAISERROR or (preferably) design your own messages (sp_addmessage) and specify there to always write
to eventlog.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Praveen" <apveen@.gmail.com> wrote in message
news:1127218958.512008.318710@.g14g2000cwa.googlegroups.com...
>I have configured the alert of
> Type SQL Server event alert
> for the severity 016-Miscellaneous user Error
> DB is all Database
> In response tab, I have confiured the job.
> I have created one procedure in pubs dB like
> create proc test
> as
> begin
> raiserror('going to configure ',16,1)
> end
> After that I have executed this Stored Procedure.
> exec test.
> My understanding is that now the alert should be fired and then it
> should execute a job. But it is not at all happening. I.e The alert is
> not at all firing.
> Kindly give some solution.
> Microsoft SQL Server 2000 - 8.00.2039 (Intel X86) May 3 2005
> 23:18:38 Copyright (c) 1988-2003 Microsoft Corporation Developer
> Edition on Windows NT 5.1 (Build 2600: Service Pack 2)
>
> Thanks and regards
> Praveen.A
>|||Thanks a lot Tibor.
I got a solution. Alert is firing now.

Tuesday, March 20, 2012

Alert for DeadLock

I am trying to create an alert to monitor deadlocks with following
specification.
Name = "Deadlock(s) detected . . ."
Type = "SQL Server performance condition alert.
Object = "SQL Server:Locks"
Counter = "Number of Deadlocks/sec"
Instance = "Database"
Alert if counter = "becomes equal to"
Value = "1"
Once the alert is created, I execute the deadlock script. But found that the
counter in alert is not increasing.
Can someone put some light on this? Am I missing something?why dont you just use SQL servers Deadlock monitoring?
Check out trace flags 1204, 1205
Immy
"ravi lobo" <ravilobo@.discussions.microsoft.com> wrote in message
news:0849692C-24D2-4424-BA4D-A49F0BF22F6C@.microsoft.com...
>I am trying to create an alert to monitor deadlocks with following
> specification.
> Name = "Deadlock(s) detected . . ."
> Type = "SQL Server performance condition alert.
> Object = "SQL Server:Locks"
> Counter = "Number of Deadlocks/sec"
> Instance = "Database"
> Alert if counter = "becomes equal to"
> Value = "1"
> Once the alert is created, I execute the deadlock script. But found that
> the
> counter in alert is not increasing.
> Can someone put some light on this? Am I missing something?|||I want a NOTIFICATION when ever dead lock happens.|||I would still use the inbuilt function from MS!
If you want to continue with your own method, you'll need to post your DDL
and SQL statements so we can offer some advice.
Immy
"ravi lobo" <ravilobo@.discussions.microsoft.com> wrote in message
news:75F4E5FD-0B99-47E6-90A3-EA887A4FD9FB@.microsoft.com...
>I want a NOTIFICATION when ever dead lock happens.|||[vbcol=seagreen]
How this works?|||See my previous post re: trace flags! :-)
"ravi lobo" <ravilobo@.discussions.microsoft.com> wrote in message
news:C5CB693A-CB0E-4E43-B743-0C51115361D8@.microsoft.com...
>
> How this works?
>
>

Alert for DeadLock

I am trying to create an alert to monitor deadlocks with following
specification.
Name = "Deadlock(s) detected . . ."
Type = "SQL Server performance condition alert.
Object = "SQL Server:Locks"
Counter = "Number of Deadlocks/sec"
Instance = "Database"
Alert if counter = "becomes equal to"
Value = "1"
Once the alert is created, I execute the deadlock script. But found that the
counter in alert is not increasing.
Can someone put some light on this? Am I missing something?why dont you just use SQL servers Deadlock monitoring?
Check out trace flags 1204, 1205
Immy
"ravi lobo" <ravilobo@.discussions.microsoft.com> wrote in message
news:0849692C-24D2-4424-BA4D-A49F0BF22F6C@.microsoft.com...
>I am trying to create an alert to monitor deadlocks with following
> specification.
> Name = "Deadlock(s) detected . . ."
> Type = "SQL Server performance condition alert.
> Object = "SQL Server:Locks"
> Counter = "Number of Deadlocks/sec"
> Instance = "Database"
> Alert if counter = "becomes equal to"
> Value = "1"
> Once the alert is created, I execute the deadlock script. But found that
> the
> counter in alert is not increasing.
> Can someone put some light on this? Am I missing something?|||I want a NOTIFICATION when ever dead lock happens.|||I would still use the inbuilt function from MS!
If you want to continue with your own method, you'll need to post your DDL
and SQL statements so we can offer some advice.
Immy
"ravi lobo" <ravilobo@.discussions.microsoft.com> wrote in message
news:75F4E5FD-0B99-47E6-90A3-EA887A4FD9FB@.microsoft.com...
>I want a NOTIFICATION when ever dead lock happens.|||>> I would still use the inbuilt function from MS!
How this works?|||See my previous post re: trace flags! :-)
"ravi lobo" <ravilobo@.discussions.microsoft.com> wrote in message
news:C5CB693A-CB0E-4E43-B743-0C51115361D8@.microsoft.com...
>> I would still use the inbuilt function from MS!
> How this works?
>
>sql

Sunday, March 11, 2012

aggregates and type conversion

Hello,
I have a field of type string which I know will either hold a double value or null. I wish to sum the value of this field and mulitply the result by -1 to give a negative number, but it's proving really difficult.
My first problem is that if I modify my field to use CDbl I get an error when it runs, along the lines of "Field contains a direct or indirect reference to itself..."
So I have to get around it by creating a separate field with a different name, like
myFieldDbl and setting it's formula to = Cdbl(Fields!MyField.Value).
Why is that then ?
My next problem is that when I multiply by -1
e.g. =Sum(Fields!MyFieldDbl.Value * -1),
it gives me this error :
"The value expression for the textbox â'textbox19â' uses an aggregate function on data of varying data types".
To get around this I have to multiply by -1.0 instead ! As if there's a difference !!!
Type conversion in Reporting services is diabolical. I can't even use the format property unless I explicitly declare my field to be a particluar type first, even though I could happily use format$(myField,"C") in the Value property with any data type.
Can I expect MS might have a look at thses issues in time for the next service pack?Note: It is up to the data provider (e.g. managed SQL provider) how it
translates database types into .NET datatypes. Generally, you can determine
the runtime datatype of fields by temporarily adding a textbox to the report
which shows the runtime datatype:
=First(Fields!SomeFieldName.Value, "DataSetName").GetType.ToString
I assume that your field is actually a System.Decimal rather than a
System.Double as you indicated. An expression like this should work for you:
= -1 * Sum( iif(IsNothing(Fields!MyFieldDbl.Value), 0.0,
CDbl(Fields!MyFieldDbl.Value)))
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"Mike Salway" <MikeSalway@.discussions.microsoft.com> wrote in message
news:B90D6631-A0D2-4F53-9C69-A06366ADA6C7@.microsoft.com...
> Hello,
> I have a field of type string which I know will either hold a double value
or null. I wish to sum the value of this field and mulitply the result
by -1 to give a negative number, but it's proving really difficult.
> My first problem is that if I modify my field to use CDbl I get an error
when it runs, along the lines of "Field contains a direct or indirect
reference to itself..."
> So I have to get around it by creating a separate field with a different
name, like
> myFieldDbl and setting it's formula to = Cdbl(Fields!MyField.Value).
> Why is that then ?
> My next problem is that when I multiply by -1
> e.g. =Sum(Fields!MyFieldDbl.Value * -1),
> it gives me this error :
> "The value expression for the textbox 'textbox19' uses an aggregate
function on data of varying data types".
> To get around this I have to multiply by -1.0 instead ! As if there's a
difference !!!
> Type conversion in Reporting services is diabolical. I can't even use the
format property unless I explicitly declare my field to be a particluar type
first, even though I could happily use format$(myField,"C") in the Value
property with any data type.
> Can I expect MS might have a look at thses issues in time for the next
service pack?

Thursday, March 8, 2012

Aggregate on XML Data Type

Is there a way to aggreate data on the XML data type? I have found some
examples using XQuery, but they all invlove using the Let statement in FLWOR
which is not supported in SQL Server 2005. Are there any examples out there
that shows how to aggregate data on the XML data type?
Thanks
From the BOL:
SELECT ProductModelID,
Name,
Instructions.value('declare namespace
AWMI="http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/ProductModelManuInstructions";
count(/AWMI:root/AWMI:Location)', 'int' ) as WorkCtrCount
FROM Production.ProductModel
WHERE ProductModelID=7
Tom
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinpub.com
"Robert" <Robert@.discussions.microsoft.com> wrote in message
news:DA76A4FD-57CB-455B-81B9-FD9EDD0A69E7@.microsoft.com...
Is there a way to aggreate data on the XML data type? I have found some
examples using XQuery, but they all invlove using the Let statement in FLWOR
which is not supported in SQL Server 2005. Are there any examples out there
that shows how to aggregate data on the XML data type?
Thanks
|||Robert,
It is possible that let is not needed in the examples you are referring to.
Can you supply one of these examples for further examination?
Thanks,
Galex Yen
"Robert" wrote:

> Is there a way to aggreate data on the XML data type? I have found some
> examples using XQuery, but they all invlove using the Let statement in FLWOR
> which is not supported in SQL Server 2005. Are there any examples out there
> that shows how to aggregate data on the XML data type?
> Thanks

Aggregate on XML Data Type

Is there a way to aggreate data on the XML data type? I have found some
examples using XQuery, but they all invlove using the Let statement in FLWOR
which is not supported in SQL Server 2005. Are there any examples out there
that shows how to aggregate data on the XML data type?
ThanksFrom the BOL:
SELECT ProductModelID,
Name,
Instructions.value('declare namespace
AWMI="http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/Product
ModelManuInstructions";
count(/AWMI:root/AWMI:Location)', 'int' ) as WorkCtrCount
FROM Production.ProductModel
WHERE ProductModelID=7
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinpub.com
"Robert" <Robert@.discussions.microsoft.com> wrote in message
news:DA76A4FD-57CB-455B-81B9-FD9EDD0A69E7@.microsoft.com...
Is there a way to aggreate data on the XML data type? I have found some
examples using XQuery, but they all invlove using the Let statement in FLWOR
which is not supported in SQL Server 2005. Are there any examples out there
that shows how to aggregate data on the XML data type?
Thanks|||Robert,
It is possible that let is not needed in the examples you are referring to.
Can you supply one of these examples for further examination?
Thanks,
Galex Yen
"Robert" wrote:

> Is there a way to aggreate data on the XML data type? I have found some
> examples using XQuery, but they all invlove using the Let statement in FLW
OR
> which is not supported in SQL Server 2005. Are there any examples out ther
e
> that shows how to aggregate data on the XML data type?
> Thanks

Friday, February 24, 2012

After upgrade to SQL 2005 getting CONVERT error.

I have a query that was working prior to an upgrade to SQL 2005 from SQL 2000. Now, I am getting an "Error converting data type varchar to numeric." error message. It appears to be related to the order of operations of the "WHERE" clause.

Here is the partial WHERE clause:

AND ISNUMERIC(value) = 1
AND CONVERT(numeric(20,2), value) < 0
AND type IN (...

The value field in the database table is defined as a varchar and will contain mixed datatypes. That is why the "ISNUMERIC" line is in the where clause.

Interestingly, if I change the qualified values in the "IN" line to a single value, it works fine. As soon as I introduce a second value within the "IN" line, I get the error message.

Please see below thread for more details:

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=768927&SiteID=1

This is by design. You will have to either use CASE expression to perform conditional checks or modify your schema to use the correct data types for the data.

Monday, February 13, 2012

After Install, "Running sqlcmd -S Server\Instance" Fails

I'm trying to figure out how to set up SQL Express so I can start learning SQL. I've installed SQL Express, but when I type "sqlcmd -S Server\SQLExpress," I receive the following error:

Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\Documents and Settings\Username>sqlcmd -S Server\SQLExpress
HResult 0xFFFFFFFF, Level 16, State 1
SQL Network Interfaces: Error Locating Server/Instance Specified [xFFFFFFFF].
Sqlcmd: Error: Microsoft SQL Native Client : An error has occurred while establi
shing a connection to the server. When connecting to SQL Server 2005, this failu
re may be caused by the fact that under the default settings SQL Server does not
allow remote connections..
Sqlcmd: Error: Microsoft SQL Native Client : Login timeout expired.


Hi,

see the screencast on my site for eabling remote connections.

HTH, Jens K. Suessmeyer.

-
http://www.sqlserver2005.de
-

|||Thanks, but when I got to http://www.sqlserver2005.de/Screencast/Screencast.aspx?ScreencastId=1, nothing happened.

I've found how to enable remote connections in the KB. So I have to enable remote connections to access SQL Server on a local computer? Want I want to do is get some sort of IDE up to learn in. Thanks.|||The screencast is a flash file, so you will need to have flash installed on your computer.

If you navigate through the Surface Area configuration (presented in the program menu) > Services and connections, you can change the setting, make sure you restart the service afterwards.

HTH, Jens K. Suessmeyer.

http://www.sqlserver2005.de|||Thanks. I will point out that Flash is installed in my computer though, and about:plugins shows "Shockwave Flash." I've tested Flash on other sites, it pulls up fine.|||Not working. Using http://support.microsoft.com/kb/914277/en-us, I've tried enable remote connections, stopping, starting the Database engine, still get errors. Disabled remote connections, set the SQL Server Browser to automatic, stopped, started the Database engine, no change. Enable Remote Connections, first Named Pipes, then both TCP/IP and Names Pipes, in conjunction with the SQL Server Browser set to automatic, still get errors. So what do I do?|||*bump*|||So no one really knows how to install the thing? :-(|||

I was having the same issues until I changed the way I was trying to connect:

sqlcmd -S .\SQLEXPRESS.

This was after an install as part of visual studio 2005. I hope this helps.

After Install, "Running sqlcmd -S Server\Instance" Fails

I'm trying to figure out how to set up SQL Express so I can start learning SQL. I've installed SQL Express, but when I type "sqlcmd -S Server\SQLExpress," I receive the following error:

Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\Documents and Settings\Username>sqlcmd -S Server\SQLExpress
HResult 0xFFFFFFFF, Level 16, State 1
SQL Network Interfaces: Error Locating Server/Instance Specified [xFFFFFFFF].
Sqlcmd: Error: Microsoft SQL Native Client : An error has occurred while establi
shing a connection to the server. When connecting to SQL Server 2005, this failu
re may be caused by the fact that under the default settings SQL Server does not
allow remote connections..
Sqlcmd: Error: Microsoft SQL Native Client : Login timeout expired.


Hi,

see the screencast on my site for eabling remote connections.

HTH, Jens K. Suessmeyer.

-
http://www.sqlserver2005.de
-

|||Thanks, but when I got to http://www.sqlserver2005.de/Screencast/Screencast.aspx?ScreencastId=1, nothing happened.

I've found how to enable remote connections in the KB. So I have to enable remote connections to access SQL Server on a local computer? Want I want to do is get some sort of IDE up to learn in. Thanks.|||The screencast is a flash file, so you will need to have flash installed on your computer.

If you navigate through the Surface Area configuration (presented in the program menu) > Services and connections, you can change the setting, make sure you restart the service afterwards.

HTH, Jens K. Suessmeyer.

http://www.sqlserver2005.de|||Thanks. I will point out that Flash is installed in my computer though, and about:plugins shows "Shockwave Flash." I've tested Flash on other sites, it pulls up fine.|||Not working. Using http://support.microsoft.com/kb/914277/en-us, I've tried enable remote connections, stopping, starting the Database engine, still get errors. Disabled remote connections, set the SQL Server Browser to automatic, stopped, started the Database engine, no change. Enable Remote Connections, first Named Pipes, then both TCP/IP and Names Pipes, in conjunction with the SQL Server Browser set to automatic, still get errors. So what do I do?|||*bump*|||So no one really knows how to install the thing? :-(|||

I was having the same issues until I changed the way I was trying to connect:

sqlcmd -S .\SQLEXPRESS.

This was after an install as part of visual studio 2005. I hope this helps.

Thursday, February 9, 2012

Advise on column type

Hello,

In my web application I am listing steps of action:
STEP ACTION
10
10.1
10.2
10.9
10.10
10.20
30
30.1
etc

How should I set up my columns in my database? I tryed decimal but the problem is that 10.1 and 10.10 is in theory the same while in my case it is absolutely not. I also tryed nvarchar but does not sort correctly.
Should I create 2 int column, one for the main step and another one for the sub-step (one would contain the part before the "." and the other would contain the part after the ".")?

Thanks

you could use the 2 column approach, or you could still use varchar.

to get a numeric sort on string data, you need to carefully control the character positions

10 becomes a string 10.00
10.1 becomes 10.01 <-- notice the leading zero after the decimal

then when your sort the string data, you'd get a correct sort.

10.00
10.01
10.02
10.09
10.10
10.20
30.00
30.01

note: if your data might ever go to three places after the decimal, then you have to account for it now i.e.
10.000
10.001
10.010
10.100

So the question back to you is...will it be simpler for you to manage two columns and put the data back together as its sorted/presented, or will it be simpler for you to control the formatting of the string input?

PS: you could also still use the decimal format as long as you control the positions of each character value...

|||Thanks for the answer.
After carefully reviewing your suggestion, I think it would be easier for me to create 2 columns.
Now, would it be more efficient to put back the data together with my sql request ( do a cast of each int column into varchar and add the character "." between) or to format the string input in my code(C#) ?

Thanks|||

If you perform the string concatenation in Sql, then anyplace you pull the data, it will be formatted as you require.
If you perform the string concatenation in code (C#), then you'd need to repeat the "fixup" anytime you use the data.

In terms of raw cpu, i doubt that there is any statistically significant difference between the 2 choices - so i would choose the method you are most comfortable with.

|||

I finally decided to go with the varchar column.
However, I can not find any rule to automatically transform a 10.1 into a 10.01 or a 10.10 into a 10.1

Would you have a sample on how to do the transformation?

Thanks