Advertisement

12.29.2007 at 02:36PM PST, ID: 23049254
[x]
Attachment Details

Change the default location of the transaction logs

Asked by BladesAway in SQL Server 2005

Tags: Microsoft, SQL, 2005

We have a SQL 2K5 install and have the Server Propertioes ->Database Settings set such that the Database Default locations are S:\Microsoft SQL Server\MSSQL.1\MSSQL\Data for the data and T:\ for the transaction logs.  When we originally set the server up these settings where blank, so any databases that were created had the MDF and LDF files in the default dat directory S:\Microsoft SQL Server\MSSQL.1\MSSQL\Data

After we made the changes noted above (changed the log location to T:), now when we create a database through the Management Studio the MDF and LDF files are created in the default locations as specified in the Server Properties as would be expected -- the MDF in the original default location and the LDF in the new T: location.

Here's the rub...We have an application that creates databases as it needs to on the fly.  The data bases that it creates puts the LDF and MDF files on the same default data directory as if we never made the changes noted above.  So the LDF and MDF are both in the S:\..\Data directory.

I was told by a DBA that we could change that behavior by simply modifiying the model database.   I have two questions:

1. Is that the way to change the behavior?
2. If it is the way, what and how do I make the change to the model db?

Thanks


Start Free Trial
 
Keywords: Change the default location of the tran…
 
Loading Advertisement...
 
[+][-]12.30.2007 at 03:36AM PST, ID: 20550475

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: SQL Server 2005
Tags: Microsoft, SQL, 2005
Sign Up Now!
Solution Provided By: imran_fast
Participating Experts: 2
Solution Grade: B
 
 
[+][-]12.30.2007 at 11:30AM PST, ID: 20551850

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628