Oracle Connection string Backup

Source: Internet
Author: User
Tags connection pooling oracleconnection

Oracle XE

Standard connection

Oracle XE (or "Oracle Database 10g Express Edition") is a simple and free release.

The following are the syntax formats: driver=(Oracle in xeclient); dbq=111.21.31.99:1521/xe; uid=MyUserName; pwd=mypassword;

Odbc

New version Connection mode

The following are the syntax formats: driver={Microsoft ODBC for Oracle}; server=myserveraddress; uid=MyUserName; pwd=mypassword;

Old version Connection mode

The following are the syntax formats: driver={Microsoft ODBC Driver for Oracle}; connectstring=Oracleserver.world; uid=MyUserName; pwd=mypassword;

OLE DB, OleDbConnection (. NET)

Standard secure connection

This connection is using provider from Microsoft.

The following are the syntax formats: provider=msdaora; Data source=myoracledb; User id=myusername; password=mypassword;

Trust connection

The following are the syntax formats: provider=msdaora; Data source=myoracledb; Persist Security info=False; Integrated security=Yes;

Standard secure connection

This connection uses the provider from Oracle.

The following are the syntax formats: provider=oraoledb.oracle; Data source=myoracledb; User id=myusername; password=mypassword;

Trust connection

The following are the syntax formats: provider=oraoledb.oracle; Data source=myoracledb; osauthent=1;

The following are the syntax formats: 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 following are the syntax formats: Data source=torcl; User id=myusername; password=mypassword;

Connection with integrated security

The following are the syntax formats: Data source=torcl; Integrated security=SSPI;

connection with odp.net without Tnsnames.ora

The following are the syntax formats: 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 following are the syntax formats: Data source=myoracledb; Integrated security=Yes

Only in Oracle8i Release 3 or later

Indicates the user secret connection to the password

The following are the syntax formats: Data source=myoracledb; User id=myusername; password=mypassword; Integrated security=No;

This is another way to connect without relying on your dns.you create a connection string based on the format used in the Tnsnames.ora file without the need to act Ually has one of the these files on the client PC.

The following are the syntax formats: 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 following are the syntax formats: Data source= (description= (address= (protocol=tcp) (Host=myhost) (Port=myport)) (Connect_data= (service_name= (MYORACLESID))); User id=myusername; password=mypassword;

Using connection pooling

Connection Pooling Service If you cannot find a connection that exactly matches the connection string, he will create one. If the connection can be found, it will be reused.

The following are the syntax formats: 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 authentication

The following are the syntax formats: Data source=myoracledb; User id=/;

Privileged connections

privileges to use Sysoper

The following are the syntax formats: Data source=myoracledb; User id=SYS; password=SYS; DBA privilege=sysoper;

Using the password termination function

When the connection is opened for the first time, a password expiration error is thrown when the link is opened, capturing the error and executing the Openwithnewpassword command line setting the new password.

The following are the syntax formats: Data source=myoracledb; User id=myusername; password=mypassword;
Oconn.openwithnewpassword (Sthenewpassword);

Agent Authentication

The following are the syntax formats:
Data source=myoracledb; User id=myusername; password=mypassword; Proxy User id=Puserid; Proxy password=ppassword;

Core Labs oradirect (. NET)

Standard connection

The following are the syntax formats: User id=myusername; password=mypassword; host=Ora; Pooling=true; Min Pool size=0; Max Pool size=; Connection lifetime=0;

Data Shape

MS Data Shape

The following are the syntax formats: 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.