develooper Front page | perl.dbi.oracle-oci | Postings from September 2002

Perl5.8 DBI1.25 DBD1.09 Solaris2.8 Oracle 8.1.7 installation

Thread Previous
From:
Neelabh Kumar
Date:
September 16, 2002 04:24
Subject:
Perl5.8 DBI1.25 DBD1.09 Solaris2.8 Oracle 8.1.7 installation
Message ID:
20020916055943.63471.qmail@web21001.mail.yahoo.com

Hi,
I have done installation of Perl 5.8, DBI 1.25, DBD1.09 for oracle 8.1.7/Solaris 2.8. I have encountered a lot of problem( because of some silly mistakes) and I want to share this with you. The most horrible thing is about not having a proper documentation about this. It sounds like it is a trial and error and most people are not very sure about what they are doing(me too).
This will mainly focus on DBD installation of oracle. 

MAKE SURE
1. gcc installed at your machine /usr/local/bin
2. DBI installed properly
3. Oracle client installed.

 

Assuming ksh
STEP 1. Set ORACLE_HOME :  export ORACLE_HOME=<give the complete path> This is the installation  directory of oracle where all bin and lib folders are kept.
STEP 2.  set PATH:    export PATH=/usr/local/bin:/usr/bin:/usr/ccs/bin:$ORACLE_HOME/bin
Please ensure that your /usr/local/bin comes before /usr/bin if you have installed perl 5.8
$ORACLE_HOME/bin is set to ensure that you can log to oracle just typing sqlplus. This is not required for this installation.
STEP 3.  set ORACLE_USERID : export ORACLE_USERID=userid/pwd@dbname   or usrid/pwd. It did not work for me just userid/pwd. why??
STEP 4: export ORACLE_SID=<dbname> This name should present in your tnsnames.ora
STEP 5: export LD_LIBRARY_PATH=$ORACLE_HOME/lib
STEP 6: export  LD_PRELOAD=/lib/libthread.so.1 -> this step you can ignore now.


Now once you have completed the above step you are ready to go. Let us review each error case by case.

Installation steps:
A> perl Makefile.PL
Attempting to discover Oracle OCI build rules...
sh: make: not found
sh: make: not found 
make sure you put /usr/ccs/bin in your path rather than using /usr/ccs/bin/make to run it.-STEP 2

Once you have done it correctly you will not find any error. 
Frustrating thing -> even it is successful it says (any idea?)
If you have problems...read all the log printed above, and the README and README.help files.

B> make 
error 1. make: Fatal error: Command failed for target `Oracle.bs' 
reasons may be a) Makefile.PL did not compile successfully 
                        b) /usr/ccs/bin is not in path variable. Actually I use to compile using /usr/ccs/bin/make and this results problem in  STEP A causing problem in STEP B. Please read the log generated by STEP A to make sure no problem exists.

Error 2. touch: cannot change times on Oracle.bs *** Error code 1 make: Fatal error: Command failed for target `Oracle.bs'
Reasons: set LD_LIBRARY_PATH. 
Reasons:  
<REFER README before you run this>
perl Makefile.PL LINKTYPE=static
make
make perl        (makes a perl binary in current directory)
make test FULLPERL=./perl  (run tests using the new perl binary)
make install 
Error 3: passing arg 1 of `fprintf' from incompatible pointer type
ignore this. I believe this  is anyway log for developers of perl.

Error 4: ld: fatal: library -lclntsh: not found  
see if LD_LIBRARY_PATH is set. you can check it by echo $LD_LIBRARY_PATH. The value should be $ORACLE_HOME/bin

C> make test
Error 1: t/general....DBI->connect() failed: Error while trying to retrieve text for erro
r ORA-12545 (DBD ERROR: OCIServerAttach) at t/general.t line 20
Unable to connect to Oracle (Error while trying to retrieve text for error ORA-1
2545 (DBD ERROR: OCIServerAttach))
Tests skiped.                                                 
reason: check whether ORACLE_USERID and ORACLE_SID is set properly

Error 2: t/long.......Unable to create test table (ORA-01950: no privileges on tablespace  (DBD ERROR: OCIStmtExecute))
Tests skiped.      
Reasons: The user id and password for database does not have privilege of creation of a test table. Please use DBA or user id having privilege to create tables in database specified.

Frustrating thing: If the tests above have produced the 'expected' output then they have passed. This error message requires to check each and every expected - actual value manual comparison. Any idea?? There could have been a better way to provide error messages.

D> make install
Warning: You do not have permissions to install into /usr/local/lib/perl5/site_p
erl/5.8.0/sun4-solaris at /usr/local/lib/perl5/5.8.0/ExtUtils/Install.pm line 84
..
Cannot forceunlink /usr/local/lib/perl5/site_perl/5.8.0/sun4-solaris/auto/DBD/Or
acle/mk.pm: Permission denied at /usr/local/lib/perl5/5.8.0/File/Find.pm line 84
9
*** Error code 255
make: Fatal error: Command failed for target `pure_site_install'  

Please make sure you have permission to create folders in those file or you have logged as super user.

E> running a program
perl filename.pl

Error 1 :  You must install a Solaris patch to run this version of the Java runtime. Please see the README and release notes for more information. Exiting.       
Reason. Please read README for explanation. Please do as mentioned in README.
export  LD_PRELOAD=/lib/libthread.so.1

Error 2: install_driver(oracle) failed: Can't locate DBD/Ooracle.pm in @INC (@INC contains
: /usr/local/lib/perl5/5.8.0/sun4-solaris /usr/local/lib/perl5/5.8.0 /usr/local/
lib/perl5/site_perl/5.8.0/sun4-solaris /usr/local/lib/perl5/site_perl/5.8.0 /usr
/local/lib/perl5/site_perl .) at (eval 1) line 3.   
Reasons:  May be installation did not go properly. Please check Oracle.pm in folder @INC.
I did a silly mistake and I kept getting this error even after proper installation. I used $connect_str="DBI:oracle:host..... instead of $connect_str="DBI:Oracle:host....

Finally it is running perfectly for me. I hope all the best for you. 

<!-- Comments made in this part is based on experience/problems faced during installation on solaris 2.8. Author does not take any responsibility for any kind of damage, which may occur during installation. Please consider README family as the final reference for any practical purpose. This is just to ensure cross checking all parameters set properly All reasons mentioned are probable reasons may be inappropriate.---->



---------------------------------
Do you Yahoo!?
Yahoo! News - Today's headlines
Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About