Hi
I am after a couple of bits of help:
1. I want to run a script, which is initiated manually, but it needs to check the Activity table firs to ensure that there are no users logged in, and if there are, then the script won't run and the user will be informed. I know how to find out if there are users in the database or not (using Select Count(*) from Activity where if count is >0 then a user is logged in), but I am not sure how to incorporate that into a conditional statement in teh SQL script.
2. While the script is running, I want to be able to stop any users logging in.
Thanks for any help.
Anna
I am after a couple of bits of help:
1. I want to run a script, which is initiated manually, but it needs to check the Activity table firs to ensure that there are no users logged in, and if there are, then the script won't run and the user will be informed. I know how to find out if there are users in the database or not (using Select Count(*) from Activity where if count is >0 then a user is logged in), but I am not sure how to incorporate that into a conditional statement in teh SQL script.
2. While the script is running, I want to be able to stop any users logging in.
Thanks for any help.
Anna