你如何重置SA密码? [英] How do you reset the SA password?

查看:37
本文介绍了你如何重置SA密码?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你到底是如何重置 sa 密码的?我知道如何进入对话框并重置密码.这就是我现在要问的.它比点击、点击、新密码、完成更深入一点!

我不知道 SA 密码是什么.这台机器的前用户也没有.以前的用户说他从来没有在这台机器上运行过 SQL Express.

当我尝试创建一个新数据库并被告知我没有这样做的权限时,这个旅程就开始了.好的,我决定只给自己适当的权限.不,我不能给自己或其他任何人权限.

我尝试使用 SSMS 更改密码.我收到一条消息,说我无权更改它.

我尝试使用以下 SQL 脚本.同样,没有权限.

GOALTER LOGIN [sa] WITH DEFAULT_DATABASE=[master]走使用 [大师]走ALTER LOGIN [sa] WITH PASSWORD=N'NewPassword' MUST_CHANGE走

数据库是 SQL Server 2008 Express (10.0.2531.0).SQL Server Management Studio 是 SSMS 2008.操作系统是 Windows 7 Enterprise我是本地管理员和域用户.我创建了一个用于登录 SSMS 的本地管理员帐户机器在域中.我连接到我们的网络数据库服务器没有问题.

有什么建议吗?这可能是一个简单的修复.谢谢...

解决方案

这应该会有所帮助:以单用户模式启动 SQL Server.这将允许本地管理员作为 sysadmin 固定服务器角色进行连接.可以在此处找到有关如何执行此操作的详细说明.>

How on earth do you reset the sa password? I know how to go into the dialogs and reset a password. That's now what I'm asking about. It runs a little deeper than just click, click, new password, done!

I have no idea what the SA password is. Nor does the previous user of this machine. The previous user says he never had SQL Express ever running on this machine.

This journey started when I tried to create a new database and was told I didn't have permissions to do so. Okay, I decided to just give myself the appropriate permissions. Nope, I can't give myself nor anyone else permissions.

I tried changing the password using SSMS. I get a message saying I don't have permissions to change it.

I tried using the following SQL script. Again, no permissions.

GO
ALTER LOGIN [sa] WITH DEFAULT_DATABASE=[master]
GO
USE [master]
GO
ALTER LOGIN [sa] WITH PASSWORD=N'NewPassword' MUST_CHANGE
GO

The database is SQL Server 2008 Express (10.0.2531.0). SQL Server Management Studio is SSMS 2008. OS is Windows 7 Enterprise I'm a local admin, and a domain user. I created a local admin account for logging into SSMS Machine is on a domain. I have no problems connecting to our network database servers.

Any suggestions? This could be a simple fix. Thanks...

解决方案

This should help: start SQL Server in single-user mode. This will allow local administrators to connect as a sysadmin fixed server role. A detailed description of how to do this can be found here.

这篇关于你如何重置SA密码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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