Install the Oracle 11g client and the Pro * C/C ++ compiling environment on AIX
-
- Installation preparation:
First, you need to determine whether the AIX version meets the minimum requirements for Oracle 11g Client installation, you can view the Oracle official website documentation (http://download.oracle.com/docs/cd/B28359_01/install.111/b32334/toc.htm#CHDFFBIF ), the minimum operating system requirements of the Oracle 11g Release 1 client are as follows:
AIX 5l Version 5.3, Tl 05, Service Pack 06aix 6l Version 6.1, Tl 00, Service Pack 04 or later
The document (http://download.oracle.com/docs/cd/E11882_01/install.112/e18192/toc.htm#CIHFICFD) explains the Minimum Operating System Requirements for the Oracle 11g Release 2 client:
AIX 5l v5.3 TL 09 SP1 ("5300-09-01"), 64 bit kernelaix 6.1 TL 02 SP1 ("6100-02-01 ), 64-bit kernelaix 7.1 TL 0 SP1 ("7100-00-01"), 64-bit Kernel
On Aix, you can use oslevel or oslevel-s to view the specific version of Aix. If the operating system version has been confirmed, but an error related to AIO (asynchronous Io) can be found in another article on the Internet.ArticlePlease google it yourself. The company's server AIX version is 5300-06-01-0000. Therefore, only clients with Release 1 can be installed. Here, the installation of the Oracle 11g Release 1 64-bit client is used as an example.
First download from http://www.oracle.com/technetwork/topics/aix5lsoft-098883.html
Basic-11.1.0.7.0-aix-ppc64.zipsdk-11.1.0.7.0-aix-ppc64.zipsqlplus-11.1.0.7.0-aix-ppc64.ziptools-11.1.0.7.0-aix-ppc64.zipprecomp-11.1.0.7.0-aix-ppc64.zip
AIX does not contain unzip files.ProgramTo decompress all the files on the Windows server. decompress the files and generate the instantclient_11_1 folder.
- Installation Process:
-
- Upload the unzipped instantclient_11_1 directory to the AIX user directory.
-
- Add ORACLE_HOME and other environment variables.
Add the following content to. Profile:
Export ORACLE_HOME = $ home/instantclient_11_1export oracle_sid = orclexport LD_LIBRARY_PATH = $ ORACLE_HOME: $ {LD_LIBRARY_PATH} export Path = $ ORACLE_HOME: $ ORACLE_HOME/SDK: $ path
-
- Create a TNS file.
Mkdir-p $ ORACLE_HOME/Network/admintouch $ ORACLE_HOME/Network/admin/tnsnames. ora edit tnsnames. the ora content is roughly as follows: orcl = (description = (address = (Protocol = TCP) (host = 192.1.2.202) (Port = 1521) (CONNECT_DATA = (Server = dedicated) (SERVICE_NAME = orcl )))
-
- Test
Sqlplus unionkms @ orclsql * Plus: Release 11.1.0.7.0-production on Wed Feb 23 16:41:07 2011 copyright (c) 1982,200 8, Oracle. all rights reserved. enter Password: connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0-64bit productionwith the partitioning, OLAP and Data Mining optionssql> DESC branch; Name null? Type Validation -------- ---------------------------- unid not null char (40) unbranchtypeid not null char (40) unbranchfield number (38) unbranchid char (50) unkmcid char (40) unidofmngsvr char (40) unsecuservicesvrid char (40) unmonitorsvrid char (40) unmanager char (128) unphone char (128) unfax char (128) unmail char (128) unhttpaddr varchar2 (256) unremark char (128) uninputteller char (20) uninputdate char (8) uninputtime char (6) unupdateteller char (20) unupdatedate char (8) unupdatetime char (6) SQL>
In the pc_test file of Pro * C.
Pcscfg. cfg:
Sys_include = (/U2/chenlong/instantclient_11_1/SDK/include,/usr/include) ltype = includefine =__ 64bit _ DEFINE = _ ibm_cdefine = _ long_long
A1.pc:
# Include <stdio. h> # include <stdlib. h> # include <string. h> # include "sqlca. H "int main (void) {exec SQL include sqlca; Exec SQL begin declare section; char * user =" unionkms "; char * passwd =" unionkms "; char * DB = "orcl"; Exec SQL end declare section; Exec SQL CONNECT: User identified by: passwd using: DB; If (sqlca. sqlcode = 0) printf ("Connect success! \ N "); elseprintf (" Connect fail! \ N "); Return 0 ;}
Makefile:
All: a1.pcproc Config = pcscfg. cfg iname = a1.pccc-q64-I/U2/chenlong/instantclient_11_1/SDK/include/-C a1.c CC-q64-L/U2/chenlong/instantclient_11_1/-lclntsh-O a1.oclean: rm a1.lis a1.o
(indicate the author and source when reprinting.
for more articles, visit my blog: http://www.cnblogs.com/logicbaby