I just setup mirroring between a principal and mirror server. I am following some steps a coworker left for me as I have not done this before.
At one point, I had to backup the principal database which I did with
USE MASTER GO BACKUP DATABASE MyDB TO DISK ='D:\Backups\MyDBFullBackup.bak' GO BACKUP LOG MyDB TO DISK='D:\Backups\MyDB_LogBackup.trn' GO
Then I copied these files to the mirror server and restored them with
USE MASTER GO RESTORE DATABASE MyDB FROM DISK='D:\Backups\MyDBFullBackup.bak' WITH NORECOVERY GO RESTORE LOG MyDB FROM DISK='D:\Backups\MyDB_LogBackup.trn' WITH NORECOVERY GO
After that I finalized the mirror (already did all the cert creation/copying over) with
ALTER DATABASE MyDB SET PARTNER='TCP://192.168.1.5:5022 GO
on the principal and mirror databases (with the appropriate IP changes).
This all seems to have worked in so far as when I run the query
SELECT [mirroring_State_desc], [mirroring_role_desc], [mirroring_partner_name], [mirroring_partner_instance] FROM sys.database_mirroring WHERE [database_id]=db_id('MyDB')
These all look right when run on principal or witness, the role is correct, it's synchronized, and the partner name/ip are all correct.
The thing that I am worried about but am not sure I should be is when I open up SSMS on the mirror server, the database looks like
Is this a problem? Or is this database since its a mirror that's constantly being updated (not now in development but in general) it's always Restoring...? Not sure if this is a problem and if so how to figure out what is wrong.
I am able to do
ALTER DATABASE MyDB SET PARTNER FAILOVER and I see the effects in both databases, the principal changes to mirrored and vice versa, but whatever is the mirror still has the
Restoring... that doesn't seem to go away.