Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase 123»»»

String length? Expand / Collapse
Author
Message
Posted Saturday, April 10, 2010 5:36 PM


SSCarpal Tunnel

SSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal Tunnel

Group: General Forum Members
Last Login: Today @ 6:06 AM
Points: 4,021, Visits: 5,318
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”
Post #901160
Posted Sunday, April 11, 2010 4:05 AM


SSCrazy Eights

SSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy Eights

Group: General Forum Members
Last Login: Friday, October 17, 2014 8:13 AM
Points: 9,926, Visits: 11,188
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
Post #901211
Posted Sunday, April 11, 2010 10:54 PM
SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Yesterday @ 7:02 PM
Points: 1,562, Visits: 2,614
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.
Post #901342
Posted Monday, April 12, 2010 12:26 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Yesterday @ 3:35 PM
Points: 6,043, Visits: 8,324
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
Post #901366
Posted Monday, April 12, 2010 1:18 AM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Tuesday, October 7, 2014 2:56 AM
Points: 2,842, Visits: 3,876
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
Post #901390
Posted Monday, April 12, 2010 1:56 AM
SSChasing Mays

SSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing Mays

Group: General Forum Members
Last Login: Today @ 1:44 AM
Points: 654, Visits: 510
I had the same initial thought - it cannot RETURN a varchar, as return values are always int. So, that rules out one wrong 'un !!
Post #901398
Posted Monday, April 12, 2010 2:34 AM


SSCrazy Eights

SSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy Eights

Group: General Forum Members
Last Login: Friday, October 17, 2014 8:13 AM
Points: 9,926, Visits: 11,188
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


  Post Attachments 
banana.jpg (358 views, 2.56 KB)
Post #901408
Posted Monday, April 12, 2010 3:42 AM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Wednesday, October 1, 2014 12:40 AM
Points: 2,063, Visits: 370
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!
Post #901437
Posted Monday, April 12, 2010 4:38 AM
Say Hey Kid

Say Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey Kid

Group: General Forum Members
Last Login: Wednesday, September 3, 2014 2:27 AM
Points: 682, Visits: 75
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?

Post #901453
Posted Monday, April 12, 2010 4:52 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Yesterday @ 3:35 PM
Points: 6,043, Visits: 8,324
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
Post #901461
« Prev Topic | Next Topic »

Add to briefcase 123»»»

Permissions Expand / Collapse