Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to install oracle client for aix

2025-03-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

This article introduces the knowledge of "how to install oracle client in aix". Many people will encounter such a dilemma in the operation of actual cases, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

1 Environment

Root@ythdc:/ # oslevel-s

6100-05-01-1016

Root@ythdc:/ # bootinfo-K

sixty-four

2 download

UnixODBC

Http://www.unixodbc.org/

UnixODBC-2.3.0.tar.gz

Oracle ODBC Driver

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

Basic-10.2.0.4.0-aix-ppc32.zip

Odbc-10.2.0.4.0-aix-ppc32.zip

Note: in the test environment, unix is a 64-bit operating system, but unixODBC cannot make into 64bit programs, so you can only use a 32-bit driver here. If you use a 64bit driver, you will connect to the Times driver for errors that cannot be found.

UnixODBC2.2.13+

$CPPFLAGS= "- DBUILD_LEGACY_64_BIT_MODE-DSIZEOF_LONG_INT=8"

$export CPPFLAGS

$. / configure-enable-gui=no-enable-drivers=no

$make

$cd exe

$. / odbc_config-ulen

-DSIZEOF_SQLULEN=4

If-DSIZEOF_SQLULEN=4 represents a 32bit program, if-DSIZEOF_SQLULEN=8 represents a 64bit program.

Reference: http://www.easysoft.com/developer/interfaces/odbc/64-bit.html#unix

Upload all files to the server's / opt/odbc/ directory.

3 install the necessary RPM packages (root users)

Gcc-4.2.0-3.aix6.1.ppc.rpm

Libffi-devel-4.2.0-3.aix6.1.ppc.rpm

Libstdc++-devel-4.2.0-3.aix6.1.ppc.rpm

Libffi-4.2.0-3.aix6.1.ppc.rpm

Libgcc-4.2.0-3.aix6.1.ppc.rpm

The above packages can be downloaded from the IBM website:

Ftp://public.dhe.ibm.com/aix/freeSoftware/aixtoolbox/RPMS/ppc/

Installing these packages has 512MB space requirements for the / opt directory.

4 install unixODBC (root user)

# cd / opt/odbc/

# tar xvf unixODBC-2.3.0.tar.gz

# cd / opt/odbc/unixODBC-2.3.0

#. / configure-enable-gui=no-enable-drivers=no

# make

# make install

(default is installed to / usr/local)

5 install Oracle ODBC (root user)

# cd / opt/odbc/

# unzip basic-10.2.0.4.0-aix-ppc32.zip

# unzip odbc-10.2.0.4.0-aix-ppc32.zip

(two files are extracted to the same directory instantclient_10_2)

# cd / opt/odbc/instantclient_10_2

# chmod 775 odbc_update_ini.sh

#. / odbc_update_ini.sh / usr/local

(no prompt indicates successful installation)

Odbc_update_ini.sh parameter description:

Parameter 1:unixODBC DM installation path.

Parameter 2: the absolute path of the driver installation (optional). The default is the path where the script runs.

Parameter 3: driver name (optional), default is Oracle 10g ODBC driver.

Parameter 4: data source name (optional). Default is OracleODBC-10g.

After running, a DNS entry will be added to $HOME/.odbc.ini, / etc/odbcinst.ini, with the name: OracleODBC-10g

Modify the permissions of the odbc directory:

Chown-R 775 / opt/odbc

6 configure local service name (oracle user)

Add a local service name.

$TNS_ADMIN/tnsnames.ora

Or

$ORACLE_HOME/network/admin/tnsnames.ora

For example:

TEST =

(DESCRIPTION =

(ADDRESS_LIST =

(ADDRESS = (PROTOCOL = TCP) (HOST = 127.0.0.1) (PORT = 1521))

)

(CONNECT_DATA =

(SERVICE_NAME = test)

)

)

If you are a non-Oracle user, you can set the environment variable TNS_ADMIN to determine the location of the tnsnames.ora, when the changed user has the right to read tnsnames.ora.

7 check driver configuration (root user)

/ usr/local/etc/odbcinst.ini

[Oracle 10g ODBC driver]

Description = Oracle ODBC driver for Oracle 10g

Driver = / opt/odbc/instantclient_10_2/libsqora.so

Setup =

FileUsage =

CPTimeout =

CPReuse =

Here we need to manually modify the driver to change libsqora.so.10.1 to libsqora.so

8 add oracle odbc configuration (oracle user)

Vi / .odbc.ini

[OracleODBC-10g]

Application Attributes = T

Attributes = W

BatchAutocommitMode = IfAllSuccessful

BindAsFLOAT = F

CloseCursor = F

DisableDPM = F

DisableMTS = T

Driver = Oracle 10g ODBC driver # corresponds to the driver configuration name in / usr/local/etc/odbcinst.ini

DSN = OracleODBC-10g

EXECSchemaOpt =

EXECSyntax = T

Failover = T

FailoverDelay = 10

FailoverRetryCount = 10

FetchBufferSize = 64000

ForceWCHAR = F

Lobs = T

Longs = T

MetadataIdDefault = F

QueryTimeout = T

ResultSets = T

ServerName = test # corresponds to the local service name configured in tnsnames.ora

SQLGetData extensions = F

Translation DLL =

Translation ption = 0

DisableRULEHint = T

UserID =

9 set environment variables (oracle users)

Export LIBPATH=$LD_LIBRARY_PATH:/opt/odbc/instantclient_10_2:/usr/local/lib

Export PATH=$PATH:/usr/local/bin

TNS_ADMIN (if oracle software is installed, it corresponds to the $ORACLE_HOME/network/admin/ directory. If the corresponding oracle software is not installed, you need to specify the directory where tnsnames.ora is located. Optional)

NLS_LANG (set the appropriate character set, optional)

10 testing (oracle users)

Oracle@ythdc:/usr/local/bin$./isql OracleODBC-10g store store-v

+-+

| | Connected! |

| | |

| | sql-statement |

| | help [tablename] |

| | quit |

| | |

+-+

SQL > select * from v$version

+-+

| | BANNER |

+-+

| | Oracle Database 10g Enterprise Edition Release 10.2.0.1.0-Prod |

| | PL/SQL Release 10.2.0.1.0-Production |

| | CORE 10.2.0.1.0 Production |

| | TNS for 32-bit Windows: Version 10.2.0.1.0-Production |

| | NLSRTL Version 10.2.0.1.0-Production |

+-+

SQLRowCount returns-1

5 rows fetched

This is the end of the content of "how to install the oracle client for aix". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report