Visual Studio 2005自带的SQL Server 2005简单配置

使用VS自带的SQL可以做一些简单的操练,当然如果有大数据量或者需要有复杂的功能时,还需要使用正式版.....

1、下载SQL2005管理工具Microsoft SQL Server Management Studio Express Service Pack 2。

下载地址:http://www.microsoft.com/downloads/details.aspx?familyid=6053C6F8-82C8-479C-B25B-9ACA13141C9E&displaylang=zh-cn,(SQLServer2005_SSMSEE)其中该管理工具分作64位和32位两种,我使用的是32位。

2、安装并打开Microsoft SQL Server Management Studio Express,用window认证登陆sql server。

3、新建查询。

输入:exec sp_password null,'你的密码',sa

alter login sa enable

4、右键实例,选择属性——安全性,把服务器身份验证改为SQL Server 和 Windows 身份验证模式。

5、右键实例——重新启动。

6、如果不行,则重新启动SQL Server管理器中的服务。

6、完成。再次登陆时,可以使用sa登陆。

注:

1、sp_password   语法: sp_password   [旧密码],   <新密码>,   [登录名]

2、连接sql2005:

SqlConnection con = new SqlConnection(@"Data Source=localhost\SQLEXPRESS;

InitialCatalog=testDB;Persist Security Info=True;User ID=sa;Password=sa");

posted @ 2009-10-03 23:57  浓浓的咖啡  阅读(1704)  评论(0编辑  收藏  举报