Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

SQL mdf, ldf and backup locations

Posted on 2013-05-22
4
Medium Priority
?
412 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 31

Accepted Solution

by:
James Murrell earned 1000 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 1000 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

Learn how to optimize MySQL for your business need

With the increasing importance of apps & networks in both business & personal interconnections, perfor. has become one of the key metrics of successful communication. This ebook is a hands-on business-case-driven guide to understanding MySQL query parameter tuning & database perf

Question has a verified solution.

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

A Stored Procedure in Microsoft SQL Server is a powerful feature that it can be used to execute the Data Manipulation Language (DML) or Data Definition Language (DDL). Depending on business requirements, a single Stored Procedure can return differe…
When trying to connect from SSMS v17.x to a SQL Server Integration Services 2016 instance or previous version, you get the error “Connecting to the Integration Services service on the computer failed with the following error: 'The specified service …
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

688 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