SQL Server – Configuration – Default Directories

Background

In the last few days knee-deep reviewing SQL Server Installs and Scripts.

ServerProperty

In the last hour or so found myself looking at what is exposed via ServerProperty.

Folders

Here are some of the File System folder entries exposed through the ServerProperty function.

  1. InstanceDefaultDataPath
    • Name of the default path to the instance log files.
      • Applies to: SQL Server 2012 (11.x) through current version
      • Updates beginning in late 2015.
  2. InstanceDefaultLogPath
    • Name of the default path to the instance log files.
      • Applies to: SQL Server 2012 (11.x) through current version
      • Updates beginning in late 2015.
  3. InstanceDefaultBackupPath
    • Name of the default path to the instance backup files.
      • Applies to: SQL Server 2019 (15.x) through current version
      • Updates beginning in 2019.

Code

SQL


select
          instanceDefaultDataPath
            = SERVERPROPERTY('InstanceDefaultDataPath')

        , instanceDefaultLogPath
            = SERVERPROPERTY('InstanceDefaultLogPath')

        , instanceDefaultBackupPath
            = SERVERPROPERTY('InstanceDefaultBackupPath')

Output

Image

Version => SQL Server – 2019 / CU 4

Linux

serverProperty.linux.centos.sqlServer.01.20200608.0754PM

Version => SQL Server – 2017 / CU 13

Amazon / AWS / RDS

serverProperty.aws.rds.sqlServer.01.20200608.0753PM

Textual


instanceDefaultDataPath	instanceDefaultLogPath	instanceDefaultBackupPath
/var/opt/mssql/data/	/var/opt/mssql/data/	/var/opt/mssql/backup

 

Summary

As always, work hard, test, and build a coalition.

References

  1. Microsoft
    • Docs
      • ServerProperty
        Link

 

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s