Is there a way to logout all users connected to a specific database before running a script on server?
I mean, I have to do a lot of updates on a large table and usually that table is in use by some users.
I'll explain it clearly. I have a very big table to be queried (half a million of records) looped for 5000 times.
Basically my head table is the customer table (5000 customer) and the detail table (order lines) must be checked for every customer, calculating the most sold article.
I run the script on server and it takes few mins to run. But If a user is working on the customer table in that moment the changes won't be written on that specific record, giving me back an error 301.
Considering that the script will be run during the night, is there a way to logoff all users before running the script, so that I'll run on all records?
Thanks and have a great day!