Skip to main content
TechNet
Database Engine Configuration - Data Directories
 

Applies To: SQL Server 2016

Use this page to specify the installation location for SQL ServerDatabase Engine program and data files. Based on the type of installation, the supported storage may include local disk, shared storage, or an SMB file server.

To specify an SMB file share as a directory, you must manually type the supported UNC path. Browsing to an SMB file share is not supported. The following is a supported UNC path format of an SMB file share: \\Servername\ShareName\....

The following table lists the supported storage types and the default directories for a stand-alone instance of SQL Server that are user configurable during SQL Server Setup.

DescriptionSupported Storage TypeDefault directoryRecommendations
Data root directoryLocal Disk, SMB File Server, Shared Storage*C:\Program Files\MicrosoftSQL Server\SQL Server Setup will configure ACLs for SQL Server directories and break inheritance as part of configuration.
User database directoryLocal Disk, SMB File Server, Shared Storage*C:\Program Files\MicrosoftSQL Server\MSSQL13.<InstanceID>\MSSQL\DataBest practices for user data directories depend on workload and performance requirements.
User database log directoryLocal Disk, SMB File Server, Shared Storage*C:\Program Files\MicrosoftSQL Server\MSSQL13.<InstanceID>\MSSQL\DataEnsure that the log directory has adequate space.
Backup directoryLocal Disk, SMB File Server, Shared Storage*C:\Program Files\MicrosoftSQL Server\MSSQL13.<InstanceID>\MSSQL\BackupSet appropriate permissions to prevent data loss, and ensure that the user account for the SQL Server service has adequate permissions to write to the backup directory. Using a mapped drive for backup directories is not supported.

*Although shared disks are supported, it is not a recommended practice for a stand-alone instance of SQL Server.

The following table lists the supported storage types and the default directories for a failover cluster instance of SQL Server that are user configurable during SQL Server Setup.

DescriptionSupported Storage TypeDefault DirectoryRecommendations
Data root DirectoryShared Storage, SMB File Server<Drive:>\Program Files\MicrosoftSQL Server\

Tip: If shared disk was selected on the Cluster Disk Selection page, the default is the first shared disk. This field defaults to blank if no selection was made on the Cluster Disk Selection page.
SQL Server Setup will configure ACLs for SQL Server directories and break inheritance as part of configuration.
User database directoryShared Storage, SMB File Server<Drive:>Program Files\MicrosoftSQL Server\MSSQL13.<InstanceID>\MSSQL\Data

Tip: If shared disk was selected on the Cluster Disk Selection page, the default is the first shared disk. This field defaults to blank if no selection was made on the Cluster Disk Selection page.
Best practices for user data directories depend on workload and performance requirements.
User database log directoryShared Storage, SMB File Server<Drive:>\Program Files\MicrosoftSQL Server\MSSQL13.<InstanceID>\MSSQL\Data

Tip: If shared disk was selected on the Cluster Disk Selection page, the default is the first shared disk. This field defaults to blank if no selection was made on the Cluster Disk Selection page.
Ensure that the log directory has adequate space.
Backup directoryLocal Disk, Shared Storage, SMB File Server<Drive:>\Program Files\MicrosoftSQL Server\MSSQL13.<InstanceID>\MSSQL\Backup

Tip: If shared disk was selected on the Cluster Disk Selection page, the default is the first shared disk. This field defaults to blank if no selection was made on the Cluster Disk Selection page.
Set appropriate permissions to prevent data loss, and ensure that the user account for the SQL Server service has adequate permissions to write to the backup directory. Using a mapped drive for backup directories is not supported.

Setup will configure ACLs for SQL Server directories and break inheritance as part of configuration.

The following recommendations apply to the SMB file server:

  • The SQL Server service account must be a domain account if an SMB file server is used.

  • The account used to install SQL Server should have FULL CONTROL NTFS permissions on the SMB file share folder used as the data directory.

  • The account used to install SQL Server should be granted SeSecurityPrivilege privileges on the SMB file server. To grant this privilege, use the Local Security Policy console on the file server to add the SQL Server setup account to the Manage auditing and security log policy. This setting is available in the User Rights Assignments section under Local Policies in the Local Security Policy console.

  • When adding features to an existing installation, you cannot change the location of a previously installed feature, nor can you specify the location for a new feature.

  • If you specify non-default installation directories, ensure that the installation folders are unique to this instance of SQL Server. None of the directories in this dialog box should be shared with directories from other instances of SQL Server. The Database Engine and Analysis Services components within an instance of SQL Server should also be installed to separate directories.

  • Program files and data files cannot be installed in the following situations:

    • On a removable disk drive

    • On a file system that uses compression

    • To a directory where system files are located

    • On a mapped network drive on a failover cluster instance

File Locations for Default and Named Instances of SQL Server
Share and NTFS Permissions on a File Server