SQL Server 2005 - path for log files when creating a new database
-
Can anyone tell me where the default value for the logfile path is stored? I presume it is in one of the system tables somewhere... The problem is that at the moment, using the "Create New Database" option generates a path of: ...C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\YourDBname for the DB and ...C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DAT\YourDBname for the logfiles :confused: Obviously I can change this at creation time, but I'd rather that my colleagues and I don't have to do this every time (sigh). Google (so far) has not been my friend.
-
Can anyone tell me where the default value for the logfile path is stored? I presume it is in one of the system tables somewhere... The problem is that at the moment, using the "Create New Database" option generates a path of: ...C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\YourDBname for the DB and ...C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DAT\YourDBname for the logfiles :confused: Obviously I can change this at creation time, but I'd rather that my colleagues and I don't have to do this every time (sigh). Google (so far) has not been my friend.
I have never tried this myself, but what happens if you change it for the "model" database?
--------------------------- Blogging about SQL, Technology and many other things
-
I have never tried this myself, but what happens if you change it for the "model" database?
--------------------------- Blogging about SQL, Technology and many other things
I see where you are coming from - but model database files location are both correct (i.e. both \DATA) Thanks for your attention. :)
-
Can anyone tell me where the default value for the logfile path is stored? I presume it is in one of the system tables somewhere... The problem is that at the moment, using the "Create New Database" option generates a path of: ...C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\YourDBname for the DB and ...C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DAT\YourDBname for the logfiles :confused: Obviously I can change this at creation time, but I'd rather that my colleagues and I don't have to do this every time (sigh). Google (so far) has not been my friend.
In Management Studio, right-click the server in the Object Explorer tree, select Properties, go to Database Settings, and change the paths under Database Default Locations. IIRC, you need to restart the SQL Server service before the change takes effect.
DoEvents: Generating unexpected recursion since 1991
-
In Management Studio, right-click the server in the Object Explorer tree, select Properties, go to Database Settings, and change the paths under Database Default Locations. IIRC, you need to restart the SQL Server service before the change takes effect.
DoEvents: Generating unexpected recursion since 1991
Woohoo! Yup - the default locations were blank (dunno where it was getting them from before :doh: ) Changed and successful - did not even have to restart SQL server agent or anything. Cheers Mike! :rose: