Here, MSSQLServer is the instance name, SQLSYSADMINACCOUNTS is the system administrator user, SAPWD is the password, and CollationName is the collation used. Setup /QUIET /ACTION=REBUILDDATABASE /INSTANCENAME=MSSQLServer /SQLSYSADMINACCOUNTS=sa /SAPWD= MyP983”#3 /SQLCOLLATION=Latin1_General_CI_AS In the SQL Server installer, look for the setup.exe and run the following command: There is an option to rebuild the database using the command line. Restore database master from disk = ‘c:\stellarbackups\master.bak’ with replace Rebuild the Master Database Here, MSSQLSERVER is the server’s name, -E is to connect with Windows Authentication, -S is to provide the instance name, and -d is to specify the database to connect.įinally, run the below restore command to restore the database. Once the database is in single-user mode, you can connect with the SQLCMD and restore the database by using the following command: The second line will start the SQL Server instance in single-user mode. Use the correct SQL Server instance name. The first line is to stop the SQL Server. If you prefer to set the SQL Server instance in single-user mode using the command line, run the following commands. Optionally, you can use the -f start option to set the instance with minimal configurations. Here, -m is used to set the instance to single-user mode.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |