Solved

SQL mdf, ldf and backup locations

Posted on 2013-05-22
4
396 Views
Last Modified: 2013-06-06
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
Comment
Question by:pma111
  • 2
4 Comments
 
LVL 31

Accepted Solution

by:
James Murrell earned 250 total points
ID: 39187004
I use this script

SELECT name, physical_name AS current_file_location
FROM sys.master_files

Open in new window

0
 
LVL 3

Author Comment

by:pma111
ID: 39187024
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
 
LVL 75

Assisted Solution

by:Anthony Perkins
Anthony Perkins earned 250 total points
ID: 39188512
What about backup files when using the native SQL backup utility?
Viewing Information About Backups
0
 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 39188514
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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Occasionally there is a need to clean table columns, especially if you have inherited legacy data. There are obviously many ways to accomplish that, including elaborate UPDATE queries with anywhere from one to numerous REPLACE functions (even within…
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
Via a live example, show how to shrink a transaction log file down to a reasonable size.
Via a live example, show how to setup several different housekeeping processes for a SQL Server.

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now