Last active
October 4, 2015 05:48
-
-
Save justingarrick/2588809 to your computer and use it in GitHub Desktop.
Find Data Directory of Remote SQL Server Instance
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT SUBSTRING(physical_name, 1, CHARINDEX(N'master.mdf', LOWER(physical_name)) - 1) | |
FROM master.sys.master_files | |
WHERE database_id = 1 AND file_id = 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment