|If another error occurred at the same time as this error, this error could be a side effect of the other error.
The file path and/or file names specified in the CREATE DATABASE or ALTER DATABASE statement could not be accessed. If no path is specified, the default path configured for new databases for this instance of SQL Server must be valid.
Some examples that could cause this:
- You specified a path that does not exist on the local machine or, in the case of a clustered instance, does not exist on one of the shared drives.
- You specified a file name that is not valid.
- You did not specify a path for the data or log file in your CREATE DATABASE or ALTER DATABASE statement, and the default data or log directory configured for new databases does not exist. For more information about setting the default data and log directories for new databases, see “SQL Server Properties (Database Settings Tab)” in Books Online and the Microsoft Knowledge Base articles, 836873 and 272705.
- You attempt to create a database for a clustered instance on a shared cluster drive when the SQL Server resource does not depend on that drive. For more information about this scenario, see the Microsoft Knowledge Base article, 295732.
- If another error occurred at the same time as this error, troubleshoot the other error first.
- If you specified a path in your CREATE DATABASE or ALTER DATABASE statement, verify that the entire path is valid and is accessible. The path must be on the local computer for a nonclustered instance or on a shared clustered drive on which the SQL Server Resource is dependent for a clustered instance.
- Verify that the specified file name is valid by manually creating a file with that name in the specified path.
- If you are not specifying the full path in the CREATE DATABASE or ALTER DATABASE statement, check to see if the default data and log directories for new databases are correct, valid directories. If they are blank in SQL Enterprise Manager, verify that the underlying registry keys exist and that they have a valid path. If the keys do not exist at all, SQL Server will default to the data path specified during installation for all new database data and log files.
WARNING: If you use Registry Editor incorrectly, you may cause serious problems that may require you to reinstall your operating system. Microsoft cannot guarantee that you can solve problems that result from using Registry Editor incorrectly. Use Registry Editor at your own risk.
- If the keys exist and the path specified is invalid, update the values to a valid path.
- If the keys exist but are blank, either enter a valid path or delete the keys completely.
The SQL Server instance must be restarted for the registry key changes to take effect.
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\Instancename\DefaultData
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\Instancename\DefaultLog
- If the instance is clustered, verify that the disk specified in the CREATE DATABASE or ALTER DATABASE statement is listed as a disk resource on which SQL Server depends. In Cluster Administrator, verify that the shared disk resides in the same group as the SQL Server resource for this instance. If you right-click on the SQL Server Resource and check the Dependencies tab, you should see the specified shared disk in the list of dependencies. If it is not there, it will need to be added.
To move the shared cluster disk, select the disk you want to move to the SQL Server group, and then right-click that resource. Click Move Group. After the disk is in the same group in which the SQL Server resource resides, follow these steps to add it as a SQL Server dependency:
- Right-click the SQL Server resource, and then bring the resource
into an offline state by clicking Bring Offline.
- Right-click the SQL Server resource, and then click Properties.
- Click the Dependencies tab for the SQL Server Resource.
- Click Add to add the disk to the dependencies list for that resource. After you complete these steps, you can now bring the SQL Server resource back online and place SQL Server files on that shared cluster disk.