Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Administration
 Testing database mirroring with 2008 r2

Author  Topic 

akukalle
Starting Member

1 Post

Posted - 2010-12-05 : 11:58:15
Hi, just testing database mirroring. Here what i have done:

Principal:

CREATE ENDPOINT [EndPointpeilaus1430]
STATE=STARTED
AS TCP (LISTENER_PORT = 1430, LISTENER_IP = ALL)
FOR DATA_MIRRORING (ROLE = PARTNER, AUTHENTICATION = WINDOWS NEGOTIATE
, ENCRYPTION = REQUIRED ALGORITHM RC4)

Mirror:

CREATE ENDPOINT [EndPointpeilaus1440]
STATE=STARTED
AS TCP (LISTENER_PORT = 1440, LISTENER_IP = ALL)
FOR DATA_MIRRORING (ROLE = PARTNER, AUTHENTICATION = WINDOWS NEGOTIATE
, ENCRYPTION = REQUIRED ALGORITHM RC4)

witness:

CREATE ENDPOINT [EndPointpeilaus1450]
STATE=STARTED
AS TCP (LISTENER_PORT = 1450, LISTENER_IP = ALL)
FOR DATA_MIRRORING (ROLE = WITNESS, AUTHENTICATION = WINDOWS NEGOTIATE
, ENCRYPTION = REQUIRED ALGORITHM RC4)

principal:

BACKUP DATABASE [APPVIRT]
TO DISK = N'C:\temp\appvirtpeilattavaksi.bak'
WITH FORMAT
GO

copy backup to mirror and then:

RESTORE FILELISTONLY
FROM DISK = 'C:\temp\appvirtpeilattavaksi.bak'
go
RESTORE DATABASE APPVIRT
FROM DISK = 'C:\temp\appvirtpeilattavaksi.bak'
WITH NORECOVERY,
MOVE 'APPVIRT_Log' TO 'C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\APPVIRT_Log.ldf'
GO

Principal:

BACKUP LOG [APPVIRT] TO
DISK = N'C:\temp\appvirtLog.bak'
Go

Once again copy to mirror and:

RESTORE LOG [APPVIRT]
FROM DISK = N'C:\temp\appvirtLog.bak'
WITH FILE = 1, NORECOVERY
GO

Mirror:

ALTER DATABASE APPVIRT
SET PARTNER = ' TCP://sql1.testi.local:1430'
GO

principal:

ALTER DATABASE APPVIRT
SET PARTNER = 'TCP://sql2.testi.local:1440'
GO
ALTER DATABASE APPVIRT
SET WITNESS = 'TCP://sql3.testi.local:1450'
GO

And i get error:

Msg 1499, Level 16, State 1, Line 2
Database mirroring error: status 1460, severity 16, state 1, string APPVIRT.
Msg 1416, Level 16, State 1, Line 2
Database "APPVIRT" is not configured for database mirroring.

What I am doing wrong? any tips?
   

- Advertisement -