在Linux作業系統下使用Oracle 10.1g廋用戶端

來源:互聯網
上載者:User

一、下載必要的資源套件

從Oracle官方網站上下載安裝包,選擇Version 10.1.0.5即可。

http://www.oracle.com/technetwork/topics/linuxsoft-082809.html

Version 10.1.0.5   Instant Client Package - Basic: All files required to run OCI, OCCI, and JDBC-OCI applications

instantclient-basic-linux32-10.1.0.5-20060511.zip (31,413,713 bytes) (cksum - 384697539)

*Instant Client Package - JDBC Supplement: Additional support for XA, Internationalization, and RowSet operations under JDBC

instantclient-jdbc-linux32-10.1.0.5-20060511.zip (4,649,614 bytes) (cksum - 753190421)

*Instant Client Package - SQL*Plus: Additional libraries and executable for running SQL*Plus with Instant Client 

instantclient-sqlplus-linux32-10.1.0.5-20060511.zip (331,854 bytes) (cksum - 722849044)

 

*Instant Client Package - SDK: Additional header files and an example makefile for developing Oracle applications with Instant Client 

instantclient-sdk-linux32-10.1.0.5-20060511.zip (294,618 bytes) (cksum - 4282446920)

Optional packages are marked with a *.

Installation Steps:

1. Download the appropriate Instant Client packages for your platform. All installations REQUIRE the Basic package.

2. Unzip the packages into a single directory such as "instantclient".

3. Set the library loading path in your environment to the directory in Step 2 ("instantclient"). On many UNIX platforms, LD_LIBRARY_PATH is the appropriate environment variable. On Windows, PATH should be used.

4. Start your application and enjoy.

二、目錄安排

         把上述幾個檔案解壓到/home/ instantclient10_1目錄中

/home/ instantclient10_1

                  |_bin

                     |_sqlplus

                  |_lib

                     |_ libclntsh.so.10.1,libnnz10.so,libociei.so,libsqlplus.so

                  |_network

                     |_admin

                     |_tnsnames.ora

                  |_sqlplus

                     |_admin

                         |_glogin

                     |_mesg

                         |_sp1us.msb,sp1us.msg,sp1zhs.msb等

         tnsnames.ora檔案可以從X:\oracle\product\10.2.0\db_1\NETWORK\ADMIN目錄下拷貝即可,這樣您只要保證在WINDOWS下該檔案配置正確即可。

三、環境變數配置

        1、在/etc/profile檔案裡添加如下配置

ORACLE_HOME=/home/instantclient10_1

PATH=$ORACLE_HOME/bin:$PATH

LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH

export ORACLE_HOME PATH LD_LIBRARY_PATH

       2、生效命令

#source profile

       3、環境變數查看

#env |grep ORACLE_HOME

四、驗證效果

        使用sqlplus查詢,如果出現如下資訊,orale client基本安裝完成。

使用者名稱:username

密  碼: password

服務名: myoracle

三項基本資料要根據你自己系統實際配置。

# sqlplus username/password@myoracle

 

SQL*Plus: Release 10.1.0.5.0 - Production on Wed Sep 7 11:26:13 2011

 

Copyright (c) 1982, 2005, Oracle.  All rights reserved.

Connected to:

Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production

With the Partitioning, OLAP and Data Mining options

 

SQL>

On other platforms the two packages should be unzipped into one directory, for example, /home/instantclient10_1 on UNIX or c:\instantclient10_1 on

四、動態庫比較

        Windows. This table shows the Oracle client-side files required to deploy SQL*Plus Instant Client 10.1.

Platform

Description

Package

UNIX/Linux

Windows

sqlplus

sqlplus.exe

SQL*Plus executable

SQL*Plus

libsqlplus.so

not applicable

SQL*Plus library

glogin.sql

glogin.sql

SQL*Plus site profile

libclntsh.so.10.1

oci.dll

Client code library

Basic

libociei.so

oraociei10.dll

OCI Instant Client data shared library

libnnz10.so

orannzsbb10.dll

Security library

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.