Blog Post

SQL Server – Get the Default Data File and Log File Location using T-SQL Query

,

In SQL Serve 2012, we can get the default data file and log file locations using a simple T-SQL query as below: SELECT SERVERPROPERTY('INSTANCEDEFAULTDATAPATH') AS [Default_Data_path] ,SERVERPROPERTY('INSTANCEDEFAULTLOGPATH') AS [Default_log_path] GO Sample Output: These parameters INSTANCEDEFAULTDATAPATH & INSTANCEDEFAULTLOGPATH are new in SQL Server 2012 and are not documented yet. Usually undocumented features like these aren’t tested rigorously which is […]

Rate

You rated this post out of 5. Change rating

Share

Share

Rate

You rated this post out of 5. Change rating