Solved

SQL mdf, ldf and backup locations

Posted on 2013-05-22
4
402 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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

792 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