Saturday, February 25, 2012

Cloning a SQL 2005 Database

hi,
I have cloned a VM of a SQL Server 2005 database to a new server with a
different name.
I have run the sp_dropserver and sp_addserver commands as well documented to
change the server name within the sql instance to the new cloned server name
.
The issue i have is that the logins on the new cloned server still contains
the local group and local account details from the old machine.
I have renamed the groups and accounts within NT, but when i try to change
rename the logins within sql , i get the error.
TITLE: Microsoft SQL Server Management Studio
--
Unable to rename LBOPS2\SQLServer2005MSSQLUser$LBOPS2$MSS
QLSERVER.
(ObjectExplorer)
ADDITIONAL INFORMATION:
Rename failed for Login 'LAOPS2\SQLServer2005MSSQLUser$LAOPS2$MS
SQLSERVER'.
(Microsoft.SqlServer.Smo)
For help, click:
http://go.microsoft.com/fwlink?Prod...in&LinkId=20476
An exception occurred while executing a Transact-SQL statement or batch.
(Microsoft.SqlServer.ConnectionInfo)
The name change cannot be performed because the SID of the new name does not
match the old SID of the principal. (Microsoft SQL Server, Error: 15098)
For help, click:
http://go.microsoft.com/fwlink?Prod...98&LinkId=20476
BUTTONS:
OK
--
Many Thanks
JonHi Jon
"Jon Bird" wrote:

> hi,
> I have cloned a VM of a SQL Server 2005 database to a new server with a
> different name.
> I have run the sp_dropserver and sp_addserver commands as well documented
to
> change the server name within the sql instance to the new cloned server na
me.
> The issue i have is that the logins on the new cloned server still contain
s
> the local group and local account details from the old machine.
> I have renamed the groups and accounts within NT, but when i try to change
> rename the logins within sql , i get the error.
> TITLE: Microsoft SQL Server Management Studio
> --
> Unable to rename LBOPS2\SQLServer2005MSSQLUser$LBOPS2$MSS
QLSERVER.
> (ObjectExplorer)
> --
> ADDITIONAL INFORMATION:
> Rename failed for Login 'LAOPS2\SQLServer2005MSSQLUser$LAOPS2$MS
SQLSERVER'
.
> (Microsoft.SqlServer.Smo)
> For help, click:
> http://go.microsoft.com/fwlink?Prod...in&LinkId=20476
> --
> An exception occurred while executing a Transact-SQL statement or batch.
> (Microsoft.SqlServer.ConnectionInfo)
> --
> The name change cannot be performed because the SID of the new name does n
ot
> match the old SID of the principal. (Microsoft SQL Server, Error: 15098)
> For help, click:
> http://go.microsoft.com/fwlink?Prod...98&LinkId=20476
> --
> BUTTONS:
> OK
> --
>
> Many Thanks
> Jon
>
Have you looked at using the script in:
http://support.microsoft.com/kb/246133/
Then dropping the logins and re-creating new ones with the same SIDs.
John

No comments:

Post a Comment