Cloned server

  • 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

  • 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

  • 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

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply