I installed SharePoint server 2010 recently on a test server. It was installed in standalone mode.
After the installation, I realized that it had installed SQL Server Express 2008 (10.0.2531.0) automatically as well.
I need to know the password for the sa user of this SQL server instance that it automatically installed. (I was not prompted for a password during the SharePoint installation)
Reason that I need the sa password of the SharePoint SQL instance:
SharePoint is working without any issues. However, I need to create a new login on the SQL server and give it permissions to some of the databases.
I can login to the SQL server using Windows Authentication. However, using this login, I do not have permissions to create a new login.
I need to create a new login in order to complete the steps mentioned here:
51 Answer
Here are the steps I did to fix this:
- Login to the SQL Server using a local account which has administrative privileges account (eg: .\Administrator)
- Once you have logged into Windows, open SQL Management Studio
- Connect to the SharePoint SQL instance using
Windows Authentication - Enable Mixed Mode Authentication (this is not enabled by default for the SharePoint SQL instance)
- Set a password for the
saaccount - Enable the
saaccount - Restart the SQL instance (required due to change in authentication mode)
Enabling Mixed Mode Authentication:
- Right click on the SQL server instance
- Click on
Properties - Click on
Securityon the left pane - Click on SQL Server and
Windows Authentication Modeunder theServer authenticationsection
You can also use the following SQL query to do the same:
EXEC xp_instance_regwrite N'HKEY_LOCAL_MACHINE', N'Software\Microsoft\MSSQLServer\MSSQLServer', N'LoginMode', REG_DWORD, 2[Note: 2 indicates mixed mode authentication. 1 is for windows only authentication]
Setting a password on the sa account:
- Under the SQL instance, expand
SecurityandLogins - Right click on
saand click onProperties - Type the new password in the
PasswordandConfirm Passwordboxes
You can also use the following SQL query to do the same:
ALTER LOGIN [sa] WITH PASSWORD='newpassword', CHECK_POLICY=OFF[Note: CHECK_POLICY=OFF ensures that Windows password policies of the computer on which SQL Server is running will NOT be enforced on this login]
Enabling the sa account:
- Under the SQL instance, expand
SecurityandLogins - Right click on
saand click onProperties - Click on
Statuson the left pane - Click on
Enabledunder theLoginsection
You can also use the following SQL query to do the same:
ALTER LOGIN [sa] ENABLE 2