If using Citrix..you could purchase the RMS product.
But for a quick easy home-grown solution. One, obtain a shareware program named sleep.exe and now.exe
Then write a batch file with the following:
:Begin
now.exe >> c:\temp\logins.txt
quser >> c:\temp\logins.txt
sleep 60
goto begin...
Thanks Chris!! You got me going down the right path.
The EXEC works, but you must enclose it in () like the following.
exec ('select * from' + @my_var)
THANKS AGAIN!!!
It is possible to declare a variable, set it and then use it in a select statement like e.g:
declare @my_var varchar(31), @db varchar(31)
set @db = 'TEST'
set @my_var = @db + '..sysobjects'
select * from @my_var
I'm looking to query other database tables from inside a procedure.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.