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
  • 相关阅读:
    mac OS 截图方法
    MAC OS上JAVA1.6 升级1.7,以及 maven3.2.1配置
    maven 安装设置方法
    STemWin移植
    uIP使用记录
    define宏定义细节及uCOS中宏定义技巧
    实验室播放视频步骤
    光通信零碎知识
    论文笔记6
    OFDMA
  • 原文地址:https://www.cnblogs.com/guojin705/p/1800777.html
Copyright © 2011-2022 走看看