Link:

http://sudeeptaganguly.wordpress.com/2010/04/20/how-to-enable-sa-account-in-sql-server/

引用:

When you install the SQL Server using Windows Authentication mode, by default, the “sa” account is disabled. Sometimes, due to users/customers request, you may need to enable the sa account. You need to change the authentication mode for SQL server from Windows Authentication Mode to SQL Server and Windows Authentication Mode to use the sa account.

To Change the Authentication Mode:

Follow the steps mentioned below to change the authentication mode from Windows Authentication to SQL Server and Windows Authentication. You need to remember that, the SQL Server service needs to restart to make this change effective.

1. Login to the SQL server instance using SQL Server Management Studio. Right-click on the database instance, and go to Properties.

2. On the Server Properties page, Click on Security. Click on the radio button next to SQL Server and Windows Authentication mode, and click on OK to close the  Server Properties page.

3. Once you clicked on the Ok button, we will get the following screen:

As discussed earlier, we need to restart the SQL Server service to make this change effective. After restarting the SQL Server, the authentication mode will be changed to SQL Server and Windows Authentication mode.

Enable the sa Login:

1. Connect to the SQL Server instance using SSMS and go to Security. Expand Security, go to Logins.

2.  You can see the sa account is disabled when you install SQL Server using Windows Authentication mode.

3. Right-click on the sa account and go to Login Properties. Specify a complex password for the sa account. By default, the Enforce password policy is checked. (if you don’t want to provide a complex password for the sa account, you can uncheck this option. However, this is not recommended.)

4. Click on the Status page. By default, the sa account will be disabled. Click on the Enabled button to enable the sa account. Click on Ok to close the sa Login Properties.

Thus, sa account is enabled and you will be able to login to the SQL instance using the sa account.

If you want to use a script to enable the sa account, you can use the script mentioned below:

1: USE [master]
2: GO
3: ALTER LOGIN [sa] WITH PASSWORD=N'z43VGYT@Iu*60i'
4: GO
5: ALTER LOGIN [sa] ENABLE
6: GO

最新文章

  1. Mono+Jexus让C#运行在Linux(centos7_x64),学习笔记
  2. tomcat优化
  3. Sublime Text3快捷键以及常用插件
  4. canvas画布在主流浏览器中的尺寸限制
  5. 底部tab的返回退出和对话框
  6. struts_24_基于XML校验的规则、特点
  7. Humble Numbers
  8. 【转】VI/VIM常用命令
  9. flash图标插件
  10. GPS定位,经纬度附近地点查询–C#实现方法
  11. windows sever 2008 r2 - 限制ip访问
  12. Ellipse常用快捷键
  13. Windows移动开发(二)——闭关修炼
  14. [string]字符串中几个比较难的算法和容易搞混的题目
  15. js实现input输入框只能输入数字的功能
  16. Maven导入eclipse缺少web-resources目录
  17. js在函数中未定义的变量的处理
  18. python3中报错:TypeError: 'range' object doesn't support item deletion
  19. ES系列十二、ES的scroll Api及分页实例
  20. Docker save & load

热门文章

  1. Java系列笔记(3) - Java 内存区域和GC机制
  2. Spring+Maven+Dubbo+MyBatis+Linner+Handlebars—Web开发环境搭建
  3. Easy UI 面板
  4. .net转的时间戳用java去解析的代码
  5. Python 打包程序判断是否已经运行
  6. [LeetCode] Binary Tree Preorder Traversal
  7. C++ 内联函数笔记
  8. 序列化悍将Protobuf-Net,入门动手实录
  9. Oracle 监听器
  10. WCF----Stream对象限制操作