Link to home
Start Free TrialLog in
Avatar of Michael Pfister
Michael PfisterFlag for Germany

asked on

Unable to add local administrators group while installing SQL 2014 Express via SCCM

Trying to install SQL 2014 Express (English) via SCCM on German Windows 10 1803 on multiple computers.

Problem: local admin group won't get added to the sysadmin group in SQL, therefore any user is unable to access the tables or add permissions.

Tried setup via command line:

setup.exe /Q /IACCEPTSQLSERVERLICENSETERMS /ACTION=install /FEATURES=SQLEngine,Tools /INSTANCENAME=SQLExpress /ERRORREPORTING=0 /SQMREPORTING=0 /UpdateEnabled=0 /SQLSYSADMINACCOUNTS="[b]VORDEFINIERT\Administratoren[/b]" /ADDCURRENTUSERASSQLADMIN=0

Open in new window


or

setup.exe /Q /IACCEPTSQLSERVERLICENSETERMS /ACTION=install /FEATURES=SQLEngine,Tools /INSTANCENAME=SQLExpress /ERRORREPORTING=0 /SQMREPORTING=0 /UpdateEnabled=0 /SQLSYSADMINACCOUNTS="[b]BUILTIN\Administrators[/b]" /ADDCURRENTUSERASSQLADMIN=0

Open in new window


First command line works when run on a command prompt, but not when deployed via SCCM.

Next I've tried the ConfigurationFile.ini. After recording the ini-file via
setup.exe /Action=Install /UIMode=Normal 

Open in new window

it shows:
SQLSYSADMINACCOUNTS="[b]VORDEFINIERT\Administratoren[/b]"

Open in new window


But after installing it via command prompt
setup.exe /ConfigurationFile="ConfigurationFile.ini"

Open in new window

sysadmins is again empty.

Same result when I change ConfigFile.ini to
SQLSYSADMINACCOUNTS="[b]BUILTIN\Administrators[/b]"

Open in new window

Avatar of Leon Taljaard
Leon Taljaard
Flag of South Africa image

Hi Michael,

Have you tried using the following PowerShell App Deployment Toolkit to deploy the SQL 2014 Express?

It Might deploy better and actually add the local admins
Avatar of Michael Pfister

ASKER

Hi Leon,

thanks for your suggestion, but I don't think its a problem of the wrapper.
After the setup we are unable to add any user to the SQL sysadmin, because there is no sysadmin... deadlock

If I setup SQL Express manually I can add the local  admin group and its in the sysadmin after the setup completes.
Hi Michael,

I thought it was that it worked via command line but not through SCCM? The deployment toolkit can be used as a application or package within SCCM and deployed.

So was thinking if you mention that it works via command line it might work when deployed and run via PowerShell through SCCM.
I guess at the time it worked I had ADDCURRENTUSERASSQLADMIN set to true. The setup added my interactive user to the sysadmin group.
I interpreted this as success... after setting the value to false it dosn't work manually or with SCCM...
ADDCURRENTUSERASSQLADMIN = true won't help during SCCM installation .. there is no current user it could add
Maybe I should close this question and start another one including the new findings. I'm still testing and it seems its not an issue with SCCM
No Problem Michael
ASKER CERTIFIED SOLUTION
Avatar of Michael Pfister
Michael Pfister
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
For anyone having the same problem: definitely looks like a problem with SQL Express 2014 setup.
It only works when setting ADDCURRENTUSERASSQLADMIN to "true" and run the installer batch interactively.