Welcome to dbForumz.com!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Redirect SQL 2005 data & log files to another partition

 
   Database Forums (Home) -> Setup RSS
Next:  Stored Procedure inserts and selects  
Author Message
Steve Ikard

External


Since: Nov 04, 2008
Posts: 1



(Msg. 1) Posted: Tue Nov 04, 2008 10:10 am
Post subject: Redirect SQL 2005 data & log files to another partition
Archived from groups: microsoft>public>sqlserver>setup (more info?)

When SQL Server 2005 was originally installed by previous IT guy he accepted
all defaults for location of files. Now all new databases and logs will be
created on C: instead of D: and C: is System partition and does not have
enough space for databases and logs. How do I tell SQL to redirect all new
dbs and logs to DConfused I can't find anything in kb or books online about
redirecting after installation. I can find only articles on moving dbs for
disk failures etc. Where is there documentation on redirecting for future
databases and logs? Thanks!

 >> Stay informed about: Redirect SQL 2005 data & log files to another partition 
Back to top
Login to vote
Russell Fields

External


Since: Feb 21, 2007
Posts: 457



(Msg. 2) Posted: Tue Nov 04, 2008 2:21 pm
Post subject: Re: Redirect SQL 2005 data & log files to another partition [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Steve,

In SQL Server Management Studio, right click on server name and choose
Properties. The Database Settings tab has the entries for the default
database and log locations. This will affect future database creation.

If you are curious, these values are not stored in the database, but in the
registry. E.g.

USE [master]
GO
EXEC xp_instance_regwrite N'HKEY_LOCAL_MACHINE',
N'Software\Microsoft\MSSQLServer\MSSQLServer', N'DefaultData', REG_SZ,
N'D:\DATA'
GO
EXEC xp_instance_regwrite N'HKEY_LOCAL_MACHINE',
N'Software\Microsoft\MSSQLServer\MSSQLServer', N'DefaultLog', REG_SZ,
N'D:\LOG'
GO

RLF

"Steve Ikard" wrote in message

> When SQL Server 2005 was originally installed by previous IT guy he
> accepted
> all defaults for location of files. Now all new databases and logs will
> be
> created on C: instead of D: and C: is System partition and does not have
> enough space for databases and logs. How do I tell SQL to redirect all
> new
> dbs and logs to DConfused I can't find anything in kb or books online about
> redirecting after installation. I can find only articles on moving dbs
> for
> disk failures etc. Where is there documentation on redirecting for future
> databases and logs? Thanks!

 >> Stay informed about: Redirect SQL 2005 data & log files to another partition 
Back to top
Login to vote
bass_player

External


Since: Oct 02, 2008
Posts: 4



(Msg. 3) Posted: Tue Nov 04, 2008 9:25 pm
Post subject: Re: Redirect SQL 2005 data & log files to another partition [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Another way to do it is to change the location of your model database. Any
settings in the model database will be applied to any new databases created
if you accept the defaults. You would have to move the existing databases
to another partition manually

"Russell Fields" wrote in message

> Steve,
>
> In SQL Server Management Studio, right click on server name and choose
> Properties. The Database Settings tab has the entries for the default
> database and log locations. This will affect future database creation.
>
> If you are curious, these values are not stored in the database, but in
> the registry. E.g.
>
> USE [master]
> GO
> EXEC xp_instance_regwrite N'HKEY_LOCAL_MACHINE',
> N'Software\Microsoft\MSSQLServer\MSSQLServer', N'DefaultData', REG_SZ,
> N'D:\DATA'
> GO
> EXEC xp_instance_regwrite N'HKEY_LOCAL_MACHINE',
> N'Software\Microsoft\MSSQLServer\MSSQLServer', N'DefaultLog', REG_SZ,
> N'D:\LOG'
> GO
>
> RLF
>
> "Steve Ikard" wrote in message
>
>> When SQL Server 2005 was originally installed by previous IT guy he
>> accepted
>> all defaults for location of files. Now all new databases and logs will
>> be
>> created on C: instead of D: and C: is System partition and does not have
>> enough space for databases and logs. How do I tell SQL to redirect all
>> new
>> dbs and logs to DConfused I can't find anything in kb or books online about
>> redirecting after installation. I can find only articles on moving dbs
>> for
>> disk failures etc. Where is there documentation on redirecting for
>> future
>> databases and logs? Thanks!
>
>
 >> Stay informed about: Redirect SQL 2005 data & log files to another partition 
Back to top
Login to vote
Display posts from previous:   
   Database Forums (Home) -> Setup All times are: Pacific Time (US & Canada)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]