SQL Backup exit code: 890 / SQL error code: 924
sonnydeletejc
Posts: 5
Hi All,
We are having a problem running a restore via a SQL Server Agent job.
This is the message…
Error 890: RESTORE DATABASE permission denied for database: (MyDatabase)
SQL error 924: Database 'MyDatabase' is already open and can only have one user at a time.
SQL Backup exit code: 890
SQL error code: 924
The thing is there doesn’t appear to be any other processes running in the activity monitor.
I haven’t been able to find any posts with a similar combination of exit and error codes.
Can anyone advise?
Many thanks,
J
We are having a problem running a restore via a SQL Server Agent job.
This is the message…
Error 890: RESTORE DATABASE permission denied for database: (MyDatabase)
SQL error 924: Database 'MyDatabase' is already open and can only have one user at a time.
SQL Backup exit code: 890
SQL error code: 924
The thing is there doesn’t appear to be any other processes running in the activity monitor.
I haven’t been able to find any posts with a similar combination of exit and error codes.
Can anyone advise?
Many thanks,
J
Comments
Thanks.
SQL Backup Consultant Developer
Associate, Yohz Software
Beyond compression - SQL Backup goodies under the hood, updated for version 8
Yes we are setting the database to single user as part of the SQL agent job.
Here's the full command...
If you use the DISCONNECT_EXISTING option in SQL Backup, SQL Backup will also use the ALTER DATABASE ... SET SINGLE_USER WITH ROLLBACK IMMEDIATE command, before setting the database back to multi-user and proceeding with the restore. Try using this option, and also setting the database back to multi-user mode prior to running the SQL Backup command, if you want to make doubly sure that all other existing connections have been disconnected e.g.
SQL Backup Consultant Developer
Associate, Yohz Software
Beyond compression - SQL Backup goodies under the hood, updated for version 8
When we run the script now, we are given the following messages...
Thanks.
SQL Backup Consultant Developer
Associate, Yohz Software
Beyond compression - SQL Backup goodies under the hood, updated for version 8
Sorry for the delay in reply.
The script does actually work... my mistake. The first time I ran it the database had switched from [Master] to [MyDatabase]!
Thank you so much for your advice in resolving this. You've been a big help.
Solved!
Best wishes,
J