Oracle Client Installation Configuration

Source: Internet
Author: User

Vi/home/oracle/.bashrc

Umask 022

Oracle_base=/usr/lib/oracle

Oracle_home= $ORACLE _base/11.2/client64

Path= $ORACLE _home/bin: $PATH

Ld_library_path= $ORACLE _home/lib

Tns_admin=/usr/lib/oracle/11.2/client/network/admin

Export ld_library_path oracle_base oracle_home PATH tns_admin

Note Ld_library_path must be added otherwise you will not find libsqlplus.so


Download Oracle 11g sqlplus Software

Http://www.oracle.com/technology/software/tech/oci/instantclient/index.html

oracle-instantclient11.2-basic-11.2.0.2.0.x86_64.rpm

oracle-instantclient11.2-sqlplus-11.2.0.2.0.x86_64.rpm

oracle-instantclient11.2-devel-11.2.0.2.0.x86_64.rpm

Installing RPM Packages

RPM-IVH oracle-instantclient11.2-basic-11.2.0.2.0.x86_64.rpm

RPM-IVH oracle-instantclient11.2-sqlplus-11.2.0.2.0.x86_64.rpm

RPM-IVH oracle-instantclient11.2-devel-11.2.0.2.0.x86_64.rpm

Specify the libraries required for the Sqlplus to run

Because the RPM package is installed, the default path for the Oracle client is/usr/lib/oracle/11.2/client64/lib/

#vi/etc/ld.so.conf

In the last addition:/usr/lib/oracle/11.2/client64/lib

Restart Ldconfig

Ldconfig


Using the root user login, create the Network/admin directory under the/usr/lib/oracle/11.2/client64 directory and add the Tnsnames.ora file in this directory. and configure the Tnsnames.ora file (keep consistent with DBA creation Oracle Library)

Listener_tmsdb =

(ADDRESS = (PROTOCOL = TCP) (HOST = 192.168.14.102) (PORT = 1530))


Tmsdb =

(DESCRIPTION =

(ADDRESS = (PROTOCOL = TCP) (HOST = 192.168.14.102) (PORT = 1530))

(Connect_data =

(SERVER = dedicated)

(service_name = tmsdb.99bill.com)

)

)

Through the JDBC

Jdbc.driver=oracle.jdbc.driver.oracledriver

#jdbc. Url=jdbc:oracle:thin: @oracleIP: 1530:tmsdb

Jdbc.url=jdbc:oracle:thin:@//oracleip:1530/tmsdb.99bill.com (two ways to connect to a database one through TNS one is through the database name)

jdbc.username=nlcmp

jdbc.password=nlcmp980

Hibernate.dialect=org.hibernate.dialect.oracledialect


This article is from the "Davideylee" blog, make sure to keep this source http://davideylee.blog.51cto.com/8703117/1533230

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.