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

No comments:

Post a Comment

View running queries in postgresql

 View running queries in postgreSQL: SELECT * FROM pg_stat_activity;