Conexiónes de datos

42
http://www.connectionstrings.com/ Conexión a sql server 2008 Standard Security Data Source=myServerAddress;Initial Catalog=myDataBase;User Id=myUsername;Password=myPassword; Use serverName\instanceName as Data Source to connect to a specific SQL Server instance. Are you using SQL Server 2008 Express? Don't miss the server name syntax Servername\SQLEXPRESS where you substitute Servername with the name of the computer where the SQL Server Express installation resides. Standard Security alternative syntax This connection string produce the same result as the previous one. The reason to include it is to point out that some connection string keywords have many equivalents. Server=myServerAddress;Database=myDataBase;User ID=myUsername;Password=myPassword;Trusted_Connection=False; Trusted Connection Data Source=myServerAddress;Initial Catalog=myDataBase;Integrated Security=SSPI; Trusted Connection alternative syntax This connection string produce the same result as the previous one. The reason to include it is to point out that some connection string keywords have many equivalents. Server=myServerAddress;Database=myDataBase;Trusted_Connection=Tr ue; Connecting to an SQL Server instance The syntax of specifying the server instance in the value of the server key is the same for all connection strings for SQL Server. Server=myServerName\ theInstanceName;Database=myDataBase;Trusted_Connection=True; Fuente: http://www.solovb.net/index.php/2009/02/03/connection- strings-cadenas-de-conexion/

Transcript of Conexiónes de datos

Page 1: Conexiónes de datos

http://www.connectionstrings.com/

Conexión a sql server 2008

Standard SecurityData Source=myServerAddress;Initial Catalog=myDataBase;User Id=myUsername;Password=myPassword;Use serverName\instanceName as Data Source to connect to a specific SQL Server instance.

Are you using SQL Server 2008 Express? Don't miss the server name syntax Servername\SQLEXPRESS where you substitute Servername with the name of the computer where the SQL Server Express installation resides. Standard Security alternative syntaxThis connection string produce the same result as the previous one. The reason to include it is to point out that some connection string keywords have many equivalents. Server=myServerAddress;Database=myDataBase;User ID=myUsername;Password=myPassword;Trusted_Connection=False;  Trusted ConnectionData Source=myServerAddress;Initial Catalog=myDataBase;Integrated Security=SSPI;  Trusted Connection alternative syntaxThis connection string produce the same result as the previous one. The reason to include it is to point out that some connection string keywords have many equivalents. Server=myServerAddress;Database=myDataBase;Trusted_Connection=True;  Connecting to an SQL Server instance The syntax of specifying the server instance in the value of the server key is the same for all connection strings for SQL Server.Server=myServerName\theInstanceName;Database=myDataBase;Trusted_Connection=True;  Trusted Connection from a CE deviceOften a Windows CE device is not authenticated and logged in to a domain. To use SSPI or trusted connection / authentication from a CE device, use this connection string.Data Source=myServerAddress;Initial Catalog=myDataBase;Integrated Security=SSPI;User ID=myDomain\myUsername;Password=myPassword;Note that this will only work on a CE device.Read more about connecting to SQL Server from CE devices here 

Fuente: http://www.solovb.net/index.php/2009/02/03/connection-strings-cadenas-de-conexion/

Page 2: Conexiónes de datos

http://www.connectionstrings.com/

Connect via an IP addressData Source=190.190.200.100,1433;Network Library=DBMSSOCN;Initial Catalog=myDataBase;User ID=myUsername;Password=myPassword;DBMSSOCN=TCP/IP. This is how to use TCP/IP instead of Named Pipes. At the end of the Data Source is the port to use. 1433 is the default port for SQL Server.How to define which network protocol to use Enabling MARS (multiple active result sets)Server=myServerAddress;Database=myDataBase;Trusted_Connection=True; MultipleActiveResultSets=true;Use ADO.NET for MARS functionality. MARS is not supported in ADO.NET 1.0 nor ADO.NET 1.1.Streamline your Data Connections by Moving to MARS, by Laurence Moroney, DevX.com Attach a database file on connect to a local SQL Server Express instanceServer=.\SQLExpress;AttachDbFilename=c:\asd\qwe\mydbfile.mdf;Database=dbname; Trusted_Connection=Yes;Why is the Database parameter needed? If the named database have already been attached, SQL Server does not reattach it. It uses the attached database as the default for the connection. Attach a database file, located in the data directory, on connect to a local SQL Server Express instanceServer=.\SQLExpress;AttachDbFilename=|DataDirectory|mydbfile.mdf; Database=dbname;Trusted_Connection=Yes;Why is the Database parameter needed? If the named database have already been attached, SQL Server does not reattach it. It uses the attached database as the default for the connection. Using an User Instance on a local SQL Server Express instanceThe User Instance functionality creates a new SQL Server instance on the fly during connect. This works only on a local SQL Server instance and only when connecting using windows

Fuente: http://www.solovb.net/index.php/2009/02/03/connection-strings-cadenas-de-conexion/

Page 3: Conexiónes de datos

http://www.connectionstrings.com/

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. Data Source=.\SQLExpress;Integrated Security=true; AttachDbFilename=|DataDirectory|\mydb.mdf;User Instance=true;To use the User Instance functionality you need to enable it on the SQL Server. This is done by executing the following command: sp_configure 'user instances enabled', '1'. To disable the functionality execute sp_configure 'user instances enabled', '0'. Database mirroringIf you connect with ADO.NET or the SQL Native Client to a database that is being mirrored, your application can take advantage of the drivers ability to automatically redirect connections when a database mirroring failover occurs. You must specify the initial principal server and database in the connection string and the failover partner server.Data Source=myServerAddress;Failover Partner=myMirrorServerAddress;Initial Catalog=myDataBase;Integrated Security=True;There is ofcourse many other ways to write the connection string using database mirroring, this is just one example pointing out the failover functionality. You can combine this with the other connection strings options available. Asynchronous processingA connection to SQL Server that allows for the issuing of async requests through ADO.NET objects.Server=myServerAddress;Database=myDataBase;Integrated Security=True;Asynchronous Processing=True;  

SQL Server Native Client 10.0 OLE DB Provider

Type:    OLE DB ProviderUsage:  Provider=SQLNCLI10Manufacturer:  MicrosoftMore info about this provider »Customize stringexample values »Standard securityProvider=SQLNCLI10;Server=myServerAddress;Database=myDataBase;Uid=myUsername; Pwd=myPassword;Are you using SQL Server 2008 Express? Don't miss the server name syntax Servername\SQLEXPRESS where you substitute Servername with the name of the computer where the SQL Server 2008 Express installation resides. Trusted connectionProvider=SQLNCLI10;Server=myServerAddress;Database=myDataBase; Trusted_Connection=yes;Equivalent key-value pair: "Integrated Security=SSPI" equals "Trusted_Connection=yes" Connecting to an SQL Server instance

Fuente: http://www.solovb.net/index.php/2009/02/03/connection-strings-cadenas-de-conexion/

Page 4: Conexiónes de datos

http://www.connectionstrings.com/

The syntax of specifying the server instance in the value of the server key is the same for all connection strings for SQL Server.Provider=SQLNCLI10;Server=myServerName\theInstanceName;Database=myDataBase; Trusted_Connection=yes;  Prompt for username and passwordThis one is a bit tricky. First you need to set the connection object's Prompt property to adPromptAlways. Then use the connection string to connect to the database. oConn.Properties("Prompt") = adPromptAlways

oConn.Open "Provider=SQLNCLI10;Server=myServerAddress;DataBase=myDataBase;  Enabling MARS (multiple active result sets)Provider=SQLNCLI10;Server=myServerAddress;Database=myDataBase; Trusted_Connection=yes;MARS Connection=True;Use ADO.NET for MARS functionality. MARS is not supported in ADO.NET 1.0 nor ADO.NET 1.1.Using MARS with SQL Native Client, by Chris Lee Encrypt data sent over networkProvider=SQLNCLI10;Server=myServerAddress;Database=myDataBase; Trusted_Connection=yes;Encrypt=yes;  Attach a database file on connect to a local SQL Server Express instanceProvider=SQLNCLI10;Server=.\SQLExpress;AttachDbFilename=c:\asd\qwe\mydbfile.mdf; Database=dbname; Trusted_Connection=Yes;Why is the Database parameter needed? If the named database have already been attached, SQL Server does not reattach it. It uses the attached database as the default for the connection. Attach a database file, located in the data directory, on connect to a local SQL Server Express instanceProvider=SQLNCLI10;Server=.\SQLExpress;AttachDbFilename=|DataDirectory|mydbfile.mdf; Database=dbname;Trusted_Connection=Yes;Why is the Database parameter needed? If the named database have already been attached, SQL Server does not reattach it. It uses the attached database as the default for the connection. Database mirroringIf you connect with ADO.NET or the SQL Native Client to a database that is being mirrored, your application can take advantage of the drivers ability to automatically redirect connections when a database mirroring failover occurs. You must specify the initial principal server and database in the connection string and the failover partner server.Provider=SQLNCLI10;Data Source=myServerAddress;Failover Partner=myMirrorServerAddress;Initial Catalog=myDataBase;Integrated Security=True;There is ofcourse many other ways to write the connection string using database mirroring, this is just one example pointing out the failover functionality. You can combine this with the other connection strings options available.

Fuente: http://www.solovb.net/index.php/2009/02/03/connection-strings-cadenas-de-conexion/

Page 5: Conexiónes de datos

http://www.connectionstrings.com/

 

.NET Framework Data Provider for OLE DB

Type:    .NET Framework Wrapper Class LibraryUsage:  System.Data.OleDb.OleDbConnectionManufacturer:  MicrosoftMore info about this wrapper class library »Customize stringexample values »Bridging to SQL Native Client OLE DBThis is just one connection string sample for the wrapping OleDbConnection class that calls the underlying OLEDB provider. See respective OLE DB provider for more connection strings to use with this class.Provider=SQLNCLI10;Server=myServerAddress;Database=myDataBase;Uid=myUsername; Pwd=myPassword;  

SQL Server Native Client 10.0 ODBC Driver

Type:    ODBC DriverUsage:  Driver={SQL Server Native Client 10.0}Manufacturer:  MicrosoftMore info about this driver »Customize stringexample values »Standard securityDriver={SQL Server Native Client 10.0};Server=myServerAddress;Database=myDataBase;Uid=myUsername;Pwd=myPassword;Are you using SQL Server 2008 Express? Don't miss the server name syntax Servername\SQLEXPRESS where you substitute Servername with the name of the computer where the SQL Server 2008 Express installation resides. Trusted ConnectionDriver={SQL Server Native Client 10.0};Server=myServerAddress;Database=myDataBase;Trusted_Connection=yes;Equivalent key-value pair: "Integrated Security=SSPI" equals "Trusted_Connection=yes" Connecting to an SQL Server instance The syntax of specifying the server instance in the value of the server key is the same for all connection strings for SQL Server.Driver={SQL Server Native Client 10.0};Server=myServerName\theInstanceName; Database=myDataBase;Trusted_Connection=yes;  Prompt for username and password

Fuente: http://www.solovb.net/index.php/2009/02/03/connection-strings-cadenas-de-conexion/

Page 6: Conexiónes de datos

http://www.connectionstrings.com/

This one is a bit tricky. First you need to set the connection object's Prompt property to adPromptAlways. Then use the connection string to connect to the database. oConn.Properties("Prompt") = adPromptAlways

Driver={SQL Server Native Client 10.0};Server=myServerAddress;Database=myDataBase;  Enabling MARS (multiple active result sets)Driver={SQL Server Native Client 10.0};Server=myServerAddress;Database=myDataBase;Trusted_Connection=yes; MARS_Connection=yes;Use ADO.NET for MARS functionality. MARS is not supported in ADO.NET 1.0 nor ADO.NET 1.1.Using MARS with SQL Native Client, by Chris Lee Encrypt data sent over networkDriver={SQL Server Native Client 10.0};Server=myServerAddress;Database=myDataBase; Trusted_Connection=yes;Encrypt=yes;  Attach a database file on connect to a local SQL Server Express instanceDriver={SQL Server Native Client 10.0};Server=.\SQLExpress; AttachDbFilename=c:\asd\qwe\mydbfile.mdf; Database=dbname;Trusted_Connection=Yes;Why is the Database parameter needed? If the named database have already been attached, SQL Server does not reattach it. It uses the attached database as the default for the connection. Attach a database file, located in the data directory, on connect to a local SQL Server Express instanceDriver={SQL Server Native Client 10.0};Server=.\SQLExpress;AttachDbFilename=|DataDirectory|mydbfile.mdf; Database=dbname;Trusted_Connection=Yes;Why is the Database parameter needed? If the named database have already been attached, SQL Server does not reattach it. It uses the attached database as the default for the connection. Database mirroringIf you connect with ADO.NET or the SQL Native Client to a database that is being mirrored, your application can take advantage of the drivers ability to automatically redirect connections when a database mirroring failover occurs. You must specify the initial principal server and database in the connection string and the failover partner server.Driver={SQL Server Native Client 10.0};Server=myServerAddress;Failover_Partner=myMirrorServerAddress;Database=myDataBase; Trusted_Connection=yes;There is ofcourse many other ways to write the connection string using database mirroring, this is just one example pointing out the failover functionality. You can combine this with the other connection strings options available.

Please note if you are using TCP/IP (using the network library parameter) and database mirroring, including port number in the address (formed as servername,portnumber) for booth the main server and the failover partner can solve some reported issues.

Fuente: http://www.solovb.net/index.php/2009/02/03/connection-strings-cadenas-de-conexion/

Page 7: Conexiónes de datos

http://www.connectionstrings.com/

Conexion SQl server 2005

Standard Security

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

Use serverName\instanceName as Data Source to connect to a specific SQL Server instance.

Are you using SQL Server 2005 Express? Don't miss the server name syntax Servername\SQLEXPRESS where you substitute Servername with the name of the computer where the SQL Server 2005 Express installation resides.

Standard Security alternative syntax

This connection string produce the same result as the previous one. The reason to include it is to point out that some connection string keywords have many equivalents.

Server=myServerAddress;Database=myDataBase;User ID=myUsername;Password=myPassword;Trusted_Connection=False;

Trusted Connection

Data Source=myServerAddress;Initial Catalog=myDataBase;Integrated Security=SSPI;

Trusted Connection alternative syntax

This connection string produce the same result as the previous one. The reason to include it is to point out that some connection string keywords have many equivalents.

Server=myServerAddress;Database=myDataBase;Trusted_Connection=True;

Fuente: http://www.solovb.net/index.php/2009/02/03/connection-strings-cadenas-de-conexion/

Page 8: Conexiónes de datos

http://www.connectionstrings.com/

Connecting to an SQL Server instance

The syntax of specifying the server instance in the value of the server key is the same for all connection strings for SQL Server.

Server=myServerName\theInstanceName;Database=myDataBase;Trusted_Connection=True;

Trusted Connection from a CE device

Often a Windows CE device is not authenticated and logged in to a domain. To use SSPI or trusted connection / authentication from a CE device, use this connection string.

Data Source=myServerAddress;Initial Catalog=myDataBase;Integrated Security=SSPI;User ID=myDomain\myUsername;Password=myPassword;

Note that this will only work on a CE device.

Read more about connecting to SQL Server from CE devices here

Connect via an IP address

Data Source=190.190.200.100,1433;Network Library=DBMSSOCN;Initial Catalog=myDataBase;User ID=myUsername;Password=myPassword;

DBMSSOCN=TCP/IP. This is how to use TCP/IP instead of Named Pipes. At the end of the Data Source is the port to use. 1433 is the default port for SQL Server.

How to define which network protocol to use

Enabling MARS (multiple active result sets)

Server=myServerAddress;Database=myDataBase;Trusted_Connection=True; MultipleActiveResultSets=true;

Use ADO.NET 2.0 for MARS functionality. MARS is not supported in ADO.NET 1.0 nor ADO.NET 1.1.

Streamline your Data Connections by Moving to MARS, by Laurence Moroney, DevX.com

Fuente: http://www.solovb.net/index.php/2009/02/03/connection-strings-cadenas-de-conexion/

Page 9: Conexiónes de datos

http://www.connectionstrings.com/

Attach a database file on connect to a local SQL Server Express instance

Server=.\SQLExpress;AttachDbFilename=c:\mydbfile.mdf;Database=dbname; Trusted_Connection=Yes;

Why is the Database parameter needed? If the named database have already been attached, SQL Server does not reattach it. It uses the attached database as the default for the connection.

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;

Why is the Database parameter needed? If the named database have already been attached, SQL Server does not reattach it. It uses the attached database as the default for the connection.

Using an User Instance on a local SQL Server Express instance

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.

Data Source=.\SQLExpress;Integrated Security=true; AttachDbFilename=|DataDirectory|\mydb.mdf;User Instance=true;

To use the User Instance functionality you need to enable it on the SQL Server. This is done by executing the following command: sp_configure 'user instances enabled', '1'. To disable the functionality execute sp_configure 'user instances enabled', '0'.

Database mirroring

If you connect with ADO.NET or the SQL Native Client to a database that is being mirrored, your application can take advantage of the drivers ability to automatically redirect connections

Fuente: http://www.solovb.net/index.php/2009/02/03/connection-strings-cadenas-de-conexion/

Page 10: Conexiónes de datos

http://www.connectionstrings.com/

when a database mirroring failover occurs. You must specify the initial principal server and database in the connection string and the failover partner server.

Data Source=myServerAddress;Failover Partner=myMirrorServerAddress;Initial Catalog=myDataBase;Integrated Security=True;

There is ofcourse many other ways to write the connection string using database mirroring, this is just one example pointing out the failover functionality. You can combine this with the other connection strings options available.

Read more about database mirroring in this Microsoft TechNet article "Database Mirroring in SQL Server 2005"

Asynchronous processing

A connection to SQL Server 2005 that allows for the issuing of async requests through ADO.NET objects.

Server=myServerAddress;Database=myDataBase;Integrated Security=True;Asynchronous Processing=True;

Conexion SQL server 2000

Standard Security

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

Standard Security alternative syntax

Fuente: http://www.solovb.net/index.php/2009/02/03/connection-strings-cadenas-de-conexion/

Page 11: Conexiónes de datos

http://www.connectionstrings.com/

This connection string produces the same result as the previous one. The reason to include it is to point out that some connection string keywords have many equivalents.

Server=myServerAddress;Database=myDataBase;User ID=myUsername;Password=myPassword;Trusted_Connection=False;

Trusted Connection

Data Source=myServerAddress;Initial Catalog=myDataBase;Integrated Security=SSPI;

Trusted Connection alternative syntax

This connection string produce the same result as the previous one. The reason to include it is to point out that some connection string keywords have many equivalents.

Server=myServerAddress;Database=myDataBase;Trusted_Connection=True;

Use serverName\instanceName as Data Source to use a specific SQL Server instance. Please note that the multiple SQL Server instances feature is available only from SQL Server version 2000 and not in any previous versions.

Connecting to an SQL Server instance

The syntax of specifying the server instance in the value of the server key is the same for all connection strings for SQL Server.

Server=myServerName\theInstanceName;Database=myDataBase;Trusted_Connection=True;

Trusted Connection from a CE device

Often a Windows CE device is not authenticated and logged in to a domain. To use SSPI or trusted connection / authentication from a CE device, use this connection string.

Fuente: http://www.solovb.net/index.php/2009/02/03/connection-strings-cadenas-de-conexion/

Page 12: Conexiónes de datos

http://www.connectionstrings.com/

Data Source=myServerAddress;Initial Catalog=myDataBase;Integrated Security=SSPI;User ID=myDomain\myUsername;Password=myPassword;

Note that this will only work on a CE device.

Read more about connecting to SQL Server from CE devices here

Connect via an IP address

Data Source=190.190.200.100,1433;Network Library=DBMSSOCN;Initial Catalog=myDataBase;User ID=myUsername;Password=myPassword;

DBMSSOCN=TCP/IP. This is how to use TCP/IP instead of Named Pipes. At the end of the Data Source is the port to use. 1433 is the default port for SQL Server.

How to define which network protocol to use

Specifying packet size

Server=myServerAddress;Database=myDataBase;User ID=myUsername;Password=myPassword;Trusted_Connection=False;Packet Size=4096;

By default, the Microsoft .NET Framework Data Provider for SQL Server sets the network packet size to 8192 bytes. This might however not be optimal, try to set this value to 4096 instead.

The default value of 8192 might cause errors as well ("Failed to reserve contiguous memory"), check this out

Microsoft OLE DB Provider for SQL Server

Type: OLE DB ProviderUsage: Provider=sqloledb

Manufacturer: MicrosoftMore info about this provider »

Customize stringexample values »

Fuente: http://www.solovb.net/index.php/2009/02/03/connection-strings-cadenas-de-conexion/

Page 13: Conexiónes de datos

http://www.connectionstrings.com/

Standard Security

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

Trusted connection

Provider=sqloledb;Data Source=myServerAddress;Initial Catalog=myDataBase;Integrated Security=SSPI;

Use serverName\instanceName as Data Source to use a specific SQL Server instance. Please note that the multiple SQL Server instances feature is available only from SQL Server version 2000 and not in any previous versions.

Connecting to an SQL Server instance

The syntax of specifying the server instance in the value of the server key is the same for all connection strings for SQL Server.

Provider=sqloledb;Data Source=myServerName\theInstanceName;Initial Catalog=myDataBase;Integrated Security=SSPI;

Prompt for username and password

This one is a bit tricky. First set the connection object's Provider property to "sqloledb". Thereafter set the connection object's Prompt property to adPromptAlways. Then use the connection string to connect to the database.

oConn.Provider = "sqloledb"oConn.Properties("Prompt") = adPromptAlways

Data Source=myServerAddress;Initial Catalog=myDataBase;

Fuente: http://www.solovb.net/index.php/2009/02/03/connection-strings-cadenas-de-conexion/

Page 14: Conexiónes de datos

http://www.connectionstrings.com/

Connect via an IP address

Provider=sqloledb;Data Source=190.190.200.100,1433;Network Library=DBMSSOCN;Initial Catalog=myDataBase;User ID=myUsername;Password=myPassword;

DBMSSOCN=TCP/IP. This is how to use TCP/IP instead of Named Pipes. At the end of the Data Source is the port to use. 1433 is the default port for SQL Server.

How to define which network protocol to use

Disable connection pooling

This one is usefull when receving errors "sp_setapprole was not invoked correctly." (7.0) or "General network error. Check your network documentation" (2000) when connecting using an application role enabled connection. Application pooling (or OLE DB resource pooling) is on by default. Disabling it can help on this error.

Provider=sqloledb;Data Source=myServerAddress;Initial Catalog=myDataBase;User ID=myUsername;Password=myPassword;OLE DB Services=-2;

Conexion con Oracle

Using TNSData Source=TORCL;User Id=myUsername;Password=myPassword;  Using integrated securityData Source=TORCL;Integrated Security=SSPI;  Using ODP.NET without tnsnames.oraData Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=MyHost)(PORT=MyPort)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=MyOracleSID)));User Id=myUsername;Password=myPassword;  Using the Easy Connect Naming Method (aka EZ Connect)

Fuente: http://www.solovb.net/index.php/2009/02/03/connection-strings-cadenas-de-conexion/

Page 15: Conexiónes de datos

http://www.connectionstrings.com/

The easy connect naming method enables clients to connect to a database without any configuration.Data Source=username/password@//myserver:1521/my.service.com;Port 1521 is used if no port number is specified in the connection string.

Make sure that EZCONNECT is enabled in the sqlnet.ora file. NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)

'//' in data source is optional and is there to enable URL style hostname values Easy Connect Naming Method to connect to an InstanceThis one does not specify a service or a port.Data Source=username/password@myserver//instancename;  Easy Connect Naming Method to connect to a dedicated server instanceThis one does not specify a service or a port.Data Source=username/password@myserver/myservice:dedicated/instancename;Other server options: SHARED, POOLED (to use instead of DEDICATED). Dedicated is the default. 

Specifying Pooling parametersBy default, connection pooling is enabled. This one controls the pooling mechanisms. The connection pooling service creates connection pools by using the ConnectionString property to uniquely identify a pool.Data Source=myOracle;User Id=myUsername;Password=myPassword;Min Pool Size=10;Connection Lifetime=120;Connection Timeout=60;Incr Pool Size=5;Decr Pool Size=2;The first connection opened creates the connection pool. The service initially creates the number of connections defined by the Min Pool Size parameter.

The Incr Pool Size attribute defines the number of new connections to be created by the connection pooling service when more connections are needed.

When a connection is closed, the connection pooling service determines whether the connection lifetime has exceeded the value of the Connection Lifetime attribute. If so, the connection is closed; otherwise, the connection goes back to the connection pool.

The connection pooling service closes unused connections every 3 minutes. The Decr Pool Size attribute specifies the maximum number of connections that can be closed every 3 minutes. Restricting Pool sizeUse this one if you want to restrict the size of the pool.

Fuente: http://www.solovb.net/index.php/2009/02/03/connection-strings-cadenas-de-conexion/

Page 16: Conexiónes de datos

http://www.connectionstrings.com/

Data Source=myOracle;User Id=myUsername;Password=myPassword;Max Pool Size=40;Connection Timeout=60;The Max Pool Size attribute sets the maximum number of connections for the connection pool. If a new connection is requested, but no connections are available and the limit for Max Pool Size has been reached the connection pooling service waits for the time defined by the Connection Timeout attribute. If the Connection Timeout time has been reached, and there are still no connections available in the pool, the connection pooling service raises an exception indicating that the request has timed-out. Disable PoolingData Source=myOracle;User Id=myUsername;Password=myPassword;Pooling=False;  Using Windows user authenticationOracle can open a connection using Windows user login credentials to authenticate database users.Data Source=myOracle;User Id=/;If the Password attribute is provided, it is ignored.

Operating System Authentication is not supported in a .NET stored procedure. Privileged ConnectionsOracle allows database administrators to connect to Oracle Database with either SYSDBA or SYSOPER privileges.Data Source=myOracle;User Id=myUsername;Password=myPassword;DBA Privilege=SYSDBA;SYSOPER is also valid for the DBA Privilege attribute. Runtime Connection Load BalancingOptimizes connection pooling for RAC database by balancing work requests across RAC instances.Data Source=myOracle;User Id=myUsername;Password=myPassword;Load Balancing=True;This feature can only be used against a RAC database and only if pooling is enabled (default). 

.NET Framework Data Provider for Oracle

Type:    .NET Framework Class LibraryUsage:  System.Data.OracleClient.OracleConnectionManufacturer:  MicrosoftMore info about this class library »

Fuente: http://www.solovb.net/index.php/2009/02/03/connection-strings-cadenas-de-conexion/

Page 17: Conexiónes de datos

http://www.connectionstrings.com/

Customize stringexample values »StandardData Source=MyOracleDB;Integrated Security=yes;This one works only with Oracle 8i release 3 or later Specifying username and passwordData Source=MyOracleDB;User Id=myUsername;Password=myPassword;Integrated Security=no;This one works only with Oracle 8i release 3 or laterMissing the System.Data.OracleClient namespace? Download .NET Managed Provider for OracleArticle: "Oracle Data Provider for .NET" by Rama Mohan Omiting tnsnames.oraThis is another type of Oracle connection string that doesn't rely on you to have a DSN for the connection. You create a connection string based on the format used in the tnsnames.ora file without the need to actually have one of these files on the client pc.SERVER=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=MyHost)(PORT=MyPort))(CONNECT_DATA=(SERVICE_NAME=MyOracleSID)));uid=myUsername;pwd=myPassword;  Some reported problems with the one above and Visual Studio. Use the next one if you've encountered problems.Data Source=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=MyHost)(PORT=MyPort))(CONNECT_DATA=(SERVICE_NAME=MyOracleSID)));User Id=myUsername;Password=myPassword;  Using Connection PoolingThe connection pooling service will create a new pool if it can't find any existing pool that exactly match the new connections connection string properties. If there is a matching pool a connection will be recycled from that pool.Data Source=myOracleDB;User Id=myUsername;Password=myPassword;Min Pool Size=10;Connection Lifetime=120;Connection Timeout=60;Incr Pool Size=5;Decr Pool Size=2;The first connection opened creates the connection pool. The service initially creates the number of connections defined by the Min Pool Size parameter.

The Incr Pool Size attribute defines the number of new connections to be created by the connection pooling service when more connections are needed.

When a connection is closed, the connection pooling service determines whether the Fuente: http://www.solovb.net/index.php/2009/02/03/connection-strings-cadenas-de-conexion/

Page 18: Conexiónes de datos

http://www.connectionstrings.com/

connection lifetime has exceeded the value of the Connection Lifetime attribute. If so, the connection is closed; otherwise, the connection goes back to the connection pool.

The connection pooling service closes unused connections every 3 minutes. The Decr Pool Size attribute specifies the maximum number of connections that can be closed every 3 minutes. Windows AuthenticationData Source=myOracleDB;User Id=/;  Privileged ConnectionWith SYSDBA privilegesData Source=myOracleDB;User Id=SYS;Password=SYS;DBA Privilege=SYSDBA;  Privileged ConnectionWith SYSOPER privilegesData Source=myOracleDB;User Id=SYS;Password=SYS;DBA Privilege=SYSOPER;  Utilizing the Password Expiration functionalityFirst open a connection with a connection string. When the connection is opened, an error is raised because the password have expired. Catch the error and execute the OpenWithNewPassword command supplying the new password.Data Source=myOracleDB;User Id=myUsername;Password=myPassword;

oConn.OpenWithNewPassword(sTheNewPassword);   Proxy AuthenticationData Source=myOracleDB;User Id=myUsername;Password=myPassword;Proxy User Id=pUserId;Proxy Password=pPassword;  

dotConnect for Oracle

Type:    .NET Framework Class LibraryUsage:  Devart.Data.Oracle.OracleConnectionManufacturer:  DevartMore info about this class library »Customize stringexample values »

Fuente: http://www.solovb.net/index.php/2009/02/03/connection-strings-cadenas-de-conexion/

Page 19: Conexiónes de datos

http://www.connectionstrings.com/

StandardUser ID=myUsername;Password=myPassword;Host=ora;Pooling=true;Min Pool Size=0;Max Pool Size=100;Connection Lifetime=0;  

Microsoft OLE DB Provider for Oracle

Type:    OLE DB ProviderUsage:  Provider=msdaoraManufacturer:  MicrosoftMore info about this provider »Customize stringexample values »Standard securityThis connection string uses a provider from Microsoft.Provider=msdaora;Data Source=MyOracleDB;User Id=myUsername;Password=myPassword;  Trusted connectionProvider=msdaora;Data Source=MyOracleDB;Persist Security Info=False;Integrated Security=Yes;  

Oracle Provider for OLE DB

Type:    OLE DB ProviderUsage:  Provider=OraOLEDB.OracleManufacturer:  OracleMore info about this provider »Customize stringexample values »Standard SecurityProvider=OraOLEDB.Oracle;Data Source=MyOracleDB;User Id=myUsername;Password=myPassword;  Trusted ConnectionThis one specifies OS authentication to be used when connecting to an Oracle database.Provider=OraOLEDB.Oracle;Data Source=MyOracleDB;OSAuthent=1;  

Fuente: http://www.solovb.net/index.php/2009/02/03/connection-strings-cadenas-de-conexion/

Page 20: Conexiónes de datos

http://www.connectionstrings.com/

Oracle XE, VB6 ADOProvider=OraOLEDB.Oracle;dbq=localhost:1521/XE;Database=myDataBase;User Id=myUsername;Password=myPassword;  Oracle XE, C++ ADOProvider=OraOLEDB.Oracle;Data Source=localhost:1521/XE;Initial Catalog=myDataBase;User Id=myUsername;Password=myPassword;  TNS-less connection stringProvider=OraOLEDB.Oracle;Data Source=(DESCRIPTION=(CID=GTU_APP)(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=myHost)(PORT=myPort)))(CONNECT_DATA=(SID=MyOracleSID)(SERVER=DEDICATED)));User Id=myUsername;Password=myPassword;  Controling rowset cache mechanismSpecifies the type of caching used by the provider to store rowset data. OraOLEDB provides two caching mechanisms; File and Memory.Provider=OraOLEDB.Oracle;Data Source=MyOracleDB;User Id=myUsername;Password=myPassword;CacheType=File;Memory is the default value. All the rowset data is stored in-memory which provides better performance at the expense of higher memory utilization.

File = All the rowset data is stored on disk. This caching mechanism limits the memory consumption at the expense of performance. Controling the fetchsizeThis one specifies the number of rows the provider will fetch at a time (fetch array).Provider=OraOLEDB.Oracle;Data Source=MyOracleDB;User Id=myUsername;Password=myPassword;FetchSize=200;The FetchSize value must be set appropriately depending on the data size and the response time of the network. If the value is set too high, this could result in more wait time during the execution of the query. If the value is set too low, this could result in many more round trips to the database. Valid values are 1 to 429,496,296. The default is 100. Controling the chunksizeThis one specifies the size, in bytes, of the data in LONG and LONG RAW columns fetched and stored in the provider cache.Provider=OraOLEDB.Oracle;Data Source=MyOracleDB;User Id=myUsername;Password=myPassword;ChunkSize=200;Providing a high value for this attribute improves performance, but requires more memory to store the data in the rowset. Valid values are 1 to 65535. The default is 100.

Fuente: http://www.solovb.net/index.php/2009/02/03/connection-strings-cadenas-de-conexion/

Page 21: Conexiónes de datos

http://www.connectionstrings.com/

 Using with Microsofts OLE DB .NET Data ProviderThe Microsoft OLE DB .NET Data Provider can utilize OraOLEDB as the OLE DB Provider for accessing Oracle. However this must be enabled in the connection string.Provider=OraOLEDB.Oracle;Data Source=MyOracleDB;User Id=myUsername;Password=myPassword;OLEDB.NET=True;The OLEDB.NET connection string attribute must not be used in ADO applications. Using OraOLEDB Custom Properties with Microsofts OLE DB .NET Data ProviderThe SPPrmsLOB and NDatatype properties can only be set as connection string attributes when OraOLEDB is used by OLE DB .NET Data Provider.Provider=OraOLEDB.Oracle;Data Source=MyOracleDB;User Id=myUsername;Password=myPassword;OLEDB.NET=True; SPPrmsLOB=False;NDatatype=False;SPPrmsLOB=False;Using ADO, these properties would have been set as a property on the command. This is not possible if using the Microsofts OLE DB .NET Data Provider. So the properties are specified in the connection string instead.

PLSQLRSet: If the stored procedure, provided by the consumer, returns a rowset, PLSQLRSet must be set to TRUE (enabled).

NDatatype: This property allows the consumers to specify whether any of the parameters bound to the command are of Oracle's N datatypes (NCHAR, NVARCHAR or NCLOB). This information is required by OraOLEDB to detect and bind the parameters appropriately. This property should not be set for commands executing SELECT statements. However, this property must be set for all other SQLs such as INSERT, UPDATE, and DELETE.

SPPrmsLOB: This property allows the consumer to specify whether one or more of the parameters bound to the stored procedures are of Oracle's LOB datatype (CLOB, BLOB, or NCLOB). OraOLEDB requires this property to be set to TRUE, in order to fetch the parameter list of the stored procedure prior to execution. The use of this property limits the processing overhead to stored procedures having one or more LOB datatype parameters. Using distributed transactionsThis one specifies sessions to enlist in distributed transactions. This is the default behaviour.Provider=OraOLEDB.Oracle;Data Source=MyOracleDB;User Id=myUsername;Password=myPassword;DistribTX=1;Valid values are 0 (disabled) and 1 (enabled). 

.NET Framework Data Provider for OLE DBFuente: http://www.solovb.net/index.php/2009/02/03/connection-strings-cadenas-de-conexion/

Page 22: Conexiónes de datos

http://www.connectionstrings.com/

Type:    .NET Framework Wrapper Class LibraryUsage:  System.Data.OleDb.OleDbConnectionManufacturer:  MicrosoftMore info about this wrapper class library »Customize stringexample values »Bridging to Oracle Provider for OLE DBThis is just one connection string sample for the wrapping OleDbConnection class that calls the underlying OLEDB provider. See respective OLE DB provider for more connection strings to use with this class.Provider=OraOLEDB.Oracle;Data Source=MyOracleDB;User Id=myUsername;Password=myPassword;OLEDB.NET=True;Note! The keyword "OLEDB.NET" must be set to "True" for the OraOLEDB.Oracle provider to function with the .NET Framework Data Provider for OLE DB. 

Oracle in OraHome92

Type:    ODBC DriverUsage:  Driver={Oracle in OraHome92}Manufacturer:  OracleCustomize stringexample values »StandardDriver={Oracle in OraHome92};Dbq=myTNSServiceName;Uid=myUsername;Pwd=myPassword;  

Microsoft ODBC for Oracle

Type:    ODBC DriverUsage:  Driver={Microsoft ODBC for Oracle}Manufacturer:  MicrosoftMore info about this driver »Customize stringexample values »New versionDriver={Microsoft ODBC for Oracle};Server=myServerAddress;Uid=myUsername;Pwd=myPassword;  Connect directlyNo TSN nor DSN required.

Fuente: http://www.solovb.net/index.php/2009/02/03/connection-strings-cadenas-de-conexion/

Page 23: Conexiónes de datos

http://www.connectionstrings.com/

ODBC;Driver={Microsoft ODBC for Oracle};Server=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=199.199.199.199)(PORT=1523))(CONNECT_DATA=(SID=dbName)));Uid=myUsername;Pwd=myPassword;  

Microsoft ODBC Driver for Oracle

Type:    ODBC DriverUsage:  Driver={Microsoft ODBC Driver for Oracle}Manufacturer:  MicrosoftMore info about this driver »Customize stringexample values »Old versionDriver={Microsoft ODBC Driver for Oracle};ConnectString=OracleServer.world;Uid=myUsername;Pwd=myPassword;  

Oracle in XEClient

Type:    ODBC DriverUsage:  Driver=(Oracle in XEClient)Manufacturer:  OracleCustomize stringexample values »StandardOracle XE (or "Oracle Database 10g Express Edition") is a simple version that's free to distribute.Driver=(Oracle in XEClient);dbq=111.21.31.99:1521/XE;Uid=myUsername;Pwd=myPassword;  

.NET Framework Data Provider for ODBC

Type:    .NET Framework Wrapper Class LibraryUsage:  System.Data.Odbc.OdbcConnectionManufacturer:  MicrosoftMore info about this wrapper class library »

Fuente: http://www.solovb.net/index.php/2009/02/03/connection-strings-cadenas-de-conexion/

Page 24: Conexiónes de datos

http://www.connectionstrings.com/

Customize stringexample values »Bridging to Oracle in OraHome92 ODBC DriverThis is just one connection string sample for the wrapping OdbcConnection class that calls the underlying ODBC Driver. See respective ODBC driver for more connection strings to use with this class.Driver={Oracle in OraHome92};Server=myServerAddress;Dbq=myDataBase;Uid=myUsername;Pwd=myPassword;  

MSDataShape

Type:    Data Shaping COM componentUsage:  Provider=MSDataShape;Data Provider=providernameManufacturer:  MicrosoftMore info about this wrapper COM component »Customize stringexample values »MSDataShapeProvider=MSDataShape;Persist Security Info=False;Data Provider=MSDAORA;Data Source=orac;User Id=myUsername;Password=myPassword;Want to learn data shaping? Check out 4GuyfFromRolla's (old but great) article about Data Shaping

Conexion MySQL

StandardServer=myServerAddress;Database=myDataBase;Uid=myUsername;Pwd=myPassword;Default port is 3306. Specifying portServer=myServerAddress;Port=1234;Database=myDataBase;Uid=myUsername;Pwd=myPassword;

Fuente: http://www.solovb.net/index.php/2009/02/03/connection-strings-cadenas-de-conexion/

Page 25: Conexiónes de datos

http://www.connectionstrings.com/

Download the driver at MySQL Developer Zone Named pipesServer=myServerAddress;Port=-1;Database=myDataBase;Uid=myUsername;Pwd=myPassword;It is the port value of -1 that tells the driver to use named pipes network protocol. This is available on Windows only. The value is ignored if Unix socket is used. Multiple serversUse this to connect to a server in a replicated server configuration without concern on which server to use.Server=serverAddress1 & serverAddress2 & etc..;Database=myDataBase;Uid=myUsername;Pwd=myPassword;  Using encryptionThis one activates SSL encryption for all data sent between the client and server. The server needs to have a certificate installed.Server=myServerAddress;Database=myDataBase;Uid=myUsername;Pwd=myPassword;Encryption=true;This option is available from Connector/NET version 5.0.3. In earlier versions, this option has no effect. Using encryption, alternativeSome reported problems with the above one. Try replacing the key "Encryption" with "Encrypt" instead.Server=myServerAddress;Database=myDataBase;Uid=myUsername;Pwd=myPassword;Encrypt=true;  Specifying default command timeoutUse this one to specify a default command timeout for the connection. Please note that the property in the connection string does not supercede the individual command timeout property on an individual command object.Server=myServerAddress;Database=myDataBase;Uid=myUsername;Pwd=myPassword;default command timeout=20;This option is available from Connector/NET version 5.1.4. Specifying connection attempt timeoutUse this one to specify the length in seconds to wait for a server connection before terminating the attempt and receive an error.Server=myServerAddress;Database=myDataBase;Uid=myUsername;Pwd=myPassword;Connection Timeout=5;  

Fuente: http://www.solovb.net/index.php/2009/02/03/connection-strings-cadenas-de-conexion/

Page 26: Conexiónes de datos

http://www.connectionstrings.com/

Inactivating prepared statementsUse this one to instruct the provider to ignore any command prepare statements and prevent corruption issues with server side prepared statements.Server=myServerAddress;Database=myDataBase;Uid=myUsername;Pwd=myPassword;Ignore Prepare=true;The option was added in Connector/NET version 5.0.3 and Connector/NET version 1.0.9. Specifying portUse this one to specify what port to use for the connection.Server=myServerAddress;Database=myDataBase;Uid=myUsername;Pwd=myPassword;Port=3306;The port 3306 is the default MySql port.

The value is ignored if Unix socket is used. Specifying network protocolUse this one to specify which network protocol to use for the connection.Server=myServerAddress;Database=myDataBase;Uid=myUsername;Pwd=myPassword; Protocol=socket;"socket" is the default value used if the key isn't specified. Value "tcp" is an equivalent for "socket".

Use "pipe" to use a named pipes connection, "unix" for a Unix socket connection and "memory" to use MySQL shared memory. Specifying character setUse this one to specify which character set to use to encode queries sent to the server.Server=myServerAddress;Database=myDataBase;Uid=myUsername;Pwd=myPassword; CharSet=UTF8;Note that resultsets still are returned in the character set of the data returned. Specifying shared memory nameUse this one to specify the shared memory object name used for the communication.Server=myServerAddress;Database=myDataBase;Uid=myUsername;Pwd=myPassword;Shared Memory Name=MYSQL;This one is applicable only when the connection protocol value is set to "memory". 

eInfoDesigns.dbProvider

Type:    .NET Framework Class LibraryUsage:  eInfoDesigns.dbProvider.MySqlClient.MySqlConnection

Fuente: http://www.solovb.net/index.php/2009/02/03/connection-strings-cadenas-de-conexion/

Page 27: Conexiónes de datos

http://www.connectionstrings.com/

Manufacturer:  eInfoDesignsMore info about this class library »Customize stringexample values »StandardData Source=myServerAddress;Database=myDataBase;User ID=myUsername;Password=myPassword;Command Logging=false;  

SevenObjects MySqlClient

Type:    .NET Framework Class LibraryUsage:  Manufacturer:  SevenObjectsMore info about this class library »Customize stringexample values »StandardHost=myServerAddress;UserName=myUsername;Password=myPassword;Database=myDataBase;  

dotConnect for MySQL (former MyDirect.NET and Core Labs MySQLDirect.NET)

Type:    .NET Framework Class LibraryUsage:  Devart.Data.MySql.MySqlConnectionManufacturer:  DevartMore info about this class library »Customize stringexample values »StandardUser ID=root;Password=myPassword;Host=localhost;Port=3306;Database=myDataBase; Direct=true;Protocol=TCP;Compress=false;Pooling=true;Min Pool Size=0;Max Pool Size=100;Connection Lifetime=0;Read more at Devart (former Core Lab) 

MySQLDriverCS

Fuente: http://www.solovb.net/index.php/2009/02/03/connection-strings-cadenas-de-conexion/

Page 28: Conexiónes de datos

http://www.connectionstrings.com/

Type:    .NET Framework Class LibraryUsage:  MySQLDriverCS.MySQLConnectionManufacturer:  MySQLDriverCS project teamMore info about this class library »Customize stringexample values »StandardLocation=myServerAddress;Data Source=myDataBase;User ID=myUsername;Password=myPassword;Port=3306;Extended Properties="""";This is a free simple .NET compliant MySQL driver.Project space at SourceForge 

MySQL OLEDB

Type:    OLE DB ProviderUsage:  Provider=MySQLProvManufacturer:  MySQLMore info about this provider »Customize stringexample values »StandardProvider=MySQLProv;Data Source=mydb;User Id=myUsername;Password=myPassword;  

.NET Framework Data Provider for OLE DB

Type:    .NET Framework Wrapper Class LibraryUsage:  System.Data.OleDb.OleDbConnectionManufacturer:  MicrosoftMore info about this wrapper class library »Customize stringexample values »Bridging to MySQL OLEDBThis is just one connection string sample for the wrapping OleDbConnection class that calls the underlying OLEDB provider. See respective OLE DB provider for more connection strings to use with this class.Provider=MySQLProv;Data Source=mydb;User Id=myUsername;Password=myPassword;  

Fuente: http://www.solovb.net/index.php/2009/02/03/connection-strings-cadenas-de-conexion/

Page 29: Conexiónes de datos

http://www.connectionstrings.com/

MyODBC 2.50

Type:    ODBC DriverUsage:  Driver={mySQL}Manufacturer:  MySQLMore info about this driver »Customize stringexample values »Local databaseDriver={mySQL};Server=localhost;Option=16834;Database=myDataBase;  Remote databaseDriver={mySQL};Server=myServerAddress;Option=131072;Stmt=;Database=myDataBase; User=myUsername;Password=myPassword;  Specifying TCP/IP portDriver={mySQL};Server=myServerAddress;Port=3306;Option=131072;Stmt=; Database=myDataBase; User=myUsername;Password=myPassword;The driver defaults to port value 3306, if not specified in the connection string, as 3306 is the default port for MySQL. 

MySQL Connector/ODBC 3.51

Type:    ODBC DriverUsage:  Driver={MySQL ODBC 3.51 Driver}Manufacturer:  MySQLMore info about this driver »Customize stringexample values »Local databaseDriver={MySQL ODBC 3.51 Driver};Server=localhost;Database=myDataBase; User=myUsername;Password=myPassword;Option=3;  Remote databaseDriver={MySQL ODBC 3.51 Driver};Server=myServerAddress;Database=myDataBase;User=myUsername; Password=myPassword;Option=3;  Specifying TCP/IP port

Fuente: http://www.solovb.net/index.php/2009/02/03/connection-strings-cadenas-de-conexion/

Page 30: Conexiónes de datos

http://www.connectionstrings.com/

Driver={MySQL ODBC 3.51 Driver};Server=myServerAddress;Port=3306;Database=myDataBase;User=myUsername; Password=myPassword;Option=3;The driver defaults to port value 3306, if not specified in the connection string, as 3306 is the default port for MySQL. Specifying character setDriver={MySQL ODBC 3.51 Driver};Server=myServerAddress;charset=UTF8;Database=myDataBase;User=myUsername; Password=myPassword;Option=3;Note that the charset option works from version 3.51.17 of the driver. Specifying socketThis one specifies the Unix socket file or Windows named pipe to connect to. Used only for local client connections.Driver={MySQL ODBC 3.51 Driver};Server=myServerAddress;Database=myDataBase;User=myUsername; Password=myPassword;Socket=MySQL;Option=3;On Windows, the socket variable is the name of the named pipe that is used for local client connections. The default value is MySQL.

On Unix platforms, the socket variable is the name of the socket file that is used for local client connections. The default is /tmp/mysql.sock. Using SSLDriver={MySQL ODBC 3.51 Driver};Server=myServerAddress;Database=myDataBase;User=myUsername; Password=myPassword;sslca=c:\cacert.pem;sslcert=c:\client-cert.pem;sslkey=c:\client-key.pem;sslverify=1;Option=3;SSLCA specifies the path to a file with a list of trust SSL CAs

SSLCERT specifies the name of the SSL certificate file to use for establishing a secure connection.

SSLKEY specifies the name of the SSL key file to use for establishing a secure connection. 

MySQL Connector/ODBC 5.1

Type:    ODBC DriverUsage:  Driver={MySQL ODBC 5.1 Driver}Manufacturer:  MySQLMore info about this driver »

Fuente: http://www.solovb.net/index.php/2009/02/03/connection-strings-cadenas-de-conexion/

Page 31: Conexiónes de datos

http://www.connectionstrings.com/

Customize stringexample values »Local databaseDriver={MySQL ODBC 5.1 Driver};Server=localhost;Database=myDataBase; User=myUsername;Password=myPassword;Option=3;  Remote databaseDriver={MySQL ODBC 5.1 Driver};Server=myServerAddress;Database=myDataBase;User=myUsername; Password=myPassword;Option=3;  Specifying TCP/IP portDriver={MySQL ODBC 5.1 Driver};Server=myServerAddress;Port=3306;Database=myDataBase;User=myUsername; Password=myPassword;Option=3;The driver defaults to port value 3306, if not specified in the connection string, as 3306 is the default port for MySQL. Specifying character setDriver={MySQL ODBC 5.1 Driver};Server=myServerAddress;charset=UTF8;Database=myDataBase;User=myUsername; Password=myPassword;Option=3;  Specifying socketThis one specifies the Unix socket file or Windows named pipe to connect to. Used only for local client connections.Driver={MySQL ODBC 5.1 Driver};Server=myServerAddress;Database=myDataBase;User=myUsername; Password=myPassword;Socket=MySQL;Option=3;On Windows, the socket variable is the name of the named pipe that is used for local client connections. The default value is MySQL.

On Unix platforms, the socket variable is the name of the socket file that is used for local client connections. The default is /tmp/mysql.sock. Using SSLDriver={MySQL ODBC 5.1 Driver};Server=myServerAddress;Database=myDataBase;User=myUsername; Password=myPassword;sslca=c:\cacert.pem;sslcert=c:\client-cert.pem;sslkey=c:\client-key.pem;sslverify=1;Option=3;SSLCA specifies the path to a file with a list of trust SSL CAs

Fuente: http://www.solovb.net/index.php/2009/02/03/connection-strings-cadenas-de-conexion/

Page 32: Conexiónes de datos

http://www.connectionstrings.com/

SSLCERT specifies the name of the SSL certificate file to use for establishing a secure connection.

SSLKEY specifies the name of the SSL key file to use for establishing a secure connection. 

.NET Framework Data Provider for ODBC

Type:    .NET Framework Wrapper Class LibraryUsage:  System.Data.Odbc.OdbcConnectionManufacturer:  MicrosoftMore info about this wrapper class library »Customize stringexample values »Bridging to MySQL Connector/ODBC 5.1This is just one connection string sample for the wrapping OdbcConnection class that calls the underlying ODBC Driver. See respective ODBC driver for more connection strings to use with this class.Driver={MySQL ODBC 5.1 Driver};Server=localhost;Database=myDataBase; User=myUsername;Password=myPassword;Option=3; 

Fuente: http://www.solovb.net/index.php/2009/02/03/connection-strings-cadenas-de-conexion/