SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Cloned server


Cloned server

Author
Message
Peter Gadsby
Peter Gadsby
SSChasing Mays
SSChasing Mays (602 reputation)SSChasing Mays (602 reputation)SSChasing Mays (602 reputation)SSChasing Mays (602 reputation)SSChasing Mays (602 reputation)SSChasing Mays (602 reputation)SSChasing Mays (602 reputation)SSChasing Mays (602 reputation)

Group: General Forum Members
Points: 602 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
Steve Turner - SQL Managed
Steve Turner - SQL Managed
SSC Veteran
SSC Veteran (256 reputation)SSC Veteran (256 reputation)SSC Veteran (256 reputation)SSC Veteran (256 reputation)SSC Veteran (256 reputation)SSC Veteran (256 reputation)SSC Veteran (256 reputation)SSC Veteran (256 reputation)

Group: General Forum Members
Points: 256 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
Peter Gadsby
Peter Gadsby
SSChasing Mays
SSChasing Mays (602 reputation)SSChasing Mays (602 reputation)SSChasing Mays (602 reputation)SSChasing Mays (602 reputation)SSChasing Mays (602 reputation)SSChasing Mays (602 reputation)SSChasing Mays (602 reputation)SSChasing Mays (602 reputation)

Group: General Forum Members
Points: 602 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
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search