Global Variables and allways-running-in-background functions
-
Hi there! Can you help me how to define global variables in MS SQL 2000 or 2005 (@@...) and create a function that auto-start when MS SQL server start. I've searched a lot in google but i still can't found the answer :( Thanks in advance
I cant say any thing about 2005 but there is no global variable in 2000. Use a status table instead. Farhan Noor Qureshi if (this == this) thow this;
-
I cant say any thing about 2005 but there is no global variable in 2000. Use a status table instead. Farhan Noor Qureshi if (this == this) thow this;
-
Hi! Thanks to reply :) The global variables that i want to define are something like @@CONNECTIONS, @@FETCH_STATUS (and anything that begins with @@). Can you help me, please
Like I said, I am not aware of any user defined global variables in SQL 2k. But I suggest a solution. Say, you have a table with two columns, VarName, VarValue that acts as a list of name-value pair. You could write User defined functions that read-write data for each name-value. Here is an example.
VarName VarName ------------------- City London Country UK
Then you could write UDFs like GetCity(), SetCity(), GetCountry(), SetCountry() etc Farhan Noor Qureshi if (this == this) thow this; -- modified at 13:46 Tuesday 29th November, 2005