Home Database Mysql Tutorial sqlserver 2005 忘记sa用户密码的解决方式

sqlserver 2005 忘记sa用户密码的解决方式

Jun 07, 2016 pm 03:45 PM
sqlserver password forget Way user solve

SQLSERVER 2005登录时发现忘记sa登录密码不记得啦,在网上找到这个解决方案: 在sql 2005中, sa登录是可以禁用的, 因此, 楼主的这个问题可以照下面的步骤解决: 1. 用Windows身份验证登陆(这个应该是不会存在问题的, 在新安装好实例(SQL Server)的情况下, Win

SQLSERVER 2005登录时发现忘记sa登录密码不记得啦,在网上找到这个解决方案:

在sql   2005中,   sa登录是可以禁用的,   因此,   楼主的这个问题可以照下面的步骤解决:  

   
  1.   用Windows身份验证登陆(这个应该是不会存在问题的,   在新安装好实例(SQL   Server)的情况下,   Windows身份验证是不可能被禁用的(安装过程中没有可以设置禁用Windows身份验证的地方)  
        Manage   Studio   --   菜单"文件"--"连接对象资源管理器",   身份验证中选择"Windows   Authentication"  
   
  2.   连接成功后,   右键你的实例,   选择"属性"  
   
  3.   在"属性"窗口中,   转到"Security"(安全性)项,   在"服务器身份验证"中设置为"SQL   Server和Windows身份验证模式",   确定,   根据提示,   你应该重新启动sql服务  
   
  4.   重新启动sql服务后,   照用Windows身份验证连接,   然后执行下面的语句启用sa用户,   同时清除sa的密码(能成功登陆后再根据你的需要设置)  
   
  EXEC   sp_password   null,null,'sa'  
   
  ALTER   LOGIN   sa   ENABLE  
   
   

  5.   语句执行完成后,   再用sa连接你的实例,   应该就没有问题了.

 

参考此解决方案,可考虑通过windows验证登陆后修改sa密码,

通过命令修改:sp_password null,‘sa的最新密码','sa'  -- 密码要够复杂, 旧密码指定为null, 表示强制修改密码

通过management studio--security--logins--sa用户,右键属性设置新密码

设置"服务器身份验证"中设置为"SQL   Server和Windows身份验证模式",重新启动sqlserver服务后可用重新设置的密码登陆就OK啦

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Repo: How To Revive Teammates
1 months ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

How to solve the problem that the object named already exists in the sqlserver database How to solve the problem that the object named already exists in the sqlserver database Apr 05, 2024 pm 09:42 PM

For objects with the same name that already exist in the SQL Server database, the following steps need to be taken: Confirm the object type (table, view, stored procedure). IF NOT EXISTS can be used to skip creation if the object is empty. If the object has data, use a different name or modify the structure. Use DROP to delete existing objects (use caution, backup recommended). Check for schema changes to make sure there are no references to deleted or renamed objects.

How to solve the problem that Windows 11 prompts you to enter the administrator username and password to continue? How to solve the problem that Windows 11 prompts you to enter the administrator username and password to continue? Apr 11, 2024 am 09:10 AM

When using Win11 system, sometimes you will encounter a prompt that requires you to enter the administrator username and password. This article will discuss how to deal with this situation. Method 1: 1. Click [Windows Logo], then press [Shift+Restart] to enter safe mode; or enter safe mode this way: click the Start menu and select Settings. Select "Update and Security"; select "Restart Now" in "Recovery"; after restarting and entering the options, select - Troubleshoot - Advanced Options - Startup Settings -&mdash

How to import mdf file into sqlserver How to import mdf file into sqlserver Apr 08, 2024 am 11:41 AM

The import steps are as follows: Copy the MDF file to SQL Server's data directory (usually C:\Program Files\Microsoft SQL Server\MSSQL\DATA). In SQL Server Management Studio (SSMS), open the database and select Attach. Click the Add button and select the MDF file. Confirm the database name and click the OK button.

How to set router WiFi password using mobile phone (using mobile phone as tool) How to set router WiFi password using mobile phone (using mobile phone as tool) Apr 24, 2024 pm 06:04 PM

Wireless networks have become an indispensable part of people's lives in today's digital world. Protecting the security of personal wireless networks is particularly important, however. Setting a strong password is key to ensuring that your WiFi network cannot be hacked by others. To ensure your network security, this article will introduce in detail how to use your mobile phone to change the router WiFi password. 1. Open the router management page - Open the router management page in the mobile browser and enter the router's default IP address. 2. Enter the administrator username and password - To gain access, enter the correct administrator username and password in the login page. 3. Navigate to the wireless settings page - find and click to enter the wireless settings page, in the router management page. 4. Find the current Wi

What to do if the sqlserver service cannot be started What to do if the sqlserver service cannot be started Apr 05, 2024 pm 10:00 PM

When the SQL Server service fails to start, here are some steps to resolve: Check the error log to determine the root cause. Make sure the service account has permission to start the service. Check whether dependency services are running. Disable antivirus software. Repair SQL Server installation. If the repair does not work, reinstall SQL Server.

How to check sqlserver port number How to check sqlserver port number Apr 05, 2024 pm 09:57 PM

To view the SQL Server port number: Open SSMS and connect to the server. Find the server name in Object Explorer, right-click it and select Properties. In the Connection tab, view the TCP Port field.

Where is the sqlserver database? Where is the sqlserver database? Apr 05, 2024 pm 08:21 PM

SQL Server database files are usually stored in the following default location: Windows: C:\Program Files\Microsoft SQL Server\MSSQL\DATALinux: /var/opt/mssql/data The database file location can be customized by modifying the database file path setting.

How to recover accidentally deleted database in sqlserver How to recover accidentally deleted database in sqlserver Apr 05, 2024 pm 10:39 PM

If you accidentally delete a SQL Server database, you can take the following steps to recover: stop database activity; back up log files; check database logs; recovery options: restore from backup; restore from transaction log; use DBCC CHECKDB; use third-party tools. Please back up your database regularly and enable transaction logging to prevent data loss.

See all articles