Avatar of loneieagle2
loneieagle2
Flag for United States of America

asked on 

How do I attach a copy of a SQL mdf file to a different instance?

I have a SQL Server 2016 installation with 2 named instances, let's say InstanceA and InstanceB. I make a file level backup of InstanceA on a Unitrends backup appliance which includes MyDB.mdf..
I can connect to the backup on the Unitrends appliance as a disk through disk management on the Windows server that SQL server is installed on.
In SSMS, I can attach the MyDB.mdf to InstanceA as MyDB_Copy and it works exactly as expected; I can access the data that resides on the backup appliance.
What I can't do is attach MyDB.mdf to InstanceB because it does not show up when I browse to mdf file in SSMS while attaching when connected to InstanceB. I can browse to the folder F:\Program Files\Microsoft SQL Server\MSSQL13.InstanceA\MSSQL\DATA, but it doesn't display the files in that folder.
Is there a way to do this?

  
SQLDatabasesMicrosoft SQL Server

Avatar of undefined
Last Comment
loneieagle2

8/22/2022 - Mon