Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 423
  • Last Modified:

SQL mdf, ldf and backup locations

If you have a SQL 2005 instance with 30 databases. Is there any easy wat to determine where on disk the actual database and log file is located, and also where the backup file is being written to?
0
pma111
Asked:
pma111
  • 2
2 Solutions
 
James MurrellProduct SpecialistCommented:
I use this script

SELECT name, physical_name AS current_file_location
FROM sys.master_files

Open in new window

0
 
pma111Author Commented:
Does that report on all databases in the instance?

What about backup files when using the native SQL backup utility? I assume you can declare where you want the backup file to be saved to?
0
 
Anthony PerkinsCommented:
What about backup files when using the native SQL backup utility?
Viewing Information About Backups
0
 
Anthony PerkinsCommented:
I assume you can declare where you want the backup file to be saved to?
Providing you are scripting out the backups you have total control of where the backups are saved.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now