-
Error message
Hi All,
One of the jobs that I ran over the weekend failed with the following message:
Executed as user: user. Database state cannot be changed while other users are using the database 'TestDb' [SQLSTATE 42000] (Error 5070) ALTER DATABASE statement failed. [SQLSTATE 42000] (Error 5069) sp_dboption command failed. [SQLSTATE 01000] (Error 15627). The step failed.
When I checked the current connections, there were no users connected to the testdb. What could cause this error?
-
Anyone was connected during weekend? Did you run 'alter database' statement under master db or TestDb?
-
Nobody was connected to the database. I alter db and sp_dboption statements under master db.
-
How do you know there was no connection to the db? Seems sql saw connections at the time.
-
I checked current activity right after the job failed, and I didn't see any connections to that particular db.
-
Then ensure you didn't run the job under TestDb. Start job and run 'sp_who2 active' to see if have any connection to that db.
-
Do I run 'sp_who2 active' in master db?
-
Yes, that way you know you are not in TestDb.
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|