Sunday, March 3, 2013

ASP.Net Web Matrix: Change SQL Espress Authentication and Enable SA from the Command Prompt

how to use joomla with sql server express using web matrix2 


  When SQL Server Express is installed with default options it is setup with Integrated Windows Security and the SA (Administrator) account disabled, for example when installed as part of Visual Studio. Additionally, in many cases the SQL Server Management Studio Express is not installed, so that a graphical interface to change to a Mixed Security and enabled SA account does not exist. Many of the ASP.Net templates integrate into ASP.Net Web Matrix like Umbraco and SrewTurn Wiki require this Mixed Security scenario, so here are the steps to change from Integrated to Mixed Security and enable the SA account with a password from the command prompt. This is assuming SQL Server Express 2008 R2, the step 4 key is slightly different with 2008/2005 installs.

1. Launch cmd.exe to enter Command Prompt

2. Run net stop MSSQL$SQLEXPRESS

 3. Run regedit

4. In the Registry Editor change the key HKEY_LOCAL_MACHINE\Software\Microsoft\Microsoft SQL Server\MSSQL10_50.SQLEXPRESS\MSSQLServer\LoginMode value to 2.

 5. Close Registry Editor and return to Command Prompt

6. Run net start MSSQL$SQLEXPRESS

 7. Run SQLCMD –S .\SQLEXPRESS

8. Enter alter login 'sa' enable

9. Enter alter login 'sa' with password ='MyPassword'

10. Close the Command Prompt, you are done

 for sqlexpress 2012 do the following

 8. Enter alter login [sa] enable go

 9. Enter alter login [sa] with password =N'passwordhere' go

10. Close the Command Prompt, you are done now you will be able to install joomla , wordpress , drupal , ets ... with sql server

 references
 http://joeblog.homnick.com/Lists/Posts/Post.aspx?List=db4a6966-2b11-448d-a4ba-1550e74c89ba&ID=65 http://forums.asp.net/t/1861816.aspx/1?SqlServer+Authentication+

No comments:

MS in Computer Science with paid training in USA company