Tracing in oracle db
I have been interacting with Oracle Support regarding the mystery of the SQL session tracing in our PROD env. Tracing is enabled on sessions coming from OIM and we don’t know how to deactivate it. This tracing of SQL sessions create large files on the database server’s filesystem. (/opt/oracle/admin/O4233/udump - files named *.trc)
This happens every time a connection is made. If we kill tracing on a connection, it reappears the next time a connection occurs from the OIM servers. Tracing is not enabled globally so it must be a SQL instruction issued by some code (ALTER SESSION SET sql_trace=’true’) or a JDBC connection config parameter.
Oracle is requesting the following:
· To verify that our code does not initiate the tracing
o we believe our code does not contain tracing
· To provide info about our WAS instance and verify that tracing is not enabled on the JDBC/connection pool in WAS.
o I searched through the JDBC config and could not find any setting.
Let me know if you can assist. Also raise your hand if you know of a setting that controls SQL tracing in WAS or OIM…
Thanks
Suren
Handle: user10088255
Status Level: Newbie
Registered: Mar 4, 2009
Total Posts: 108
Total Questions: *74 (74 unresolved)*
You've gotta be kidding
Similar Messages
-
how to enable tracing in oracle 8i.
and how to view the trace file
Thank you
Bharathihi,
>>, it is showing error ORA-12353 Timed out.
SQL> !oerr ora 12353
12353, 00000, "secondary stored object cannot reference remote object"
// *Cause: You tried to either select from a remote view or execute a remote
// procedure which references an object on another database. Since
// the remote view or procedure is on a secondary database, an
// additional reference to another database cannot be done.
// *Action: Choose a different object to reference or change the remote
// view or procedure so that it does not reference another database.
but timeout only occurs in 12535 error
SQL> !oerr ora 12535
12535, 00000, "TNS:operation timed out"
// *Cause: The requested operation could not be completed within the time out
// period.
// *Action: Look at the documentation on the secondary errors for possible
// remedy. See SQLNET.LOG to find secondary error if not provided explicitly.
// Turn on tracing to gather more information. -
How to enable tracing in Oracle Forms 10g
Hi Friends,
I am interested to trace my running oracle forms application. When I googled it, I got below useful information. But theory and practical has mismatch somewhere, I am not able to create the trace file(s).
**************************** Some Notes ****************************************************
How to Enable Tracing in Oracle Forms 10g
Enable Tracing from the url by adding the following to your forms url:
&record=forms&tracegroup=0-98,100-199 (note: item 99 causes some issues, so we are skipping it here. See the Oracle documenation for a description of what is being traced for each item.)
for example
[http://machine:port/forms/frmservlet?config=myConfig&record=forms&tracegroup=0-98,100-199]
You will get a trace file in the following location:
%ORACLE_HOME%\forms\trace\forms_xxx.trc where xxx is the forms session ID.
Open dos window and do the following:
set ORACLE_HOME=
set PATH=%ORACLE_HOME%\jdk\bin;%PATH%
set CLASSPATH=%ORACLE_HOME%\jdbc\lib\classes12.zip;%ORACLE_HOME%\forms\java\frmxlate.jar
java oracle.forms.diagnostics.Xlate datafile=%ORACLE_HOME%\forms\trace\forms_xxx.trc outputfile=%ORACLE_HOME%\forms\trace\html_xxx.html outputclass=WriteOutHTML
you will get a file html_xxx.html in your %ORACLE_HOME%\forms\trace directory.
I need information beyond this to make this practically successful.
Thanks in advance,
Amol NaikHello,
<p>Did you read this paper ?</p>
Francois -
Tracing an Oracle user query as sys user
Hi,
i need to trace a particular user in Oracle database 11g as a sysuser. i want to know what all statements currently run by that user by generating trace file. How to do that?
Regards,
007Or else use
execute DBMS_SYSTEM.SET_SQL_TRACE_IN_SESSION (sid=>507, serial#=>4957,sql_trace=>TRUE);
To disable:
execute DBMS_SYSTEM.SET_SQL_TRACE_IN_SESSION (sid=>507, serial#=>4957,sql_trace=>FALSE);
Or create trigger: whenever schemas login into db, trigger will be enablesd and trace all its activity in trace file and stop tracing when it logged off:
CREATE OR REPLACE TRIGGER SYS.set_trace
AFTER LOGON ON DATABASE
WHEN (USER like '&USERNAME')
DECLARE
lcommand varchar(200);
BEGIN
EXECUTE IMMEDIATE 'alter session set statistics_level=ALL';
EXECUTE IMMEDIATE 'alter session set max_dump_file_size=UNLIMITED';
EXECUTE IMMEDIATE 'alter session set events ''10046 trace name context forever, level 12''';
END set_trace;
/ -
Enable Tracing for Oracle 10g Forms
Hi All,
When I try to launch Oracle 10g Forms from web, it comes up, displays blank screen and goes away. Same happens for test.fmb.
How can I start tracing on Form Services or Oracle 10g Forms?
Any help would be appreciated.
Thanks in advance.You possibly have a popup or ad blocker active. Forms will most likely not work with a blocker.
-
Tracing the Oracle client?
Hi there,
I have a problem where the client session drops from the database for no particular reason while half way through an insert. Could this be caused by the cpu being at 100%?
I can find no error messages in the database logs. Wha I want to know is if you can turn tracing on at the client end so when the connection goes drops it will right some sort of log?
The database is 9.2.0.7 in w2k server and the client has a full oracle 9i client installed on it.
TIA
EddyDoes it show any errors or it simply "drops"?
Check the alertlog and user dump or db dump for related messages. If it simply dropsthe connection, check the listener.log. Also wafter the connection drops, the database will definitly be doing a rollback, so check any related activity in the database after it drops the connection.
Since you are inserting data, I would suggest you check whether the tablespace have enough space to take the new data. -
ORA-04043 Error when oracle type is declared in a package
We have a package defining a type and a procedure which uses that type. The problem is - If the type is defined in a package jdbc fails with an error. If the type is declared outside the package everything works fine. The package is declared as
create or replace
PACKAGE TEST_ARRAY AS
TYPE COLTYPE_NUMTAB is table of number;
procedure Test_Procedure(some_var_name in COLTYPE_NUMTAB);
END TEST_ARRAY;My Jdbc call is made by declaring the type as "TEST_ARRAY.COLTYPE_NUMTAB".
Is there any different style/way of declaring this type?
ThanksI tried tracing the oracle jdbc driver logs (we use the OCI jdbc driver) for the success and failure scenarios. Here are the logs
1. When the type is defined outside the package the logs look like
2011-05-31T03:23:56.177+0530 UCP TRACE_1 seq-408,thread-10 oracle.jdbc.driver.PhysicalConnection.createARRAY Public Enter: "COLTYPE_NUMTAB", [Ljava.lang.Object;@16a9424
2011-05-31T03:23:56.177+0530 UCP TRACE_16 seq-409,thread-10 oracle.sql.ArrayDescriptor.createDescriptor Public Enter: "COLTYPE_NUMTAB", oracle.jdbc.driver.T2CConnection@180cb01
2011-05-31T03:23:56.177+0530 UCP TRACE_16 seq-410,thread-10 oracle.sql.ArrayDescriptor.createDescriptor Public Enter: "COLTYPE_NUMTAB", oracle.jdbc.driver.T2CConnection@180cb01, false, false
2011-05-31T03:23:56.177+0530 UCP TRACE_16 seq-411,thread-10 oracle.sql.SQLName.<init> Public Enter: "COLTYPE_NUMTAB", oracle.jdbc.driver.T2CConnection@180cb01
2011-05-31T03:23:56.177+0530 UCP TRACE_16 seq-412,thread-10 oracle.sql.SQLName.init Enter: "COLTYPE_NUMTAB", oracle.jdbc.driver.T2CConnection@180cb01
2011-05-31T03:23:56.177+0530 UCP TRACE_16 seq-413,thread-10 oracle.sql.SQLName.parse Enter: "COLTYPE_NUMTAB", [Ljava.lang.String;@1cec874, [Ljava.lang.String;@ca6cea, true
2011-05-31T03:23:56.177+0530 UCP TRACE_16 seq-414,thread-10 oracle.sql.SQLName.parse return: false
2011-05-31T03:23:56.177+0530 UCP TRACE_16 seq-415,thread-10 oracle.sql.SQLName.parse Exit
2011-05-31T03:23:56.177+0530 UCP TRACE_16 seq-416,thread-10 oracle.sql.SQLName.init Exit
2011-05-31T03:23:56.177+0530 UCP TRACE_16 seq-417,thread-10 oracle.sql.SQLName.<init> Exit
2011-05-31T03:23:56.177+0530 UCP TRACE_16 seq-418,thread-10 oracle.sql.ArrayDescriptor.createDescriptor Public Enter: SCHEMA_NAME.COLTYPE_NUMTAB, oracle.jdbc.driver.T2CConnection@180cb01
2011-05-31T03:23:56.177+0530 UCP TRACE_16 seq-419,thread-10 oracle.sql.ArrayDescriptor.createDescriptor Public Enter: SCHEMA_NAME.COLTYPE_NUMTAB, oracle.jdbc.driver.T2CConnection@180cb01, false, false2. When the type is defined inside the same package as the procedure which is TEST_ARRAY, the logs look like
2011-05-31T05:10:05.219+0530 UCP TRACE_16 seq-409,thread-10 oracle.sql.ArrayDescriptor.createDescriptor Public Enter: "TEST_ARRAY.COLTYPE_NUMTAB", oracle.jdbc.driver.T2CConnection@6a435f
2011-05-31T05:10:05.219+0530 UCP TRACE_16 seq-410,thread-10 oracle.sql.ArrayDescriptor.createDescriptor Public Enter: "TEST_ARRAY.COLTYPE_NUMTAB", oracle.jdbc.driver.T2CConnection@6a435f, false, false
2011-05-31T05:10:05.250+0530 UCP TRACE_16 seq-411,thread-10 oracle.sql.SQLName.<init> Public Enter: "TEST_ARRAY.COLTYPE_NUMTAB", oracle.jdbc.driver.T2CConnection@6a435f
2011-05-31T05:10:05.250+0530 UCP TRACE_16 seq-412,thread-10 oracle.sql.SQLName.init Enter: "TEST_ARRAY.COLTYPE_NUMTAB", oracle.jdbc.driver.T2CConnection@6a435f
2011-05-31T05:10:05.250+0530 UCP TRACE_16 seq-413,thread-10 oracle.sql.SQLName.parse Enter: "TEST_ARRAY.COLTYPE_NUMTAB", [Ljava.lang.String;@129c445, [Ljava.lang.String;@114a947, true
2011-05-31T05:10:05.250+0530 UCP TRACE_16 seq-414,thread-10 oracle.sql.SQLName.parse return: true
2011-05-31T05:10:05.265+0530 UCP TRACE_16 seq-415,thread-10 oracle.sql.SQLName.parse Exit
2011-05-31T05:10:05.265+0530 UCP TRACE_16 seq-416,thread-10 oracle.sql.SQLName.init Exit
2011-05-31T05:10:05.265+0530 UCP TRACE_16 seq-417,thread-10 oracle.sql.SQLName.<init> Exit
2011-05-31T05:10:05.265+0530 UCP TRACE_16 seq-418,thread-10 oracle.sql.ArrayDescriptor.createDescriptor Public Enter: TEST_ARRAY.COLTYPE_NUMTAB, oracle.jdbc.driver.T2CConnection@6a435fIn the second scenario the SQLName class constructor does not append the schema name.
Though I am not the right person to interpret the jdbc logs hope it helps in troubleshooting the problem. -
Hi,
Oracle Database : 11.2.0.1
I am executing a procedure and want to enable tracing for it. Should i go for system wide tracing or session level tracing.
ALTER SESSION SET EVENTS '10046 TRACE NAME CONTEXT FOREVER, LEVEL 1';
Is the above command OK to enable tracing in oracle?
Thanks864751 wrote:
Hi,
Oracle Database : 11.2.0.1
I am executing a procedure and want to enable tracing for it. Should i go for system wide tracing or session level tracing.But why you want to enable for the whole system?
ALTER SESSION SET EVENTS '10046 TRACE NAME CONTEXT FOREVER, LEVEL 1';
Is the above command OK to enable tracing in oracle?
Yep.
Aman.... -
Hanging on Multi-threaded DB Partition to Oracle -cnt'd
Hi All,
Thanks for everyones replies to my plaintive calls for help.
Our problem was a hang of the "OpenCursor" call during dynamic
sql execution from Forte 3.0.M.0 to Oracle on NT.
The most useful suggestions included:
* Check for Errors in the SQL
- no errors found. SQL works fine from other clients
* Transaction around the entire piece of code
- already there.
* Ensure that the following line is used:
self.Session.RemoveStatement(statementHandle=dynStatement);
- it was already there.
* Try turning on log flags
Useful Log flags that might be helpful are
trc:db:1 - Cursor operations
trc:db:1:100 - Vendor specific cursor operation tracing
trc:db:1:200 - Checking cursor queues, fetching rows, cursor count
- we still get stuck in the OpenCursor, with no useful
information shown to see where the thread is stuck.
* Increase Cursor Count in Oracle - this was shown
not to be a problem. We did a separate test opening cursors
without closing them, and indeed hit the Oracle cursor limit,
but with this code we did not get back such an exception.
* We also set up tracing within Oracle, and the application proved to
be hanging inside Forte - before it had apparently reached Oracle.
* And a dumpstatus on the partition showed us stuck in the OpenCursor.
* It seems that indeed this problem is one with Forte and its
multithreaded DB Libraries, so our only soution was to revert back
to the traditional partition-based replication of single threaded
DB partitions. It only took a minute to revert back, but this was
disappointing from a hardware resources point of view. We have
not seen the problem again since making this change.
* One other question that came up - indeed 3.0.M.0 is a beta release,
and we are looking to move to 3.0.M.2 shortly. We had to move to M
quickly to resolve an ISAPI problem in L, but plan to move to M.2
as soon as possible.
Thanks again for all the replies!
Ben Macdonald
Xpedior, Inc@Sybrand - Funny you should mention Larry's boat - it happens to be moored about 200 metres from where I'm sitting here in Cape Town :-)
And yes, I will get in touch with sales for more clarity...
Thanks,
Andreas
*** Update
I called our 'Senior License Management Service Consultant' at Oracle and she confirms that Oracle do NOT take processor multithreading into consideration for licensing purposes.
So, our single quad core, multithreaded processor will be licensed as 4 cores, so will require 4 x 0.5 = 2 CPU licenses.
I guess Larry will have to drink cheaper champagne ;-)
Edited by: Andreas Hess on May 20, 2010 2:41 PM -
Hello,
When is it appropriate to set tracing on Oracle Net?EdStevens wrote:
Justin Mungal wrote:
1002857 wrote:
Hello,
When is it appropriate to set tracing on Oracle Net?I've used it a couple times to troubleshoot intermittent connection issues between a client and server. I didn't even read the trace files, I sent them to Oracle Support.It's a shame you "didn't even read the trace files". Even without being a network wizard or knowing how to really read the file, you'd be surprised what you can pick out just by going on a "fishing expedition." You should try it some time.I've read them before. I've also taken etherpeek/wireshark captures. You're right, they can be quite insightful.
I should have been a bit more clear, but in the particular case above I had opened an SR on behalf of a client, and it was Oracle Support that requested the trace. Mentioning that I didn't read them was pretty irrelevant and makes me come off as lazy; I'm not sure why I did that. -
Setting up embedded OC4J in JDev to use P6Spy jdbc driver to Oracle
I am currently working on an OC4J application using Oracle db, with JDeveloper. I'm having some trouble with the DataSourceUserManager, in that it appears to be emitting faulty SQL, but I don't know exactly what SQL is being emitted. Today, I'm trying to see if I can interject the P6Spy JDBC driver on the database client side so I can see exactly what SQL is being emitted. I've successfully used P6Spy in the past on other projects, so I believe it can work, although I didn't use it with Oracle before.
Unfortunately, I'm having trouble figuring out how to inform JDeveloper of the location of the driver jar. I've added P6Spy as a library to my application, and I've found several XML files in my workspace and in the JDev configuration which contain an "orion-application" element, which contains "library" sub elements, several of which I've added "library" elements to specify the location of the driver jar. Despite that, when the embedded OC4J starts up, I still get this in the messages window:
Error initializing data-source 'jdbc/OracleDS': DriverManagerDataSource driver 'com.p6spy.engine.spy.P6SpyDriver' not found
Note that this occurs while OC4J is trying to initialize my UserManager subclass.
I believe there is also some facility for turning on "tracing" with Oracle, but the person who knows about that isn't here today. It would be good if I could get P6Spy working today, so I can make some progress today (which is looking more unlikely by the second).You must place the p6spy.jar into <oc4j_home>/j2ee/home/lib directory.
The datasources are initialized before any deployed application is started, and thus the p6spy.jar wont be in the classpath >when the appserver is started (if you put the jar in WEB-INF/lib).That's correct.
Another question -- have anyone managed to get p6spy to work with a ConnectionPoolManager in a BC4J-project?? I get a ClassCastException from oracle.jbo.server.OracleSQLBuilder because it tries to cast a statement into an OracleStatement.You need to build the project using SQL92 and Java Type Map.
See
Re: Exp problem in Oracle 10gR2
Re: error in form10g release 2 -
ADF: How to find out which query has taken what time?
Hi,
I have an ADF application which has many SQL queried running on each button click/page load, so how to find out which query is taking what amount of time? So that i can identify the long running queries and modify them to improve the application performance.
Thanks in advance.Hi,
As suggested by Timo,you need to start tracing on oracle.jbo package for getting the SQL queries.But I think the second option suggested by him would be better.You will have to override executeQueryForCollection method in VO Impl class .Pseudo code would be
@Override
Take start time
super.executeQueryForCollection
Take end time -
Hi,
I have an import format where i am trying to import using an import integration script. the source is an Oracle database. While the import works OK when the record number is 100-200, the performance goes down when the count becomes 1000. for 3000 odd records FDM takes 30 minutes to load. for 10,000+ the application hangs.
I have checked the database setting for the FDM application and found that there are no separate tablespaces for data segement tables and work tables. all of them use the same table space. Could this be the only cause?? what other thing can I look at?
Also, I did some checks and foud that while the data s getting read properly in the recordset (rsAppend), the load to worktable is not happening. based on this I suspect that its a database set-up issue
Any help in resolving this would be greatly appreciated
-ShantanuHello Shantanu,
I personally use integration scripts into the 100k+ rows without issues. My imports take roughly 22 minutes. There must either be something with your script and how you are using it or as you suspected with your database.
At this point if you think it is a database issue I would encourage you to engage your DBA for tuning, packet tracing, and Oracle stats reports. Also please keep in mind that if the database isn't in the same datacenter then it might not be either the script or the database but the WAN performance.
Thank you, -
Error loading external library
I have created a library in Oracle using a C library test.so in sun solaris.
This library contains string manipulation and memory management functions. When I call a function in this library through PL/SQL I get the error
ORA-06520: PL/SQL: Error loading external library
ORA-06522: ld.so.1: extprocPLSExtProc: fatal: relocation error: file /home/OraHome/8.1.7/lib/test.so: symbol endl__FR7ostream: referenced symbol not found
Anybody knows how to set the environment so that symbols in libraries located in other directories can be traced by Oracle.
MohanHello
We have just come across the same problem. A .so library is
accesible (i.e. we have the adecuate permissions through Unix)
and the extproc procedure finds it, but we cannot access the
functions within it. We also get the (really strange) Bad Magic
error.
I see that you posted this problem a long while ago and I was
wondering if you've found a solution you could share.
Thanks,
Marta Tirelli -
SQL trace query parameters round 2
Hi,
This is a follow up of this topic:
SQL trace query parameters
My problem is no matter what i do, the queries in my trace file do not show the query paramaters.
I have tried several approach including this:
http://theblasfrompas.blogspot.com/2010/05/dbmsmonitor-for-tracing-from-oracle.html
Any idea why it isn't working? (I'm using Oracle XE 11g)
Thanksuser610868 wrote:
Hi,
This is a follow up of this topic:
SQL trace query parameters
My problem is no matter what i do, the queries in my trace file do not show the query paramaters.
I have tried several approach including this:
http://theblasfrompas.blogspot.com/2010/05/dbmsmonitor-for-tracing-from-oracle.html
Any idea why it isn't working? (I'm using Oracle XE 11g)
Thankshttp://www.lmgtfy.com/?q=oracle+sql_trace+level=4
Maybe you are looking for
-
Can't drag disc to trash to eject
Everyhing seems to be working well with Mavericks except that I can no longer drag a disc to the trash to eject it. I have to quit the app I'm using (Toast, iTunes etc) and then open Disk Utility and select the drive to eject from.
-
HT3180 Apple TV 2 IOS7 upgrade failure
I have tried to upgrade to IOS7, and it has failed! I am being asked to connect the Apple TV to my Mac using a hdmi to USB cable is there any way I can fix this without the cable as I do not own one? I have tried a restart but no luck and I have no P
-
Alternative Options for Email Merge?
I need a way to do personalized (merged) e-mails. Usually, I have fewer than 500 recipients, but the e-mails need to include some merged data like the recipient's name and physical address (so just sticking 500 e-mail addresses in the BCC field Mail.
-
Overlapping layers/hotspots?
I'm looking at creating a photo gallery and here's what I'd like to do. 9 thumbnails of photos in a 3x3 grid all sitting next to each other. When you click on one of the thumbnails the thumbnail layer would be replaced by the relevant photo. Then by
-
MAC MINI vs. new G5 iMac
any ideas or recommendations...?? I trust your opnions.