Changing the default location of SQL Server Data and Log files
March 18, 2010
Can you explain me how can I change the default file location used by SQL Server Data and Log files?. In this article we will go through the steps which can be followed to change the default file location of SQL Server Data and Log Files.
1. Using SQL Server Management Studio, connect to SQL Server
2. In the Object Explorer right click the SQL Server Database Engine Instance and choose the Properties from the popup menu.
3. In Server Properties dialog box navigate to Database Settings page as shown in the snippet below. Under Database default locations you can specify the new path for Data and Log files for newly created databases. Click OK to save the changes.
4. Internally, SQL Server executes the xp_instance_regwrite undocumented extended stored procedure to update the registry values. In order to makes these changes you should have admin privileges on the SQL Server and you should also have permissions to edit the REGISTRY values on the server.
Once you have updated the database default locations go ahead and restart the SQL Server Services for the new values to come into effect.
In this article you have seen how easily one can change the default location of SQL Server Data and Log files.
Continue Free Learning...
Geeks who read this article also read…
- New Date and Time Data Types in SQL Server 2008
- How to Remotely Shutdown, Restart or Log Off Windows Server across the network
- Date and Time Functions in SQL Server 2008
- Using Transparent Data Encryption Feature of SQL Server 2008
- Configuring Microsoft SQL Server 2005
- Microsoft SQL Server 2008 and 2005 Build Versions
- Read More SQL Server Articles…