From 964c569826d229f8b9118615ad005efba5a82a1f Mon Sep 17 00:00:00 2001 From: Gwen Shapira Date: Thu, 10 Nov 2011 16:02:45 -0800 Subject: [PATCH] Signed-off-by: Gwen Shapira --- lib/DBD/Oracle/Troubleshooting.pm | 79 +++---------------------------- 1 file changed, 6 insertions(+), 73 deletions(-) diff --git a/lib/DBD/Oracle/Troubleshooting.pm b/lib/DBD/Oracle/Troubleshooting.pm index 68bcc10a..c0675fe9 100644 --- a/lib/DBD/Oracle/Troubleshooting.pm +++ b/lib/DBD/Oracle/Troubleshooting.pm @@ -56,78 +56,12 @@ utility may offer some help. Run these two commands: $ORACLE_HOME/bin/adapters $ORACLE_HOME/bin/adapters $ORACLE_HOME/bin/sqlplus -and check the output. The "Protocol Adapters" section should be the -same. It should include at least "IPC Protocol Adapter" and "TCP/IP +and check the output. The "Protocol Adapters" should include at least "IPC Protocol Adapter" and "TCP/IP Protocol Adapter". If it generates any errors which look relevant then please talk to your Oracle technical support (and not the dbi-users mailing list). -=head1 OPTIMIZING ORACLE'S LISTENER - -[By Lane Sharman ] I spent a lot of time optimizing -listener.ora and I am including it here for anyone to benefit from. My -connections over tnslistener on the same humble Netra 1 take an average -of 10-20 milli seconds according to tnsping. If anyone knows how to -make it better, please let me know! - - LISTENER = - (ADDRESS_LIST = - (ADDRESS = - (PROTOCOL = TCP) - (Host = aa.bbb.cc.d) - (Port = 1521) - (QUEUESIZE=10) - ) - ) - - STARTUP_WAIT_TIME_LISTENER = 0 - CONNECT_TIMEOUT_LISTENER = 10 - TRACE_LEVEL_LISTENER = OFF - SID_LIST_LISTENER = - (SID_LIST = - (SID_DESC = - (SID_NAME = xxxx) - (ORACLE_HOME = /xxx/local/oracle7-3) - (PRESPAWN_MAX = 40) - (PRESPAWN_LIST= - (PRESPAWN_DESC=(PROTOCOL=tcp) (POOL_SIZE=40) (TIMEOUT=120)) - ) - ) - ) - -1) When the application is co-located on the host and there is no need for -outside SQLNet connectivity, stop the listener. You do not need it. Get -your application/cgi/whatever working using pipes and shared memory. I am -convinced that this is one of the connection bugs (sockets over the same -machine). Note the $ENV{ORAPIPES} env var. The essential code to do -this at the end of this section. - -2) Be careful in how you implement the multi-threaded server. Currently I -am not using it in the initxxxx.ora file but will be doing some more testing. - -3) Be sure to create user rollback segments and use them; do not use the -system rollback segments; however, you must also create a small rollback -space for the system as well. - -5) Use large tuning settings and get lots of RAM. Check out all the -parameters you can set in v$parameters because there are quite a few not -documented you may to set in your initxxx.ora file. - -6) Use svrmgrl to control oracle from the command line. Write lots of small -SQL scripts to get at V$ info. - - use DBI; - # Environmental variables used by Oracle - $ENV{ORACLE_SID} = "xxx"; - $ENV{ORACLE_HOME} = "/opt/oracle7"; - $ENV{EPC_DISABLED} = "TRUE"; - $ENV{ORAPIPES} = "V2"; - my $dbname = "xxx"; - my $dbuser = "xxx"; - my $dbpass = "xxx"; - my $dbh = DBI->connect("dbi:Oracle:$dbname", $dbuser, $dbpass) - || die "Unable to connect to $dbname: $DBI::errstr\n"; =head1 LONGS @@ -208,13 +142,13 @@ that was last fetched. Nothing special with this you just have to set up you permissions as follows; -1) Have permission for RWE on 'usr/lib/oracle/10.2.0.3/client/' or the other directory where you RPMed to +1) Have permission for RWE on '/usr/lib/oracle/10.2.0.3/client/' or the other directory where you RPMed to -2) Set export ORACLE_HOME=/usr/lib/oracle/10.2.0.3/client/lib +2) Set export ORACLE_HOME=/usr/lib/oracle/10.2.0.3/client -3) Set export LD_LIBRARY_PATH=$ORACLE_HOME +3) Set export LD_LIBRARY_PATH=$ORACLE_HOME/lib -4) You will also have to tell DBD:Oracle where the TNS names is with Export TNS_ADMIN=dir to where your tnsnames.ora file is +4) If you plan to use tnsnames to connect to remote servers and your tnsnames.ora file is not in $ORACLE_HOME/network/admin, you will need to Export TNS_ADMIN=dir to point DBD::Oracle to where your tnsnames.ora file is =head2 undefined symbol: __cmpdi2 comes up when Oracle isn't properly linked to the libgcc.a library. @@ -307,8 +241,7 @@ So far there is no patch for this but here are some work arounds or this way utf8::downgrade($parameter, 1); - - + =head1 CYGWIN