3

I am working with a more experienced database admin and he wants me to send him a database that I created. However, I cannot figure out where the database is stored on disk. I am using Microsoft SSMS.

5
Select a.name, b.physical_name 
from sys.databases a 
join sys.master_files b 
    on a.Database_id = b.database_id 
Where a.name = 'NAME_OF_YOUR_DATABASE'  

This will show you the location on disk.. (can't move it though).

Backup the database:

BACKUP Database NAME_OF_YOUR_DATABASE
To Disk = N'C:\Databases\NAME_OF_YOUR_DATABASE.bak With Compression

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.