MS-SQL Database File Location

How to find MS-SQL Database File Location :-
==============================

EXEC sp_Helpfile;

(or)

--  run under particular db for file location.

SELECT  @@Servername AS Server ,
        DB_NAME() AS DB_Name ,
        File_id ,
        Type_desc ,
        Name ,
        LEFT(Physical_Name, 1) AS Drive ,
        Physical_Name ,
        RIGHT(physical_name, 3) AS Ext ,
        Size ,
        Growth
FROM    sys.database_files
ORDER BY File_id;
GO

Comments

Popular posts from this blog

Shareplex some commands

SQL Tuning Task Creation ORA-13780: SQL statement does not exist.

ORA 700 [kskvmstatact: excessive swapping observed]