Hello all!
First of all our servers:
- SQL_PROD: production server with SQL Server 2005
- SQL_TEST: test server with SQL Server 2005
What we are trying to do:
- We are testing our backup and recovery procedures.
- To do so we are using the backups from SQL_PROD and restoring them on SQL_TEST.
- We are restoring: all user databases, master database, msdb database and model database.
The issue we are experiencing:
I think we've hit a kink in our recovery procedures concerning msdb database in the context of a recovery on another machine (SQL_TEST in this case).
We include msdb in our nightly backups so that, in the event of server loss, our maintenance plans and jobs get restored.
On SQL_TEST (after a recovery), the maintenance plans and jobs do get restored but the problem is that they reference the SQL_PROD server (server's name, disks, etc...).
Deleting the jobs and maintenance plans from SQL_TEST we got no errors and the jobs and plans disappeared from beneath the Maintenance Plans and Jobs nodes. Doing a refresh on the nodes, the ¡°deleted¡± plans and jobs reappear beneath their respective nodes! Upon the second deletion (and any consecutive delete) we get the error:
Failed to retrieve data for this request. (Microsoft.SqlServer.SmoEnum)
...
The SELECT permission was denied on the object 'sysmaintplan_plans', database 'msdb', schema 'dbo'. (Microsoft SQL Server, Error: 229)
Clicking on "Show technical details" reveals this:
...
Server Name: SQL_PROD
Error Number: 229
Severity: 14
State: 5
Line Number: 1
...
Note that SQL_PROD is being referenced in the error message!
This morning I took a look at SQL_PROD¡¯s Maintenance Plans and Jobs (the source of the msdb backup) and surprise surprise: THEY WERE ALL GONE!!! This is a MAJOR BUG!!! Deleting a job or a plan on one server should not have the effect of deleting it from a different server (regardless of the origins of the msdb database). Is this a known bug Or is it considered ¡°normal¡± behavior
My questions are:
- How do we delete the maintenance plans and jobs from SQL_TEST without deleting them from SQL_PROD
- What is the proper/recommended method to backup and restore maintenance plans and jobs (in fact msdb) Is it by scripting things and recreating them on the recovery server in an empty msdb or is there a way to restore msdb properly from the crashed server
Thanks for your help.
Regards,
Mark Tabash