<!-- /* Font Definitions */ @font-face {font-family:宋体; panose-1:2 1 6 0 3 1 1 1 1 1; mso-font-alt:SimSun; mso-font-charset:134; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:3 135135232 16 0 262145 0;} @font-face {font-family:"/@宋体"; panose-1:2 1 6 0 3 1 1 1 1 1; mso-font-charset:134; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:3 135135232 16 0 262145 0;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {mso-style-parent:""; margin:0cm; margin-bottom:.0001pt; text-align:justify; text-justify:inter-ideograph; mso-pagination:none; font-size:10.5pt; mso-bidi-font-size:12.0pt; font-family:"Times New Roman"; mso-fareast-font-family:宋体; mso-font-kerning:1.0pt;} /* Page Definitions */ @page {mso-page-border-surround-header:no; mso-page-border-surround-footer:no;} @page Section1 {size:595.3pt 841.9pt; margin:72.0pt 90.0pt 72.0pt 90.0pt; mso-header-margin:42.55pt; mso-footer-margin:49.6pt; mso-paper-source:0; layout-grid:15.6pt;} div.Section1 {page:Section1;} /* List Definitions */ @list l0 {mso-list-id:266695441; mso-list-type:hybrid; mso-list-template-ids:840891882 1968864194 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;} @list l0:level1 {mso-level-text:%1、; mso-level-tab-stop:18.0pt; mso-level-number-position:left; margin-left:18.0pt; text-indent:-18.0pt;} @list l1 {mso-list-id:909733823; mso-list-type:hybrid; mso-list-template-ids:835498894 -1640703446 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;} @list l1:level1 {mso-level-number-format:japanese-counting; mso-level-text:%1、; mso-level-tab-stop:21.0pt; mso-level-number-position:left; margin-left:21.0pt; text-indent:-21.0pt;} @list l2 {mso-list-id:960116247; mso-list-type:hybrid; mso-list-template-ids:553911090 -626756418 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;} @list l2:level1 {mso-level-text:%1、; mso-level-tab-stop:18.0pt; mso-level-number-position:left; margin-left:18.0pt; text-indent:-18.0pt;} @list l3 {mso-list-id:1350647280; mso-list-type:hybrid; mso-list-template-ids:78651958 -897035610 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;} @list l3:level1 {mso-level-text:%1、; mso-level-tab-stop:18.0pt; mso-level-number-position:left; margin-left:18.0pt; text-indent:-18.0pt;} ol {margin-bottom:0cm;} ul {margin-bottom:0cm;} -->
SQL Server 2005 使用心得
一、 使用sa 或者 添加新用户
初次使用sa,或者添加新用户登录不能成功,个人总结解决办法如下(以新用户举例):
1、 运行SQL Server Management Studio 使用Windows身份验证登录。
2、 添加一个新的数据库(如:DataTest)。
3、 点击“安全性”,右键单击“登录名”,选择“新建登录名”。
4、 先点击左边的“常规”选项。右边会有一些项目要填写。登录名(自己取):XXX;选择SQL Server身份验证,设置自己想写的密码。
5、 接下来会有三个复选项,试自己的情况,可以选也可以不选。(选择的话,你填写的项一定要附合要求,比如密码不能简单什么的。)
6、 默认数据库:就选择刚才创建的那一个(DataTest)。
7、 默认语言:自己选吧,也可以不用选,会用默认值代替。
8、 点击左边的“服务器角色”选项。选择dbcreator复选项。
9、 点击左边的“用户映射”选项。选择public 和 db_owner复选项。
10、 点击左边的“状态”选项。将右面的“授予”和“启用”选上。
11、 点击最后的“确定”执行添加或修改用户。
12、 回到SQL Server Management Studio,右击右边树型目录的根“服务器”,选择属性。
13、 在“服务器属性”中选择“安全性”,“服务器身份验证”一定要选择“SQL Server 和 Windows身份验证模式”。
这时用新用户或SA登录应该就可以成功了。
二、 使用ODBC 添加SQL Server 2005 数据源
一般初次使用可能添加失败,具体解决办法如下(按下面一条条对比就可以了):
1、 运行<程序><Microsoft SQL Server 2005><配置工具><SQL Server Configuration Manager>
2、 选择左边树型目录中的“SQL Server 2005 网络配置”下的“SQLEXPRESS的协议”
3、 右边一般会出现四种使用协议,我选择“tcp/ip”,对其双击或者右键选择属性。
4、 在弹出的“TCP/IP”属性对话框中的“协议”页中把“已启用”选择为“是”。
5、 “IP地址”页中TCP动态端口都写为0,TCP端口可以自己写,也可以使用默认的1433,已启用都选择是。
6、 点击确定。这时已经把和服务器的连接协议就配置好了,不过你还重新启动这个服务。
7、 运行<程序><Microsoft SQL Server 2005><配置工具>< SQL Server 外围应用配置器>
8、 默认对本机进行操作,点击“服务和连接的外围应用配置器”。
9、 在树型目录里,先选择“远程连接”,在右边选择“本地连接和远程连接”,下面选“仅使用TCP/IP”,这个可以自己考虑。
10、 再选择左边的服务,右边就是你可以设置的一样项目了,我们要做的就是重起一下这个服务了。点击“停止”再“启动”。
这时我们应该就把准备工作就做好了。接下来就是使用ODBC 添加SQL Server 2005 数据源
1、 运行ODBC,添加SQL Server ,服务器选择本地的。
2、 登录方式任由你选,客户配置选择TCP/IP,可以选择动态决定端口,也可以指定端口号,这个号就是你刚才填的那个。忘了就回去看看吧。
之后应该就能成功的创建ODBC 数据源了。