Oracle connection string code

Source: Internet
Author: User
  • ODBC
    New Version
    Driver = {Microsoft ODBC for Oracle}; server = myserveraddress; uid = myusername; Pwd = mypassword;
    Old Version
    Driver = {Microsoft ODBC driver for Oracle}; connectstring = oracleserver. World; uid = myusername; Pwd = mypassword;
    Ole db, oledbconnection (. NET)
    Standard connection
    This connection string is applicable to Microsoft drivers.
    Provider = msdaora; Data Source = myoracledb; user id = myusername; Password = mypassword;
    Trusted connection
    Provider = msdaora; Data Source = myoracledb; persist Security info = false; Integrated Security = yes;
    Standard connection
    The driver provided by Oracle.
    Provider = oraoledb. Oracle; Data Source = myoracledb; user id = myusername; Password = mypassword;
    Trusted connection
    Provider = oraoledb. Oracle; Data Source = myoracledb; paiuthent = 1;
    Oracle. dataaccess. Client. oracleconnection
    Standard
    Data Source = torcl; user id = myusername; Password = mypassword;
    Standard secure connection
    Data Source = torcl; Integrated Security = sspi;
    Use ODP. net instead of tnsnames. ora
    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
    Data Source = myoracledb; Integrated Security = yes;
    For 8i RC3 and later versions
    User name and password
    Data Source = myoracledb; user id = myusername; Password = mypassword; Integrated Security = no;
    For 8i RC3 and later versions
    Ignore tnsnames. ora
    Another connection method that does not require DSN.
    Server = (description = (address = (Protocol = TCP)

    (Host = myhost) (Port = myport) (CONNECT_DATA = (SERVICE_NAME = myoraclesid); uid = myusername; Pwd = mypassword;
    Using the above connection string may cause Visual Studio to report errors. If you encounter these problems during use, use the following connection method.
    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 program cannot find an existing connection pool, it creates a new pool based on the connection string. Otherwise, the existing connection in the pool will be used cyclically.
    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
    Data Source = myoracledb; user id = /;
    Privileged connection
    Use sysdba
    Data Source = myoracledb; user id = sys; Password = sys; DBA privilege = sysdba;
    Privileged connection
    Use sysoper
    Data Source = myoracledb; user id = sys; Password = sys; DBA privilege = sysoper;
    Password Expiration Process
    When a "password expired" error occurs when you connect to the database using a connection string, run the openwithnewpassword command to provide the new password.
    Data Source = myoracledb; user id = myusername; Password = mypassword;

    Oconn. openwithnewpassword (sthenewpassword );
    Proxy Verification
    Data Source = myoracledb; user id = myusername; Password = mypassword;

    Proxy user id = puserid; proxy Password = ppassword;
    Core labs oradirect (. NET)
    Standard
    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
    Provider = msdatashape.1; persist Security info = false; data provider = msdaora; Data Source = Orac; user id = myusername; Password = mypassword;

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.