Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: can't connect '/ as sysdba'

RE: can't connect '/ as sysdba'

From: Kevin Closson <kevinc_at_polyserve.com>
Date: Thu, 7 Dec 2006 10:12:10 -0800
Message-ID: <5D2570CAFC98974F9B6A759D1C74BAD001C33708@ex2.ms.polyserve.com>

  

Replacing $ORACLE_HOME/bin/oracle with a script that does truss or strace is
called a wrapper. It is not necessary to use a wrapper with strace. If you use the -f
option strace will follow all of sqlplus' kids and each line in the file specified
with the -o option will be prefaced with the pid that made the system call.

So:

-bash-3.00$ strace -o foo -f sqlplus '/ as sysdba'

SQL*Plus: Release 10.2.0.1.0 - Production on Thu Dec 7 10:09:54 2006

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

Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options

SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
-bash-3.00$ cat foo | awk '{ print $1 }' | sort | uniq
16131
16132

...16132 is the shadow process         

        To "strace" your Oracle server processes is a little more tricky, and can get kinda icky. This technique is called a "trojan horse":         

  1. Shutdown the Oracle database instance
  2. cd $ORACLE_HOME/bin
  3. mv oracle oracle.tmpexe
  4. echo "strace -o /tmp/oracle_strace_$$.out $ORACLE_HOME/bin/oracle.tmpexe \$*" > oracle
  5. chmod 755 oracle
  6. startup the Oracle database instance

        Needless to say, make sure you understand exactly what steps #3-5 are doing here!!! If you don't, then think it through carefully, ask questions, or don't proceed.         

--

http://www.freelists.org/webpage/oracle-l Received on Thu Dec 07 2006 - 12:12:10 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US