How can I change from SQL Server Windows mode to mixed mode (SQL Server 2008)?

后端 未结 7 1006
时光取名叫无心
时光取名叫无心 2020-11-27 14:25

I have installed SQL Server 2008 Express Edition, but by mistake I kept the Windows authentication mode.

Now I want to change that to SQL Server mixed mode. How can

相关标签:
7条回答
  • 2020-11-27 14:35

    Open the registry and search for key LoginMode under:

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server
    

    Update the LoginMode value as 2.

    0 讨论(0)
  • 2020-11-27 14:43
    1. Open up SQL Server Management Studio and connect to your database server.
    2. Right Click The Database Server and click Properties.
    3. Set the Server Authentication to SQL Server and Windows Authentication Mode.
    0 讨论(0)
  • 2020-11-27 14:44

    You can do it with SQL Management Studio -

    Server Properties - Security - [Server Authentication section] you check Sql Server and Windows authentication mode

    Here is the msdn source - http://msdn.microsoft.com/en-us/library/ms188670.aspx

    0 讨论(0)
  • 2020-11-27 14:46

    I had no success with other attempts on a SQL Server 2012. What I did was use SQL Server Management Studio to generate a script to change the value, and got this:

    USE [master]
    GO
    EXEC xp_instance_regwrite N'HKEY_LOCAL_MACHINE', N'Software\Microsoft\MSSQLServer\MSSQLServer', N'LoginMode', REG_DWORD, 2
    GO
    

    After that, I enabled the sa account using this:

    ALTER LOGIN sa ENABLE ;
    GO
    ALTER LOGIN sa WITH PASSWORD = '<strongPasswordHere>' ;
    GO
    

    ...then, I restarted the service, and everything worked!

    0 讨论(0)
  • 2020-11-27 14:49

    From this: http://weblogs.sqlteam.com/peterl/archive/2008/06/19/How-to-change-authentication-mode-in-SQL-Server.aspx

    One can catch that you may change it through windows registry key

    (SQLEXPRESS instance):
    
    "Software\Microsoft\Microsoft SQL Server\SQLEXPRESS\LoginMode" = 2
    

    ... and restart service

    0 讨论(0)
  • 2020-11-27 14:51

    If the problem is that you don't have access to SQL Server and now you are using mixed mode to enable sa or grant an account admin privileges, then it is far easier just to uninstall SQL Server and reinstall.

    0 讨论(0)
提交回复
热议问题