zoukankan      html  css  js  c++  java
  • reset sql server express sa password

    sql server 2005 express edition does not supplied enterprise manager , and in some case you have to use sa a to  connect to sql server express. and here is the solution.

    in default installation , authorization method can't be set and the default authorize method is trusted connection with your windows account.

    you need some steps to use sa and chang its password , lets go:

    first , open your registry , changing the authorize method with mixed way which can be find in registry , (open run >regedit ) , find loginMode key under HKLM/software/microsoft/.../MSSQL/..  ,change it's value from 1 to 2

    restart the sql express service ,and this is important


    second , in command prompt , direct to you sql server folder : (like c:\program files\microsoft sqlserver express\bin) , and then type

    c:\program files\microsoft sqlserver express\bin> sqlcmd -E -S .\SQLEXPRESS
    and then return the >prompt
    and then type the follows commands
    >sp_password @new='your_sa_pass',@loginame='sa'
    >go
    >alter login sa enable
    >go
    >alter login sa with password='your_sa_pass' unlock
    >go
    >exit


    if there is no error occurred , your sql server express password has been changed

    so the last step is to test the sa account

    osql -U sa -S .\SQLEXPRESS
    and then enter your new sa password

    note: .\sqlexpress can be replace with your computer name

    good luck
  • 相关阅读:
    Facebook ads_Business Manager
    思维导图学习5——参考书目
    思维导图学习4——技巧2
    思维导图学习3——思维导图示例
    思维导图学习2——思维导图的用途
    思维导图学习1——元素介绍
    广告词条解释
    Twitter OAuth
    Twitter开发2
    Twitter REST API, Streaming API
  • 原文地址:https://www.cnblogs.com/guojin705/p/1800777.html
Copyright © 2011-2022 走看看