SQLTeam.com | Weblogs | Forums

Mirroring a Clone


#1

I have made a complete clone of 1 sql server here and I want to mirror the databases. Is sql going to be ok with this?


#2

do you want to just clone the databases? will that be a once off or a continues sync? Which version of SQL are you using?

but in short, the answer is YES, SQL can perform that.


#3

I mean that I made a complete clone of the entire server OS and everything. Now I want to mirror the databases, and yes it will be a continuous sync.

When I try to mirror it is telling me that I cannot use the same instance of sql. How do I rename one of the instances? Is there a powershell script or something that can accomplish this?


#4

So you want to mirror the original and clone together?


#5

Yes, it seems that I might be having a problem with the instance names.


#6

I would assume that after you clone the server, you should have change the server name and IP (otherwise it cannot be up). So the problem you getting might be SQL is still on the old name?

If that is the case, you can simple rename it, which you will need to first drop the instance name and add it back with the new name. Script is below:

sp_dropserver 'Old instance name';
GO
sp_addserver 'New instance name', 'local';
GO

That will rename SQL with the new instance name, you can check that via sp_helpserver. Once you did that, you should be able to setup mirroring as normal.

Hope this helps.