MS SQL Server 连接字符串的实际操作简介


  本文标签:MS SQL Server

  以下的文章主要向大家介绍的是MS SQL Server 连接字符串的实际操作,如果你对MS SQL Server 连接字符串的实际操作流程有兴趣了解的话,你就可以通过以下的文章对其有更深的了解  。

  字符串:

  1、

  1. Data Source=.;uid=sa;pwd=wzb0227;Integrated Security=SSPI;Initial Catalog=Evaluation;Integrated Security=True 

  2、

  1. Data Source=(local);Initial Catalog=BarefootIndex0425;User Id=sa;Password=sa;Connect Timeout=180;Enlist=true;  
  2. Pooling=true;Max Pool Size = 300;Min Pool Size = 5;Connection Lifetime=200;packet size=4096 

  其中:

  [Data Source]:别名(Server、Address、Addr),如果是本地数据库且定义了实例名,则可以写为"Server=(local)\实例名";如果是远程服务器,则将"(local)"替换为远程服务器的名称或IP地址  。

  [Initial Catalog]:别名(Database)

  [user id]:别名(uid)

  [Password]:别名(pwd)

  [Connect Timeout]:连接超时时间为30秒.

  

  1. [Enlist]  
  2. [Pooling]  
  3. [Max Pool Size]  
  4. [Min Pool Size]  
  5. [Connection Lifetime]  
  6. [packet size]  
  7. [Integrated Security]??  

  

  [Trusted_Connection]Windows登录,如果你的MS SQL Server设置为Windows登录,那么在这里就不需要使用"user id"和"password"这样的方式来登录,

  而需要使用"Trusted_Connection=SSPI"来进行登录.

  

  Integrated Security=SSPI与Trusted_Connection=SSPI的区别?

  

  原文标题:MS SQL Server 连接字符串

  连接:http://www.cnblogs.com/wangzb/archive/2010/03/03/1677035.html