zoukankan      html  css  js  c++  java
  • Sql server 2005 connection string

    Standard Connection str: (Sql server authentication)
    "Data Source=stone;Initial Catalog=pubs;User Id=sa;Password=;"
       - or -
    "Server=stone;Database=pubs;User ID=sa;Password=asdasd;Trusted_Connection=False"

     Trusted Connection: (WinNT authentication)
    "Data Source=stone\instance;Initial Catalog=pubs;Integrated Security=SSPI;"
       - or -
    "Server=stone\instance;Database=pubs;Trusted_Connection=True;"

    Connect via an IP address:
    "Data Source=127.0.0.1;Network Library=DBMSSOCN;Initial Catalog=pubs;User ID=sa;Password=;"

     Enabling MARS (multiple active result sets):
    "Server=stone;Database=pubs;Trusted_Connection=True;MultipleActiveResultSets=true"

    Attach a database file on connect to a local SQL Server Express instance:
    "Server=.\SQLExpress;AttachDbFilename=c:\abc\mydb.mdf;Database=dbname;Trusted_Connection=Yes;"
       - or -
    "Server=.\SQLExpress;AttachDbFilename=|DataDirectory|mydb.mdf;Database=dbname;Trusted_Connection=Yes;"

    Using "User Instance" on a local SQL Server Express instance:
    "Data Source=.\SQLExpress;integrated security=true;attachdbfilename=|DataDirectory|\mydb.mdf;user instance=true;"
    The "User Instance" functionality creates a new SQL Server instance on the fly during connect. This works only on a local SQL Server 2005 instance and only when connecting using windows authentication over local named pipes. The purpose is to be able to create a full rights SQL Server instance to a user with limited administrative rights on the computer. To enable the functionality: sp_configure 'user instances enabled','1' (0 to disable)

  • 相关阅读:
    Git 使用vi或vim
    git 添加远程仓库后无法push
    windows下使用IIS创建git服务
    NPOI 操作office、word、excel
    delphi 模拟POST提交数据
    git 用远程覆盖本地
    Delphi中MD5实现方法(转)
    Delphi 操作Ini文件
    Spring系列之——spring security
    Spring系列之——使用模板快速搭建springboot项目
  • 原文地址:https://www.cnblogs.com/stone/p/1238407.html
Copyright © 2011-2022 走看看