Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

How to change Default Database locations without a restart Expand / Collapse
Author
Message
Posted Thursday, September 11, 2008 11:57 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Tuesday, July 8, 2014 1:20 PM
Points: 133, Visits: 472
I have changed the Default Database locations AFTER installation of SQL server. If i create a db in the UI it uses the new locations yet if I run a simple script "Create database TEST1" it uses the old locations. I restarted the SQL service and created TEST2 and it used the NEW locations. My question is, is there a way to update the SQL engine to use the new locations without restarting the service?

Jimmy

"I'm still learning the things i thought i knew!"
Post #568004
Posted Thursday, September 11, 2008 12:18 PM
SSC-Addicted

SSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-Addicted

Group: General Forum Members
Last Login: Thursday, November 13, 2014 1:27 PM
Points: 425, Visits: 617
When you click on the server and change the database settings it does not say you have to restart the service. When I did that and tried to create a new database it defaulted to the new location
Post #568029
Posted Thursday, September 11, 2008 12:25 PM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Tuesday, July 8, 2014 1:20 PM
Points: 133, Visits: 472
It does go to the new location in the UI. However if you script it does not. Try running "create database TEST1". If you have not restarted your service it will install the db files to the old location.

Jimmy

"I'm still learning the things i thought i knew!"
Post #568041
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse