SqlConnection.connectionstring parameter reference

zhaozj2021-02-16  108

NameDefaultDescriptionApplication Name The name of the application, or '.Net SqlClient Data Provider' if no application name is provided.AttachDBFilename -or- extended properties -or- Initial File Name The name of the primary file, including the full path name, of an attachable database. The database name must be specified with the keyword 'database'.Connect Timeout -or- Connection Timeout15The length of time (in seconds) to wait for a connection to the server before terminating the attempt and generating an error.Current Language The SQL Server Language record name.Data Source -or- Server -or- address -or- Addr -or- Network address The name or network address of the instance of SQL Server to which to connect.Encrypt'false'When true, SQL Server uses SSL encryption for all data sent between the client and server if the server has a certificate installed. Recognized values ​​are true, false, yes, and no.Initial Catalog -or- Database The name of the database.Integrated Security -or- Trusted _Connection'false'When false, User ID and Password are specified in the connection. When true, the current Windows account credentials are used for authentication. Recognized values ​​are true, false, yes, no, and sspi (strongly recommended), which is Equivalent to True.Network Library -or- Net'dBmssocn '

The network library used to establish a connection to an instance of SQL Server. Supported values ​​include dbnmpntw (Named Pipes), dbmsrpcn (Multiprotocol), dbmsadsn (Apple Talk), dbmsgnet (VIA), dbmslpcn (Shared Memory) and dbmsspxn (IPX / SPX), and DBMSSOCN (TCP / IP). The Corresponding Network DLL Must Be Installed on The System To Which You Connect. If You Do Not Specify A Network and You Use A Local Server (for Example "." OR "(LOCAL ) "), shared memory is used.Packet Size8192Size in bytes of the network packets used to communicate with an instance of SQL Server.Password -or- Pwd The password for the SQL Server account logging on (Not recommended. to maintain a high level of security, it is strongly recommended that you use the Integrated Security or Trusted_Connection keyword instead.). Persist Security Info'false'When set to false or no (strongly recommended), security-sensitive information, such as the password, is not returned As Part of the Connection If The Connection is Open or HA s ever been in an open state. Resetting the connection string resets all connection string values ​​including the password. Recognized values ​​are true, false, yes, and no.User ID The SQL Server login account (Not recommended. To maintain a high level of security, it is strongly recommended that you use the Integrated Security or Trusted_Connection keyword instead.). Workstation IDthe local computer nameThe name of the workstation connecting to SQL server.The following table lists the valid names for connection pooling values ​​within the ConnectionString. for more Information About Connection Pooling, See

Connection Pooling for the .NET Framework Data Provider for SQL Server

.

转载请注明原文地址:https://www.9cbs.com/read-10395.html

New Post(0)