Help, MSSQLSERVER SA password forgotten

Category: MS-SQL Server -> Foundation Classes Author: dlsnow Date: 2008-09-16 14:40:21
 
dlsnow
2008-09-16 14:40:21
I MSSQLServer on the unit sa password forgot ah?
There any way to recover it?
AIRUSHAONIAN
2008-09-16 14:57:17


I forgot the sa password. How I can reset it?
-------------------------------- -------------------

Answer:

To reset the sa password, you ; can make the following:

1. Login to the SQL Server box as the Administrator.
2. Run SQL ; Server Enterprise Manager.
3. Right-click the server name and choose 'Edit SQL Server Registration properties'.
4. Choose ; 'Use Windows authentication' and click OK button.
5. Expand a server, expand a Security and click Logins.
6. Double-click the sa login and specify new password on the General tab.
renren2043
2008-09-16 15:01:19
1. Try
canceled your operating system, with administrator login

Query Analyzer - Connect using "windows authentication" - if this can be successful, you execute the following statement to modify the sa password
sp_password null, 'new password', 'sa'

2. rebuilt not on your master database
changyanghong
2008-09-16 15:03:58
window user-friendly way to go, in the Enterprise Manager The sa password changed back, this method seems to be. Try
sh308960306
2008-09-16 15:06:52
I do not want to change your password, there is no way to get it back to the original password?
liupeizong
2008-09-16 15:23:48
original password is found again. Because SQL for password encryption algorithm is irreversible.

so you still use windows authentication to change sa password into it.
a779500029
2008-09-16 15:38:25
the following from the Microsoft Web site

Q: I put my own In SQL Server shut out, and not as a "sysadmin" login. Is there any way around this? I need to reinstall SQL Server do?

A: You do not have to reinstall SQL Server. To regain access to SQL Server, you need to modify the SQL Server 2000 and SQL Server 7.0 SQL Server Authentication mode decision registry keys.

In SQL Server 7.0, the key is:
HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ MSSQLServer \ MSSQLServer \ LoginMode
in SQL Server 2000, the key is:
HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \
MicrosoftSQLServer \ \ MSSQLServer \ LoginMode
"LoginMode" has a value of 0 indicates that only the identity of Windows authentication, 1 means authentication mode to Mixed Mode. When you shut yourself out, you can put "LoginMode" to 1, restart SQL Server, and then sa (system administrator) logged enter you know sa password.

following information about the SQL Server role membership information may help you understand why you'd recognize himself in SQLServer outside. After you install SQL Server 2000 or 7.0 when the installation process automatically as "BUILTIN \ Administrators" to create a login account, the account is "sysadmin" role members. "BUILTIN \ Administrators" login account on behalf of the Microsoft Windows ® 2000 or Microsoft Windows NT ® server administrator on the local group. Windows 2000 or Windows NT "Administrator" account is a member of the Administrators local group. Additionally, if your server is a domain member (including Windows 2000 domain and a Windows NT 4.0 domain), "Domain Admins" global group will also become a member of the local Administrators group. This means that the system administrator local group, all members automatically get on the SQL Server "sysadmin" permissions.

To enhance your SQL Server security, you may prefer to create your own group and grant it the "sysadmin" permissions, and then delete the "BUILTIN \ Administrators" login account, or at least From the "sysadmin" server role to delete it. Using this method, you can be better for who can access your SQL Server control. This method also disconnected the SQL Server system administrator and Windows 2000 or Windows NT administrator linkages between, since they usually have different tasks and require different permissions. To enhance security, you may want to configure SQL Server to support only Windows authentication. However, we must remember: This configuration will disable your "sa" account. (This approach may be to disable "sa" account's unique approach, because you can not delete "sa" account.) If you are in the wrong order implemented the security measures, you will no longer be in> "sysadmin" log on to SQL Server, unless as I said above method to modify registry keys. The correct order is:

create Windows 2000 or Windows NT user groups and assign a group member. For example: create a file called "SQLAdmins" group.
the "SQLAdmins" is mapped to a SQL Server in Windows Authentication mode using authenticated login account and put the account assigned to the "sysadmin" server role.
remove "BUILTIN \ Administrators" login account, or remove it from the "sysadmin" server role to delete.
the SQL Server authentication mode to "Windows authentication only."
restart the SQL Server authentication mode to reflect the change.
NOTE: If you are following this the wrong order to implement these steps: Delete "BUILTIN \ Administrators" login account, change the SQL Server authentication mode is "only for Windows authentication" and then restart SQL Server, then the "sa" account is disabled, and because there is no definition of other Windows authentication login account and can not enter SQL Server. To avoid this from happening, in the correct order to implement these safety measures
zhoujing111
2008-09-16 15:51:56
Stop sql server database copy out their own applications, to delete sql server, re-install sql server, database, and then use
sp_attachdb procedure to import