How do I find the data directory for a SQL Server instance?

后端 未结 15 2607
挽巷
挽巷 2020-11-30 23:16

We have a few huge databases (20GB+) which mostly contain static lookup data. Because our application executes joins against tables in these databases, they have t

15条回答
  •  再見小時候
    2020-11-30 23:58

    As of Sql Server 2012, you can use the following query:

    SELECT SERVERPROPERTY('INSTANCEDEFAULTDATAPATH') as [Default_data_path], SERVERPROPERTY('INSTANCEDEFAULTLOGPATH') as [Default_log_path];
    

    (This was taken from a comment at http://technet.microsoft.com/en-us/library/ms174396.aspx, and tested.)

提交回复
热议问题