|
|
|
Hall of Fame
       
Group: General Forum Members
Last Login: Today @ 8:31 AM
Points: 3,129,
Visits: 4,312
|
|
Comments posted to this topic are about the item String length?
____________________________________________ Space, the final frontier? not any more... All limits henceforth are self-imposed. “libera tute vulgaris ex”
|
|
|
|
|
SSChampion
        
Group: General Forum Members
Last Login: Today @ 5:10 PM
Points: 10,989,
Visits: 10,535
|
|
Very clever question - with some well-thought-out wrong answers 
First one to whinge about the explanation being 'incomplete' gets a banana 
Well done.
Paul White SQL Server MVP SQLblog.com @SQL_Kiwi
|
|
|
|
|
Ten Centuries
      
Group: General Forum Members
Last Login: Today @ 8:35 PM
Points: 1,371,
Visits: 2,301
|
|
haaaa..very good question.. fortunately I got it right. Wel, I would like to know...
1. When a query will timeout.? 2. When execution of something will run out of memory.?
thanks.
|
|
|
|
|
SSCertifiable
       
Group: General Forum Members
Last Login: Today @ 12:02 PM
Points: 5,243,
Visits: 7,055
|
|
Joy Smith San (4/11/2010) haaaa..very good question.. fortunately I got it right. Wel, I would like to know...
1. When a query will timeout.? 2. When execution of something will run out of memory.?
thanks.
I can answer the first question. From the server's point of view, queries never timeout. Timeout is a client setting. A client that supports it will send a cancel signal to the server (causng the transaction to be aborted and rolled back) when the set maximum execution time has passed.
Hugo Kornelis, SQL Server MVP Visit my SQL Server blog: http://sqlblog.com/blogs/hugo_kornelis
|
|
|
|
|
SSCrazy
      
Group: General Forum Members
Last Login: Today @ 6:12 AM
Points: 2,526,
Visits: 3,620
|
|
Paul White NZ (4/11/2010)
First one to whinge about the explanation being 'incomplete' gets a banana  Me want the banana *whingingabouttheexplanation*! :D
No results returned, as an infinite loop is invoked. But even if there was no infinite loop, no results would be returned, as the variable is not defined as OUTPUT.
But still, good question & explanation. More of that please!
Best Regards,
Chris Büttner
|
|
|
|
|
Mr or Mrs. 500
      
Group: General Forum Members
Last Login: 2 days ago @ 8:52 AM
Points: 508,
Visits: 388
|
|
| I had the same initial thought - it cannot RETURN a varchar, as return values are always int. So, that rules out one wrong 'un !!
|
|
|
|
|
SSChampion
        
Group: General Forum Members
Last Login: Today @ 5:10 PM
Points: 10,989,
Visits: 10,535
|
|
Christian Buettner-167247 (4/12/2010)
Paul White NZ (4/11/2010)
First one to whinge about the explanation being 'incomplete' gets a banana  Me want the banana *whingingabouttheexplanation*! :D No results returned, as an infinite loop is invoked. But even if there was no infinite loop, no results would be returned, as the variable is not defined as OUTPUT. But still, good question & explanation. More of that please! Excellent, Christian!
Paul White SQL Server MVP SQLblog.com @SQL_Kiwi
|
|
|
|
|
SSCommitted
      
Group: General Forum Members
Last Login: Friday, May 17, 2013 2:53 AM
Points: 1,529,
Visits: 359
|
|
thanks, was about to ask why am i not getting any output... luckily i saw the reply...
Christian Buettner-167247 (4/12/2010)
Paul White NZ (4/11/2010)
First one to whinge about the explanation being 'incomplete' gets a banana  Me want the banana *whingingabouttheexplanation*! :D No results returned, as an infinite loop is invoked. But even if there was no infinite loop, no results would be returned, as the variable is not defined as OUTPUT. But still, good question & explanation. More of that please!
|
|
|
|
|
SSC Veteran
      
Group: General Forum Members
Last Login: Friday, September 30, 2011 12:12 AM
Points: 213,
Visits: 42
|
|
So it will execute this forever? But obviously it won't execute forever, correct? Is there a time limit within SQL Server after which long running queries will be killed? How does that work? I mean some queries will take a long time to run and some others like the one in this example are faulty and will run forever....
So, in this case the app will get a SQLTimeout error? I guess my question is what is the sequence of events internally inside SQL Server and between SQL Server and (a .NET) app that finally result in a SQLTimeout error?
|
|
|
|
|
SSCertifiable
       
Group: General Forum Members
Last Login: Today @ 12:02 PM
Points: 5,243,
Visits: 7,055
|
|
sjeniferal (4/12/2010) So it will execute this forever? But obviously it won't execute forever, correct? Is there a time limit within SQL Server after which long running queries will be killed? How does that work? I mean some queries will take a long time to run and some others like the one in this example are faulty and will run forever....
So, in this case the app will get a SQLTimeout error? I guess my question is what is the sequence of events internally inside SQL Server and between SQL Server and (a .NET) app that finally result in a SQLTimeout error? Unless some client decides that the query has run long enough, it will continue forever. Or at least until the next server reboot.
If a client (or a human) decides that the query has run long enough, an "Attention" signal will be sent to the server or a DBA will kill the process. That will cause a rollback (which will be pretty fast in this case, since no modifications are made) and a message to be sent to the client.
Hugo Kornelis, SQL Server MVP Visit my SQL Server blog: http://sqlblog.com/blogs/hugo_kornelis
|
|
|
|