Oracle connection string Summary

Source: Internet
Author: User
Tags oracleconnection

Oracle XE

Standard connection

Oracle xe (or "Oracle Database 10g express edition") is a simple and free version. The syntax format is as follows:

Driver = (Oracle in xeclient); DBQ = 111.21.31.99: 1521/Xe; uid = myusername; Pwd = mypassword;

 

ODBC

The connection mode for the new version is as follows:

Driver = {Microsoft ODBC for Oracle}; server = myserveraddress; uid = myusername; Pwd = mypassword;

The connection mode for earlier versions is as follows:

Driver = {Microsoft ODBC driver for Oracle}; connectstring = oracleserver. World; uid = myusername; Pwd = mypassword;

 

Ole db, oledbconnection (. NET)

Standard secure connection

This connection method uses provider from Microsoft. The syntax format is as follows:

Provider = msdaora; Data Source = myoracledb; user id = myusername; Password = mypassword;

The following syntax format is used for trust connections:

Provider = msdaora; Data Source = myoracledb; persist Security info = false; Integrated Security = yes;

Standard secure connection

This connection method uses the provider from Oracle. The syntax format is as follows:

Provider = oraoledb. Oracle; Data Source = myoracledb; user id = myusername; Password = mypassword;

The following syntax format is used for trust connections:

Provider = oraoledb. Oracle; Data Source = myoracledb; paiuthent = 1;

 

TNS-less connection string

The syntax format is as follows:

Provider = 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;

 

Oracle. dataaccess. Client. oracleconnection

Standard connection

The syntax format is as follows:

Data Source = torcl; user id = myusername; Password = mypassword;

Connections with integrated security

The syntax format is as follows:

Data Source = torcl; Integrated Security = sspi;

Connection with ODP. Net Without tnsnames. ora

The syntax format is as follows:

Data Source = (description = (address_list = (address = (Protocol = TCP) (host = myhost) (Port = myport) (CONNECT_DATA = (Server = dedicated) (SERVICE_NAME = myoraclesid); User ID = myusername; Password = mypassword;

Oracleconnection, Oracle data provider, ODP. net, system. Data. oracleclient. oracleconnection

Standard connection

The syntax format is as follows:

Data Source = myoracledb; Integrated Security = Yes

Only in Oracle8i Release 3 or later

Specify the connection between user password and password

The syntax format is as follows:

Data Source = myoracledb; user id = myusername; Password = mypassword; Integrated Security = no;

This one works only with Oracle 8i Release 3 or later

Omit tnsnames. ora

This is another connection method that does not depend on your DNS. 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.

The syntax format is as follows:

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.

The syntax format is as follows:

Data Source = (description = (address = (Protocol = TCP) (host = myhost) (Port = myport) (CONNECT_DATA = (SERVICE_NAME = myoraclesid ))); user ID = myusername; Password = mypassword;

Use connection pool

If the connection pool service cannot find a connection that completely matches the connection string, it will create a connection. If the connection can be found, it will be used again.

The syntax format is as follows:

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;

Windows Verification

The syntax format is as follows:

Data Source = myoracledb; user id = /;

Privileged connection

Use the sysoper privilege

The syntax format is as follows:

Data Source = myoracledb; user id = sys; Password = sys; DBA privilege = sysoper;

Use a password to terminate a function

When the connection is opened for the first time, a password expiration error is thrown after the link is opened. capture this error and run the openwithnewpassword command to set a new password.

The syntax format is as follows:

Data Source = myoracledb; user id = myusername; Password = mypassword;

Oconn. openwithnewpassword (sthenewpassword );

Proxy Verification

The syntax format is as follows:

Data Source = myoracledb; user id = myusername; Password = mypassword; proxy user id = puserid; proxy Password = ppassword;

Core labs oradirect (. NET)

The following is the syntax format of the standard connection:

User ID = myusername; Password = mypassword; host = ora; pooling = true; min pool size = 0; Max pool size = 100; connection lifetime = 0;

Data shape

MS data shape

The syntax format is as follows:

Provider = msdatashape.1; persist Security info = false; data provider = msdaora; Data Source = Orac; user id = myusername; Password = mypassword;

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.