|
database
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Global Property in SQL?[SQL Server 2000] I need to somehow create a place (in memory?) that will store a value. This value needs to be visible to all sessions BUT - it needs to die if and when the session that created it dies. Because a session can die unexpectedly, I cannot rely on removing this "global property" programmatically. I cannot use a standard table, because if the session dies the value will remain... The closest I can come to is to create a temp object in tempdb and name that object the value of the "global property". This way others could query tempdb..sysobjects and get the value -- and the object would die when the session does. But I would hate to implement a hack like that. There has got to be a better way! BTW I have to do this in TSQL but if there an extended sp out ther that can help me....? Haven't found anything in BOL Sound just like what a global ##temptable does...?
-- Tibor Karaszi, SQL Server MVP http://www.karaszi.com/sqlserver/default.asp http://www.solidqualitylearning.com/ "rmg66" <rgwathney__xXx__primepro.com> wrote in message Here's one for you all....news:O%23CrMPziGHA.412@TK2MSFTNGP05.phx.gbl... [SQL Server 2000] I need to somehow create a place (in memory?) that will store a value. This value needs to be visible to all sessions BUT - it needs to die if and when the session that created it dies. Because a session can die unexpectedly, I cannot rely on removing this "global property" programmatically. I cannot use a standard table, because if the session dies the value will remain... The closest I can come to is to create a temp object in tempdb and name that object the value of the "global property". This way others could query tempdb..sysobjects and get the value -- and the object would die when the session does. But I would hate to implement a hack like that. There has got to be a better way! BTW I have to do this in TSQL but if there an extended sp out ther that can help me....? Haven't found anything in BOL See if this helps:
http://groups.google.com/group/microsoft.public.sqlserver.programming/msg/b3266f08b19b10bd -- Anith Thanks Anith,
Exactly what I was looking for. Robert Show quoteHide quote "Anith Sen" <an***@bizdatasolutions.com> wrote in message news:uUVZSlziGHA.1204@TK2MSFTNGP02.phx.gbl... > See if this helps: > http://groups.google.com/group/microsoft.public.sqlserver.programming/msg/b3266f08b19b10bd > > -- > Anith >
Other interesting topics
Default constraints in SQL Server 2000
How to construct a like compariso when there are special characts Using FileCopy to Copy Files via T-SQL Simple distributed transaction example does not work Calculated columns... How to Move Sql2000 DTS into Sql2005 legacy folder How to generate a table script in T-SQL? log shipping How to generate reports !!! some basic question ADO Connection terminates automatically after one hour |
|||||||||||||||||||||||