SQL 2008R2:
Is it possible to add file in mirroring ? How to add file in mirror
Technology Tips and News
SQL 2008R2:
Is it possible to add file in mirroring ? How to add file in mirror
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
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/