0

I want to install SQL Server Express 2022 via silent install (unattended).

However I want to create the instance to use mixed mode but not the sa account.

I saw /SECURITYMODE=SQL but it seems that parameter only uses the sa account.

Can you not use a different account (user) / password other than sa during a silent install?

We have used a silent install command parameters but it creates the instance as Windows authentication:

/x:%SystemDrive%\SQLEXPRADV_x64_ENU 
/Q /IACCEPTSQLSERVERLICENSETERMS /HIDECONSOLE=1 /UPDATEENABLED=0 
/ACTION=Install /FEATURES=SQL,Tools 
/SQLSVCACCOUNT="NT AUTHORITY\SYSTEM" 
/SQLSYSADMINACCOUNTS="BUILTIN\ADMINISTRATORS" "NT AUTHORITY\SYSTEM" 
/INSTANCENAME=[SQL_INSTANCE_NAME]`

But I would like to install the instance as mixed mode but not using the sa account. During our install we ask if they want to install via Windows authentication or mixed mode, if they choose mixed mode we provide an edit box for the username and the password.

So I would like to use the username and password they have provided.

Any ideas?

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
SteveOG
  • 1
  • 1
  • 1
    Been a while, but I don't think you can drop the SA account, but you can disable it https://learn.microsoft.com/en-us/answers/questions/472207/correct-way-to-disable-login-for-sa-account – John Cappelletti May 15 '23 at 18:58
  • 3
    Create the user SQL account after installation with `CREATE LOGIN` with the name and password. Use `ALTER SERVER ROLE sysadmin ADD MEMBER YourUser` if the login needs sysadmin permissions. You can also disable the sa account, if desired. – Dan Guzman May 15 '23 at 19:05
  • https://stackoverflow.com/questions/642673/can-i-remove-sa-login-from-sql-server – granadaCoder May 15 '23 at 19:22

0 Answers0