Last post Dec 22, 2008 09:41 AM by Gregale.net
Dec 22, 2008 07:15 AMfirstname.lastname@example.org|LINK
User ID=sa;Data Source=;Initial Catalog=Central;Persist Security Info=False;Packet Size=4096
what is Persist Security Info=False and packet size in connection string
Dec 22, 2008 07:41 AM|mudassarkhan|LINK
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 has ever been in an open
If you set Persist Security Info to True, Windows will remember the password specified in the connection string
Dec 22, 2008 09:09 AMemail@example.com|LINK
Thanks for your post
Can u tell about what is the meaning of
Packet Size=4096; and
in connectin string
Dec 22, 2008 09:23 AM|mudassarkhan|LINK
Here's everything U need
The following table lists the valid names for keyword values within the
The name of the application, or '.NET SQLClient Data Provider' if no application name is provided.
When true, enables asynchronous operation support. Recognized values are
yes, and no.
Initial File Name
The name of the primary database file, including the full path name of an attachable database. AttachDBFilename is only supported for primary data files with an .mdf extension.
The attachment will fail if the primary data file is read-only.
The path may be absolute or relative by using the DataDirectory substitution string. If DataDirectory is used, the database file must exist within a subdirectory of the directory pointed to by the substitution string.
The database name must be specified with the keyword 'database' (or one of its aliases) as in the following:
An error will be generated if a log file exists in the same directory as the data file and the 'database' keyword is used when attaching the primary data file. In this case, remove the log file. Once the database is attached, a new log file will be automatically
generated based on the physical path.
The length of time (in seconds) to wait for a connection to the server before terminating the attempt and generating an error.
true if an in-process connection to SQL Server should be made.
The SQL Server Language record name.
The name or network address of the instance of SQL Server to which to connect. The port number can be specified after the server name:
When specifying a local instance, always use (local). To force a protocol, add one of the following prefixes:
np:(local), tcp:(local), lpc:(local)
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
yes, and no.
true indicates that the SQL Server connection pooler automatically enlists the connection in the creation thread's current transaction context.
The name of the failover partner server where database mirroring is configured.
The Failover Partner keyword is not supported by .NET Framework version 1.0 or 1.1.
The name of the database.
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,
no, and sspi (strongly recommended), which is equivalent to
When true, an application can maintain multiple active result sets (MARS). When
false, an application must process or cancel all result sets from one batch before it can execute any other batch on that connection.
Recognized values are true and
false. (new feature released with ADO.NET 2.0 that allows you to execute multiple queries or stored procedures on a single connection)
The keyword is not supported by .NET Framework version 1.0 or 1.1.
The network library used to establish a connection to an instance of SQL Server. Supported values include:
dbnmpntw (Named Pipes)
dbmsrpcn (Multiprotocol, Windows RPC)
dbmsadsn (Apple Talk)
dbmslpcn (Shared Memory)
Dbmsvinn (Banyan Vines)
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. In this example, the network library is Win32 Winsock TCP/IP
(dbmssocn), and 1433 is the port being used.
Network Library=dbmssocn;Data Source=000.000.000.000,1433;
Size in bytes of the network packets used to communicate with an instance of SQL Server.
The password for the SQL Server account logging on. Not recommended. To maintain a high level of security, we strongly recommend that you use the
Integrated Security or
Trusted_Connection keyword instead.
Persist Security Info
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 has ever been in an open state. Resetting the connection
string resets all connection string values including the password. Recognized values are
yes, and no.
true if replication is supported using the connection.
Controls connection association with an enlisted System.Transactions transaction.
Possible values are:
Transaction Binding=Implicit Unbind;
Transaction Binding=Explicit Unbind;
Implicit Unbind causes the connection to detach from the transaction when it ends. After detaching, additional requests on the connection are performed in autocommit mode. The
System.Transactions.Transaction.Current property is not checked when executing requests while the transaction is active. After the transaction has ended, additional requests are performed in autocommit
Explicit Unbind causes the connection to remain attached to the transaction until the connection is closed or an explicit
SqlConnection.TransactionEnlist(null) is called. An
InvalidOperationException is thrown if
Transaction.Current is not the enlisted transaction or if the enlisted transaction is not active.
When set to true, SSL is used to encrypt the channel when bypassing walking the certificate chain to validate trust. If TrustServerCertificate is set to
true and Encrypt is set to
false, the channel is not encrypted. Recognized values are
yes, and no. For more information, see
Connection String Syntax (ADO.NET).
Type System Version
A string value that indicates the type system the application expects. Possible values are:
Type System Version=SQL Server 2000;
Type System Version=SQL Server 2005;
Type System Version=SQL Server 2008;
Type System Version=Latest;
When set to SQL Server 2000, the SQL Server 2000 type system is used. The following conversions are performed when connecting to a SQL Server 2005 instance:
XML to NTEXT
UDT to VARBINARY
VARCHAR(MAX), NVARCHAR(MAX) and VARBINARY(MAX) to TEXT, NEXT and IMAGE respectively.
When set to SQL Server 2005, the SQL Server 2005 type system is used. No conversions are made for the current version of ADO.NET.
When set to Latest, the latest version than this client-server pair can handle is used. This will automatically move forward as the client and server components are upgraded.
The SQL Server login account. Not recommended. To maintain a high level of security, we strongly recommend that you use the
Integrated Security or
Trusted_Connection keywords instead.
A value that indicates whether to redirect the connection from the default SQL Server Express instance to a runtime-initiated instance running under the account of the caller.
The local computer name
The name of the workstation connecting to SQL Server.
Dec 22, 2008 09:41 AM|Gregale.net|LINK
you should find your answer here
if you are looking for an efficient conn string, you can streamline using mars, 'a single connection for multiples queries', got it? simply spend 2 minutes on this link