Wednesday, March 7, 2012

Change the schema of a mirrored database

Simple question, I hope. I need to add a column to a table of a database that is mirrored. How do I have to do that? Do I need to stop mirroring? Is it sufficient to simply pause mirroring? If I make the change on the principal db, what do I need to do the make the same change on the mirror?

Thanks,

Greg,

You don't need to stop the mirroring, you can perform any changes in the principal db and it will automatically get reflected in the mirror db......you can verify the same as follows,

1. add any column in the principal db and it will get reflected to mirror db automatically then after 5 minutes

2. in the mirror db take a database snapshot and just query through the table you can see the column which was added....

|||Is the same true for add/altering stored procedures?

|||

any changes you make in the principal database will get reflected just check and see by creating database snapshot........

|||All these commands TSQL DDL , DML etc are logged in Transaction Log and in Database Mirroring the Logs record are transferred. Even Replication commands like Create Publication etc are transferred.|||Also remember; a Principal database can only use the Full Recovery model which means all operations are fully logged.

No comments:

Post a Comment