使用sa登录SQL2005

在默认情况下,我们只能使用Windows Authentication验证登录SQL2005,我们想用sa登录怎么办呢?
微软没有提供修改SQL2005 sa密码的工具。
下面将讲解如何用sa登录SQL2005

  1. 使用Windows Authentication登录SQL2005
  2. 登录后选择服务器,右键选择属性
  3. 选择安全,将Server Authentication设置为SQL Server and Windows Authentication mode,将Login auditing设置为none
  4. 在服务器下方,选择安全文件夹,在Logins中找到sa用户,右键属性,找到Enforece password police,将勾去掉
  5. 打开查询分析器,输入以下语句
   
exec sp_password null,null,'sa'
alter sa enable
设置完成后,断开连接,然后就可以用SQL Server Authentication验证,用sa登录了
posted @ 2007-10-27 14:28  神奇小子  阅读(669)  评论(0编辑  收藏  举报