Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Cloned server Expand / Collapse
Author
Message
Posted Monday, November 09, 2009 8:47 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Tuesday, June 11, 2013 9:11 AM
Points: 138, Visits: 305
Hi,

One of my clients has cloned the live SQL Server 2005 server to create a test server.

The @@servername was incorrect, so I fixed that. but the maintenance plans were not working properly. So I attempted to delete the maintainence plan in question, but it deleted it off of the live server!!!!

The plans were then in a very weird state. The plan on the test server was still there (even though I deleted it). Also the job was still there. I tried to delete the job and got a referential integrity check failure! On the live server there was also an incosistency between the job and plan.

Any ideas how to get around these types of issues when a server is cloned?

Many thanks

Peter Gadsby


Peter Gadsby
Business Intelligence Consultant
www.hgconsult.co.uk
Post #815840
Posted Monday, November 09, 2009 10:01 PM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Tuesday, March 12, 2013 9:52 AM
Points: 44, Visits: 235
Hi Peter, was this cloned server a domain member server? And when cloned, was sysprep run against it to replace the unique ID?
Have you dropped and re-added the server from within SSMS? (Assuming that's how you are connecting to it.)

Sounds like you got the server name straightened out. Did you use
sp_dropserver 'old server name'
sp_addserver 'new server name', 'local'


As for your current maintenance plan confusion, when you query msdb..sysmaintplan_plans what results do you get against each server? Here is an unsophisticated script to delete maintenance plans but better be sure what server you are pointing at before doing this.

Declare @PlanID uniqueidentifier

set @PlanID = (select top 1 ID from msdb..sysmaintplan_plans)

delete from msdb..sysmaintplan_log where plan_id = @PlanID

delete from msdb..sysmaintplan_subplans where plan_id = @PlanID

delete from msdb..sysmaintplan_plans where id = @PlanID


SQL Managed
Post #816299
Posted Tuesday, November 10, 2009 3:14 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Tuesday, June 11, 2013 9:11 AM
Points: 138, Visits: 305
Hi Steve,

The domain stuff was done by the infrastructure team.... So don't know whether they did what you suggested with that.

With regards to SSMS I connected directly to the server using the server name rather than (local) just in case this was set incorrectly.

In the end I deleted the maintenance plans from MSDB directly... What I didn't really understand was the fact that when I deleted the plan off of the new server using SSMS it deleted (partially) from the other server.... All very strange...

Pete


Peter Gadsby
Business Intelligence Consultant
www.hgconsult.co.uk
Post #816382
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse