Counter of Festivals

Ashok Blog for SQL Learners and Beginners and Experts

Saturday 7 January 2017

Database Mirroring Real time Examples


Database Mirroring Real time Examples


We can't able to restore if Database is different in both source and destination

Real time examples:

1)DB different in both Principal and Mirror:

Source:

Source db: Test D M 02


Destination:

Destination db:

Test D M 01


both database different so we cant able to configure mirror both database should be in same database name

while you try to configure mirror it will give error as see below


2)We can't rename standby with read_only database:

you will get below error while you try to rename read_only database

if you try to rename read_only db Test D M 01 to Test D M 02 you will get error as see below




3)DB same in both Principal and Mirror with Standby with read_only mode:

Principal and Mirror with read_only mode so we cant able to restore if you try to configure you will get below error


It will asks read_write mode to configure correctly.



we should use below command to bring db back to normal (READ_WRITE)

RESTORE DATABASE DB_NAME WITH RECOVERY


after issued it back to read_write



but if database is read_only mode then we can use



ALTER DATABASE [Test R W test] SET READ_WRITE WITH NO_WAIT



After issued above T SQL we can back to normal(read_write)



























No comments:

Post a Comment