博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Connection strings for SQL Server 2008
阅读量:4305 次
发布时间:2019-06-06

本文共 1985 字,大约阅读时间需要 6 分钟。

More information about connection strings at: 

1.Sandard Security

Data Source=myServerAddress;Initial Catalog=myDataBase;User Id=myUsername;Password=myPassword;

2.Standard Security alternative syntax
Server=myServerAddress;Database=myDataBase;UserID=myUsername;Password=myPassword;Trusted_Connection=False;
3.Trusted Connection
Data Source=myServerAddress;Initial Catalog=myDataBase;Integrated Security=SSPI;
4.Trusted Connection alternative syntax
Server=myServerAddress;Database=myDataBase;Trusted_Connection=True;
5.Connecting to an SQL Server instance
Server=myServerName\theInstanceName;Database=myDataBase;Trusted_Connection=True;
6.Trusted Connection from a CE device
DataSource=myServerAddress;InitialCatalog=myDataBase;IntegratedSecurity=SSPI;UserID=myDomain\myUsername;Password=myPassword;
7.Connect via an IP address
DataSource=190.190.200.100,1433;NetworkLibrary=DBMSSOCN;InitialCatalog=myDataBase;UserID=myUsername;Password=myPassword;
8.Enabling MARS (multiple active result sets)
Server=myServerAddress;Database=myDataBase;Trusted_Connection=True;MultipleActiveResultSets=true;
9.Attach a database file on connect to a local SQL Server Express instance
Server=.\SQLExpress;AttachDbFilename=c:\asd\qwe\mydbfile.mdf;Database=dbname;Trusted_Connection=Yes;
10.Attach a database file, located in the data directory, on connect to a local SQL Server Express instance
Server=.\SQLExpress;AttachDbFilename=|DataDirectory|mydbfile.mdf;Database=dbname;Trusted_Connection=Yes;
11.Using an User Instance on a local SQL Server Express instance
DataSource=.\SQLExpress;IntegratedSecurity=true; AttachDbFilename=|DataDirectory|\mydb.mdf;User Instance=true;
12.Database mirroring
DataSource=myServerAddress;FailoverPartner=myMirrorServerAddress;InitialCatalog=myDataBase;Integrated Security=True;

13.Asynchronous processing

Server=myServerAddress;Database=myDataBase;IntegratedSecurity=True;AsynchronousProcessing=True;

转载于:https://www.cnblogs.com/psunny/archive/2010/06/12/1756872.html

你可能感兴趣的文章
机器学习sklearn的快速使用--周振洋
查看>>
hive实现not in
查看>>
数据类型转化
查看>>
Vue通过build打包后 打开index.html页面是空白的
查看>>
算法整理
查看>>
从此记录
查看>>
Mybatis 动态传sql可以查询表名,任意表名,不固定字段的个数返回未定义的类型以及增删改...
查看>>
[原]Jenkins(二十) jenkins再出发之Error: Opening Robot Framework log failed
查看>>
DDD:实体如何处理外部依赖
查看>>
Python 函数(二)
查看>>
ansible 判断和循环
查看>>
小W计树
查看>>
OpenSSL漏洞补救办法详解(转)
查看>>
opencv 和 parfor
查看>>
Raspberry Pi For Windows
查看>>
改错3-38
查看>>
开发 调试
查看>>
centos 系统管理维护指南
查看>>
使用wireshark抓包工具 检测不到本地网卡
查看>>
C# 网络编程之webBrowser获取网页url和下载网页中图片
查看>>