Oracle Instanc Client installation command tool

Source: Internet
Author: User

Oracle Instanc Client installation command tool
Prerequisites

1. Linux RHEL 6.X X86_64 Operating System

2. Oracle-related files (same OS) can be obtained from the server where the Oracle server is installed)

Software Download

Download the following software package from the Oracle Website:

1) instantclient-basic-linux.x64-11.2.0.4.0.zip (59.282 MB)

2)instantclient-sqlplus-linux.x64-11.2.0.4.0.zip (815KB)

3)instantclient-sdk-linux.x64-11.2.0.4.0.zip (629KB)

4)instantclient-jdbc-linux.x64-11.2.0.4.0.zip (1.572 MB)

The download URL of the Oracle software package is as follows:

Http://www.oracle.com/technetwork/topics/linuxx86-64soft-092277.html

Configuration process

The key to the configuration process is the configuration of environment variables. Configure the environment variables according to your actual situation.

Configure SQLPLUS

1. Log On As the root user and create the directory mkdir-p/opt/oracle.

2. Decompress all the software packages to the/opt/oracle directory:

# Unzp instantclient-basic-linux.x64-11.2.0.4.0.zip-d/opt/oracle

Note: All files will be automatically decompressed to the/opt/oracle/instantclient_11_2 directory.

3. Create configuration file

# Vi/opt/oracle/instantclie_11_2/tnsnames. ora

CZJGBS =

(DESCRIPTION =

(ADDRESS = (PROTOCOL = TCP) (HOST = 81.17.1.23) (PORT = 1521) // ip address to be connected

(CONNECT_DATA =

(SERVER = DEDICATED)

(SERVICE_NAME = czjgbs) // instance to be connected

)

)

 

EXTPROC_CONNECTION_DATA =

(DESCRIPTION =

(ADDRESS_LIST =

(ADDRESS = (PROTOCOL = IPC) (KEY = EXTPROC1 ))

)

(CONNECT_DATA =

(SID = PLSExtProc)

(PRESENTATION = RO)

)

)

Add the following configuration to the test user environment variables that require Oracle functionality:

# Vi ~ /. Bashrc

Export NLS_LANG = AMERICAN_AMERICA.ZHS16GBK

Export ORACLE_HOME =/opt/oracle/instantclient_11_2

Export TNS_ADMIN = $ ORACLE_HOME

Export PATH = $ PATH: $ HOME/bin: $ ORACLE_HOME

Export LD_LIBRARY_PATH = $ ORACLE_HOME:/usr/lib

Export ORACLE_SID = czjgbs // (name of the instance to be connected)

Note: The TNS_ADMIN environment variable is used to specify the path of the tnsnames. ora file.

# Source ~ /. Bashrc

Test sqlplus command:

$ Sqlplus scott/tiger @ ora215

SQL * Plus: Release 10.2.0.4.0-Productionon Friday August 3 10:41:44 2012

Copyright (c) 1982,200 7, Oracle. All Rights Reserved.

 

Oracle Database 10g Enterprise EditionRelease 10.2.0.4.0-64bit Production

With the Partitioning, Real applicationters ters, OLAP, Data Mining

And Real Application Testing options

SQL>

Configure tnsping

Return to the root user and obtain the necessary files on other Oracle machines.

# Cd/opt/oracle/instantclient_11_2/

# Scp root@192.168.21.16:/oracle/orahome/product/11.2.0/bin/tnsping ./

The above command is to copy files from other servers that install the Oracle server.

# Mkdir-p network/mesg

# Cd network/mesg

# Scp root@192.168.21.16:/oracle/orahome/product/11.2.0/network/mesg/tnsus. msb ./

Tnsping tool:

$ Tnsping ora16

Configure SQLLDR

Oracle's InstantClient comes with no sqlldr consolidation and also needs to obtain relevant files from the Oracle server.

Log on as a root user:

# Cd/opt/oracle/instantclient_11_2/

# Scproot@192.168.21.16:/oracle/orahome/product/11.2.0/bin/sqlldr ./

# Mkdir-p rdbms/mesg/

# Cd rdbms/mesg/

# Scp root@192.168.21.16:/oracle/orahome/product/11.2.0/rdbms/mesg/ulus. msb ./

Run sqlldr in the test user:

$ Sqlldr

Configure IMP/EXP

Log on as a root user and copy related files from the Oracle server.

# Cd/opt/oracle/instantclient_11_2/

# Scp 192.168.21.16:/oracle/orahome/product/11.2.0/bin/imp ./

# Scp192.168.21.16:/oracle/orahome/product/11.2.0/bin/exp ./

# Cd rdbms/mesg/

# Scp192.168.21.16:/oracle/orahome/product/11.2.0/rdbms/mesg/impus. msb ./

# Scp 192.168.21.16:/oracle/orahome/product/10.2.0/rdbms/mesg/expus. msb ./

 

Appendix

 

Install the Oracle client InstantClient in Linux, but it lacks SQL * Loader, EXP, and other tools. This article describes how to install these command tools.

Copy the sqlldr executable file directly from the installation path of the database server of the same version. If you execute sqlldr, the following error will be reported:

Message 2100 notfound; No message file for product = RDBMS, facility = ULMessage 2100 not found; Nomessage file for product = RDBMS, facility = UL [etl @ m1 instantclient_10_2] $ ^ C

In fact, the Instant Client can only copy files when installing sqlldr. The error is because you still need to copy the following information file.

First, find the tnsus. msb file under $ ORACLE_HOME/network/mesg and the ulus. msb file under $ ORACLE_HOME/rdbms/mesg on the Oracle Database Server.

Copy them to the corresponding directory in the installation directory of InstantClient. For example:/usr/ocal/instantclient_10_2/[rdbms/mesg and network/mesg].

Now you can use the SQL * Loader tool.

If you just copy the executable file to the corresponding directory and configure the EXP and imp tools, the following error is reported:

Message 2100 notfound; No message file for product = RDBMS, facility = ULMessage 2100 not found; Nomessage file for product = RDBMS, facility = UL [etl @ m1 instantclient_10_2]

In this case, you need to find expus. msb and impus. msb under rdbms/mesg from the installation directory of the Oracle database server, and copy them to the corresponding directory to solve the problem.

Migration from 32-bit to 64-bit for a single Oracle instance

Install Oracle 11gR2 (x64) in CentOS 6.4)

Steps for installing Oracle 11gR2 in vmwarevm

Install Oracle 11g XE R2 In Debian

Oracle RAC 11.2 (12C) correctly closes the order

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.