忘记 SQL Server 密码 [英] Forgot SQL Server Password

查看:34
本文介绍了忘记 SQL Server 密码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我前段时间安装了 SQL Server 2005,但忘记了我在安装过程中设置的管理员密码.我现在如何连接到 SQL 服务器?

I installed SQL Server 2005 sometime ago and forgot the administrator password I set during setup. How can I connect to SQL server now?

我想我只允许 Sql Server 身份验证.使用集成安全登录也不起作用.

I think I only allowed Sql Server Authentication. Login with integrated security also does not work.

推荐答案

尝试在命令提示符下运行以下命令(假设您的服务器名称是 SQLEXPRESS):

Try running the following commands at the command prompt (assuming your Server name is SQLEXPRESS):

osql -E -S .\SQLEXPRESS
exec sp_password @new='changeme', @loginame='sa'
go
alter login sa enable
go
exit

完成这些步骤后,尝试使用用户名 sa 和密码 changeme 登录.

Once you have completed these steps, try to login with username sa and password changeme.

这篇关于忘记 SQL Server 密码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆