SQL Mirroring

SQL 2008R2:

Is it possible to add file in mirroring ? How to add file in mirror

September 10th, 2015 2:20pm

Do you mean to add a database file to the principal database in a mirroring session?

Yes, its possible. You can just do ALTER DATABASE command on the principal to add the file. The only catch is that path to the file has to exist on the partner database.

For instance if you add the file and its location is D:\MSSQL\SQLDATA\<database file to add>.ndf. The path D:\MSSQL\SQLDATA has to be present on the partner instance for the it to work.

If you setup the database mirroring and during initialization used RESTORE DATABASE WITH MOVE syntax, it gets slightly more complicated... Try this: Remove mirroring, make sure no logbackup run after mirroring is removed otherwise you would need to restore them, Add file to the old principal, Backup TLOG, RESTORE LOG WITH MOVE Command on partner, re-establish mirroring session, resume regular scheduled TLOG backups.

HTH

Free Windows Admin Tool Kit Click here and download it now
September 10th, 2015 9:35pm

Refer the below links... if primary and secondary servers are with same drive and folder structure then if you create a file manually then all will be good, other wise you have to follow the below links....

https://www.mssqltips.com/sqlservertip/2834/how-to-add-a-database-file-to-a-mirrored-sql-server-database/

http://mssqlfun.com/2014/10/20/add-database-file-on-database-invloved-in-db-mirroring/

September 10th, 2015 10:27pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics