2

I am trying to install SQL server 2008 express on windows 7 64 bit machine using the following command:

Setup.exe /qs /Action=Install /Features=SQL /InstanceName=XXX /SQLSYSADMINACCOUNTS="Builtin\Administrators" /SQLSVCACCOUNT="NT AUTHORITY\SYSTEM"

I can not access the database and get "access denied" error. I narrowed down the issue to the /SQLSYSADMINACCOUNTS="Builtin\Administrators" parameter not working. When I change this parameter value to currnet user or try manual install it works

slugster
  • 49,403
  • 14
  • 95
  • 145

3 Answers3

4

I use this and it works:

Setup.exe /q /ACTION=Install /SkipRules=VSShellInstalledRule RebootRequiredCheck /HIDECONSOLE /FEATURES=SQL /INSTANCENAME=xxx /SECURITYMODE="SQL" /SQLSVCACCOUNT="NT AUTHORITY\SYSTEM" /SAPWD="XXXXXXXXX" /SQLSYSADMINACCOUNTS="BUILTIN\ADMINISTRATORS" /ENABLERANU=1 /AGTSVCACCOUNT="NT AUTHORITY\SYSTEM" /TCPENABLED=1 /ERRORREPORTING=1 
Cosmin
  • 21,216
  • 5
  • 45
  • 60
IK-ivan
  • 41
  • 2
0

You can set the correct arguments by using the ConfigurationFile.ini file in which been created when you go through the normal SQL Server setup procedure in last step before installing. Just copy the path of this file which appears below the screen and copy/paste the configuration arguments you need.

You'll notice that the SQLSYSADMINACCOUNTS argument been set to your local administrator account, replace it like this SQLSYSADMINACCOUNTS="BUILTIN\ADMINISTRATORS"

setup.exe /Action="Install" /QUIETSIMPLE="False" /ERRORREPORTING="True" /INDICATEPROGRESS="False"  /INSTANCENAME="SQLEXPR2008" /FEATURES="SQLENGINE" /AGTSVCSTARTUPTYPE="Automatic" /ISSVCACCOUNT="NT AUTHORITY\NetworkService" /ASSVCSTARTUPTYPE="Automatic" /SQLSVCSTARTUPTYPE="Automatic" /SQLSVCACCOUNT="NT AUTHORITY\SYSTEM" /SQLSYSADMINACCOUNTS="BUILTIN\ADMINISTRATORS"
A Ghazal
  • 2,693
  • 1
  • 19
  • 12
0

I think it will work if you use the 'domain' qualified Administrators account name instead of the generic moniker. Eg. like <hostname>\Administrators where is the machine name where the instance is installed (since is the name of the NT domain in this case).

If it doesn't work, you can always run the setup with current user under /SQLSYSADMINACCOUNTS and have a post-setup step that adds the local administrators to sysadmin.

Remus Rusanu
  • 288,378
  • 40
  • 442
  • 569
  • Thanks for the reply. I tried \Administrators, did not work. I tried to do post-setup using sqlcmd, it complains - user do not have permission to perform this action. Any idea? – Balaram Palasamudrum Apr 15 '10 at 15:47
  • I still love to hear the real solution for this, but I resolved this issue by using parameter /SQLSYSADMINACCOUNTS="%USERDOMAIN%\Users", this is ok since the DB is used only by our app and does not raise any red flags from the users. – Balaram Palasamudrum Apr 15 '10 at 21:20