更改SQL Server的密码 [英] Changing Password of SQL Server

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

问题描述

我想在我的Windows应用程序中应用一个工具,用户可以通过该工具检索SQL Server的密码(如果忘记了它),并且可以根据需要更改密码SQL Server。我不知道该怎么做这个任务。我需要帮助。

我使用C#2.0和SQL Server 2005开发了我的应用程序

解决方案

我想你正在寻找 [MSDN] SqlConnection.ChangePassword方法 [ ^ ]。


你做不到。

首先,密码在服务器上进行哈希处理,因此您无法以纯文本形式获取密码。

接下来,如果你忘了密码,他怎么能够登录并更改密码????这是管理员的目的。

但是你可以让一个静态用户能够调用 ALTER LOGIN [ ^ ]但我不推荐它;)



希望这就是你在寻找的地方;)

I want to apply a facility in my windows application through which the user can retrieve the password of SQL Server if he forgot it and can change the password SQL Server if required. I don't know how to do this task. I need help.
I developed my application by using C#2.0 and SQL Server 2005

解决方案

I guess you are looking for [MSDN] SqlConnection.ChangePassword Method [^].


You cannot do that.
First of, the password is hashed on the server, so you cannot get it in plain text.
Next, if hi forgot the password, how would he be able to logon and change the password ???? hi cant, thats whats admins are for.
BUT you could have a static user with the ability to call the ALTER LOGIN[^] but i dont recomment it ;)

Hope thats what you where looking for ;)


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

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