Avatar of dbaSQL
dbaSQL
Flag for United States of America asked on

Rebuild system databases - failure - need an assist

One of my customers inadvertently removed a drive from the server, where all of the system databases log files were sitting.  I am in the process of trying to rebuild the system databases first, so that I can restore them from backups.  My statement is below.  It fails every time with this error:

Exit message:    The Windows account [/SAPWD=XXXXX] does not exist and cannot be provisioned as a SQL Server system administrator.

This is my statement -- I am running cmd prompt as administrator -
Setup /QUIET /ACTION=REBUILDDATABASE /INSTANCENAME=MSSQLSERVER /SQLSYSADMINACCOUNTS = domainname\me [/SAPWD=XX]


BOL very clearly states this should be the password of the sa account -- which it is.  The customer is certain it is, anyway.  Are there any other ways around this? For example, can another admin account be used?  

Very critical.  Please advise.
DatabasesMicrosoft SQL ServerMongoDB

Avatar of undefined
Last Comment
dbaSQL

8/22/2022 - Mon
Patrick Bogers

Hi

Any (sql) sysadmin Will do the job, not just SA.
Is the sql server installed with mixed login methods?
It is good to trust the customer but checking them is better, can you logon to the sql server with SA/xxxx?
dbaSQL

ASKER
Looking at the statement as I posted it, I believe I was incorrectly giving the sa password, when I was using my own login as the sqlsysadminaccounts.  I changed it to my own password, and it fails with this message:

 The Windows account [/SAPWD=mypassword] does not exist and cannot be provisioned as a SQL Server system administrator.

My password contains a cap, five lowercases lettrs, 2 numbers and 2 exclamation points.  Am I correct to use the password for my account, rather than sa, and does it need to be in quotes?


Setup /QUIET /ACTION=REBUILDDATABASE /INSTANCENAME=MSSQLSERVER /SQLSYSADMINACCOUNTS = domainname\me [/SAPWD=XX]


there is no login available yet, as the system databases will not recover -- because all of their log files are gone -- and the server won't start up.  I need assistance with this rebuild statement.
dbaSQL

ASKER
Is the rebuild statement properly formatted?  Does the sqlsysadminaccounts or the password need to be enclosed in quotes?


Setup /QUIET /ACTION=REBUILDDATABASE /INSTANCENAME=MSSQLSERVER /SQLSYSADMINACCOUNTS = domainname\me [/SAPWD=XX]
Your help has saved me hundreds of hours of internet surfing.
fblack61
ASKER CERTIFIED SOLUTION
dbaSQL

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
Patrick Bogers

Good find.
dbaSQL

ASKER
I corrected my own error.  Please close the ticket.