Oracle Instanc Client Installation Command tool

Source: Internet
Author: User
Tags sqlplus

Pre-conditions

1.Linux RHEL 6.X x86_64 operating system

2. Ability to obtain Oracle-related files from the server on which the Oracle server is installed (same OS)

Software download

Download the following package from the Oracle URL:

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

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.572MB)

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

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

Configuration process

Configuration process is the key to the configuration of environment variables, according to their actual situation to configure.

Configure Sqlplus

1. Create a directory with root user login: Mkdir-p/opt/oracle

2. Unzip all the packages into the/opt/oracle directory:

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

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

3. Create a configuration file

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

Czjgbs =

(DESCRIPTION =

(ADDRESS = (PROTOCOL = TCP) (HOST = 81.17.1.23) (PORT = 1521))//IP required to connect

(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 the use of 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 that needs to be connected)

Note: The TNS_ADMIN environment variable is used to specify the path where the Tnsnames.ora file resides.

#source ~/.BASHRC

To test the Sqlplus command:

$ sqlplus Scott/[email protected]

Sql*plus:release 10.2.0.4.0-productionon Friday August 3 10:41:44 2012

Copyright (c) 1982, Oracle. All rights Reserved.

Oracle Database 10g Enterprise editionrelease 10.2.0.4.0-64bit Production

With the partitioning, Real applicationclusters, OLAP, Data Mining

and Real Application Testing options

Sql>

Configure Tnsping

Go back to the root user and get the necessary files on other Oracle machines.

# cd/opt/oracle/instantclient_11_2/

# SCP [Email protected]:/oracle/orahome/product/11.2.0/bin/tnsping./

The above command copies files from other servers where the Oracle server is installed.

# mkdir-p NETWORK/MESG

# CD NETWORK/MESG

# SCP [Email protected]:/oracle/orahome/product/11.2.0/network/mesg/tnsus.msb./

Test tnsping Tool:

$tnsping Ora16

Configure Sqlldr

Oracle's instantclient comes with no SQLLDR consolidation and requires documentation from the Oracle server.

Log in with the root user:

# cd/opt/oracle/instantclient_11_2/

# [Email protected]:/oracle/orahome/product/11.2.0/bin/sqlldr./

# mkdir-p rdbms/mesg/

# CD rdbms/mesg/

# SCP [Email protected]:/oracle/orahome/product/11.2.0/rdbms/mesg/ulus.msb./

Run Sqlldr in the test user:

$sqlldr

Configure Imp/exp

Log in with the root user and copy the relevant 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

The Oracle client instantclient is installed on a Linux system, but it lacks tools such as Sql*loader, exp, etc., and this article describes how to install these command tools.

Copy the Sqlldr executable file directly from the installation path of the same version of the database server, and the execution Sqlldr will report the following error:

Message 2100 NotFound; No message file for Product=rdbms, Facility=ulmessage 2100 not found; Nomessage file for Product=rdbms, Facility=ul[[email protected] Instantclient_10_2]$^c

In fact, Instant client installation Sqlldr can only use the Copy file method. The error in the report is because you also need to copy the following information files.

First, locate the TNSUS.MSB file under $ORACLE_HOME/NETWORK/MESG and the ULUS.MSB file under $ORACLE_HOME/RDBMS/MESG from the ORACLE database server.

Then, copy them to the appropriate directory in the Instantclient installation directory. For example:/USR/OCAL/INSTANTCLIENT_10_2/[RDBMS/MESG and NETWORK/MESG].

Now you can use the Sql*loader tool.

How to configure the EXP and IMP tools, if just copy the executable file to the corresponding directory, will report the following error:

Message 2100 NotFound; No message file for Product=rdbms, Facility=ulmessage 2100 not found; Nomessage file for Product=rdbms, Facility=ul[[email protected] instantclient_10_2]

At this point, you need to find the EXPUS.MSB and IMPUS.MSB under RDBMS/MESG from the installation directory of the Oracle database server, and then copy the files to the corresponding directories to resolve them.

Oracle Instanc Client Installation Command tool

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.