troubleshooting Question

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

Avatar of loneieagle2
loneieagle2Flag for United States of America asked on
SQLDatabasesMicrosoft SQL Server
8 Comments2 Solutions18 ViewsLast Modified:
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?

Nakul Vachhrajani
Senior Manager

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 2 Answers and 8 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 2 Answers and 8 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros