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 can I set "Database Default Location" during unattended sql server installation Expand / Collapse
Author
Message
Posted Thursday, April 16, 2009 2:26 AM


SSC-Enthusiastic

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

Group: General Forum Members
Last Login: Wednesday, December 17, 2014 2:44 AM
Points: 128, Visits: 1,141
hi,

Is there a way to set "Database Default Location" during unattended sql server installation ?

(Database Default location can be displayed in "Database settings" in Server Properties)



Kindest Regards,

egpotus DBA

Post #698210
Posted Thursday, April 16, 2009 2:57 AM
SSCarpal Tunnel

SSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal Tunnel

Group: General Forum Members
Last Login: Tuesday, December 9, 2014 5:31 AM
Points: 4,429, Visits: 4,183
You have to use the INSTALLSQLDATADIR parameter. Problem is that this will only accept one directory for data and log files.
In case you want to have separate loctions for data and log I would advise run a post install script.
For Datafiles:
EXEC master..xp_instance_regwrite N'HKEY_LOCAL_MACHINE', N'SOFTWARE\Microsoft\MSSQLServer\MSSQLServer',N'DefaultData', REG_SZ,'D:\MSSQL.1\MSSQL\DATA\'

For Logfiles:
EXEC master..xp_instance_regwrite N'HKEY_LOCAL_MACHINE', N'SOFTWARE\Microsoft\MSSQLServer\MSSQLServer',N'DefaultLog', REG_SZ,'E:\MSSQL.1\MSSQL\LOG\'



Markus Bohse
Post #698225
Posted Thursday, April 16, 2009 3:10 AM


SSC-Enthusiastic

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

Group: General Forum Members
Last Login: Wednesday, December 17, 2014 2:44 AM
Points: 128, Visits: 1,141
thank you


Kindest Regards,

egpotus DBA

Post #698231
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse