How to turn on/enable sql logging

Our environment is Java EE 5, JPA, Weblogic 10, KODO 4.1.2, and our DB is Oracle 10gr2. We are trying to figure out what to do/what has to be set up in order to see the actual SQL going to the database. I have the following in the persistence.xml:
<properties>
<property name="kodo.Log" value="DefaultLevel=WARN, Runtime=INFO, Tool=INFO, SQL=TRACE"/>
</properties>
which I found posted somewhere while trying to resolve this, but it does nothing. There is no sql syntax whatsoever in any weblogic log or on the weblogic console. For what it's worth, we have tried both XA and the thin drivers, but that has no effect either. We have tweaked the logging options in the WL console as well, but nothing seems to have any impact on SQL logging. Any help would be greatly appreciated.

Russ Burkert wrote:
That did not work. There is nothing on the console or any of the logs that is new concerning sql logging. What didn't work?
Added the specified properties to the driver using the console and modified the
commEnv script so wlspy.jar is included in the WEBLOGIC_CLASSPATH. WebLogic was restarted.
However, spy.log is created and at least I can now see some database errors
(ORA-xxxx) coming back from Oracle (which is very helpful). But, no actual SQL in that log, either.
Upon further scrutiny of spy.log, I can see this kind of stuff:
PreparedStatement[35].setString(int parameterIndex, String x)
parameterIndex = 39
x = RN22
OK
All of our database transactions right now are inserts. I see how this maps to the JPA
objects, but it is quite grueling to have to figure out the index/offset of each piece
of data in the object and then cross-reference that to its DB table/column equivalent.
Is there any way to just see a simple INSERT statement somewhere?There has to be INSERT statements in the spy log. They may well be done by PreparedStatements,
which show their SQL once at the prepare, early in the log, and then re-executed indefinitely.
Find the SQL for a given prepared statement so you can know what failed when the XXXth execute()
returns a SQLException.
Joe

Similar Messages

  • How to turn on CR4E plugin logging?

    <p><font face="arial,helvetica,sans-serif" size="2">Hi,</font></p><p><font face="arial,helvetica,sans-serif" size="2">I am getting the following error when I am designing a report using CLOB field.</font></p><p><font face="arial,helvetica,sans-serif"><font size="2">J</font><font size="2">DBC Error: This operation is not supported.  Caused by: JDBC Error: This operation is not supported.</font><br /></font></p><font face="arial,helvetica,sans-serif" size="2">  Caused by: JDBC Error: This operation is not supported.<br />  Caused by: JDBC Error: This operation is not supported.<br />  Caused by: JDBC Error: This operation is not supported.<br />  Caused by: JDBC Error: This operation is not supported.<br />  Caused by: This operation is not supported.<br />  Plug-in Vendor: Business Objects<br />  Plug-in Name: Crystal Reports Designer Editor Package<br />  Plug-in ID: com.businessobjects.crystalreports.designer.editor<br />  Plug-in Version: 1.0.0.v671<br /></font><p style="text-indent: 6pt" class="MsoNormal"><font face="arial,helvetica,sans-serif" size="2"></font></p><p><font face="arial,helvetica,sans-serif" size="2">First of all, does CR4E support CLOB and BLOB fields?</font></p><p><font face="arial,helvetica,sans-serif" size="2">Second, can I enable CR4E designer plugin logging so I can see more information on what operation the designer is trying to call?</font></p><p><font face="arial,helvetica,sans-serif" size="2">The backend is OpenText DB with Generic JDBC driver.</font></p><p><font face="arial,helvetica,sans-serif" size="2">Thanks,</font></p><p><font face="arial,helvetica,sans-serif" size="2">Tim</font><br /> </p><p> </p><p> </p>

    Russ Burkert wrote:
    That did not work. There is nothing on the console or any of the logs that is new concerning sql logging. What didn't work?
    Added the specified properties to the driver using the console and modified the
    commEnv script so wlspy.jar is included in the WEBLOGIC_CLASSPATH. WebLogic was restarted.
    However, spy.log is created and at least I can now see some database errors
    (ORA-xxxx) coming back from Oracle (which is very helpful). But, no actual SQL in that log, either.
    Upon further scrutiny of spy.log, I can see this kind of stuff:
    PreparedStatement[35].setString(int parameterIndex, String x)
    parameterIndex = 39
    x = RN22
    OK
    All of our database transactions right now are inserts. I see how this maps to the JPA
    objects, but it is quite grueling to have to figure out the index/offset of each piece
    of data in the object and then cross-reference that to its DB table/column equivalent.
    Is there any way to just see a simple INSERT statement somewhere?There has to be INSERT statements in the spy log. They may well be done by PreparedStatements,
    which show their SQL once at the prepare, early in the log, and then re-executed indefinitely.
    Find the SQL for a given prepared statement so you can know what failed when the XXXth execute()
    returns a SQLException.
    Joe

  • SQL Developer 1.2 - (ADC) Linux - How to turn off GUI activity logs

    I have two questions:
    1. I am an internal Oracle engineer, trying to configure SQL Developer
    to run within ADE - to debug SYS-installed DBMS packages.
    If there is already an internal cheatsheet/wiki page on how to do
    this, could you please point me to it? (Since this is a public forum,
    please let me know if I can send you a direct internal mail to get
    this info).
    2. I installed the latest rev (sqldeveloper-1.2.29.98-1.noarch.rpm) on my
    ADC Linux box, and I get outputs (stderr I'd presume) on my launch
    window - xterm/xemacs. Is there a switch to turn this off? I do not want
    to use a shell redirect because I don't know if these are coming out of
    stderr or stdout - and thereby miss out on some legit errors.
    [oracle/tklocal> reloadBuffers(): 60 nodes checked in 0.010883 s
    reloadBuffers(): 60 nodes checked in 0.007401 second(s)
    reloadBuffers(): 60 nodes checked in 0.005423 second(s)
    reloadBuffers(): 60 nodes checked in 0.009839 second(s)
    reloadBuffers(): 60 nodes checked in 0.016451 second(s)
    and on and on
    This seems to happen whenever my mouse scopes out of SQL Developer
    and into another window and back.. but this could also be a periodic output,
    I am not sure.
    Thanks, Ram                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    For 1: there is an internal site for SQL Developer (sqldeveloper.oraclecorp.com). It may provide details about internal lists etc. you can use (although I can't verify at the moment, since it appears to be down for maintenance).
    For 2: These messages are debug diagnostics. They really ought to be turned off by default in SQL Developer, but it seems like they aren't for some reason. You can switch them off by adding the following line to sqldeveloper.conf:
    AddVMOption -Dide.AssertTracingDisabled=trueThanks,
    Brian

  • How to turn icons enabled/disabled by js

    Hi, I'm looking for suggestions abouts the best way to turn icons from enabled to disabled (e.g. grayed) and the contrary by means of js only, e.g. without reloading the page. Candidates I know of:
    - render both icons, using hidden visibility for the unwanted one.
    - render both icons at the same absolute position, turning zIndex as needed.
    - use transparent icons, playing with background color.
    Thanks for any suggestion.

    Just replace images using JS.
    var image = document.getElementById('image');
    image.src.indexOf('enabled.gif') > -1 ? image.src = 'disabled.gif' : image.src = 'enabled.gif';I am using indexOf instead of == , because it usually returns the absolute path instead of just the relative path.

  • PL/SQL log in java concurrent program is missing

    Hi,
    I'm experiencing something strange with EBS R12 concurrent program logs.
    Our concurrent program is just a normal program that runs fine in most cases. It is written in java, which calls PL/SQL procedures. Usually the log is concatenation of logs from both like following
    (log from mid-tier java codes ...)
    Start of log messages from FND_FILE
    (log from database tier PL/SQL codes ...)
    End of log messages from FND_FILE
    But on one customer's environment the PL/SQL log is missing. This makes us unable to see the important messages.
    I tried to directly look at the files but had no luck.
    select 'cat '||c.value||'/'||p.plsql_log
    from fnd_concurrent_processes p, fnd_concurrent_requests r, fnd_env_context c
    where r.controlling_manager=p.concurrent_process_id
    and p.concurrent_process_id=c.concurrent_process_id
    and c.variable_name='APPLPTMP' and r.request_id=...
    (file not exist in file system)
    req=...; nedit ${APPLCSF}/log/l${req}.req&
    (pl/sql part is missing)
    We verified database tier log directory is writable and has free space.
    Also verified that other concurrent programs written in PL/SQL has correct logs.
    How can we get PL/SQL logs? Please help.
    Thanks

    Hi Srini, here are the env details I got from customer:
    1) $ uname -a
    Linux srvoracle06.gpodeacero.corp 2.6.18-194.el5 #1 SMP Mon Mar 29 22:10:29 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux
    2) select banner from v$version;
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
    PL/SQL Release 11.1.0.7.0 - Production
    CORE 11.1.0.7.0 Production
    TNS for Linux: Version 11.1.0.7.0 - Production
    NLSRTL Version 11.1.0.7.0 – Production
    3) The EBS version result is:
    Oracle Applications : 12.1.2
    Hi Hussein, about enabling trace for concurrent program, how to do that? I guess you are not refering to database SQL trace right?

  • SQL-Log

    I'd like to log the sql-statements from an application on oracle9i. I enabled SQl log in the enterprise manager, but the logfile contains only internal sql statements. Is there a way to trace sql-statements coming from an external application?
    Thanks

    Oracle's official method per Oracle metalink support is to use the dbms_support package to perform tracing in another Oracle session. The package can be found in the $ORACLE_HOME/rdbms/admin directory with 8.1.7+ but is not automatically created. You have to create it yourself when you want to use if the first time.
    Just adding to the information overload.
    -- Mark D Powell --

  • 11g - how to enable the sql logging

    hi, experts,
    I cannot find the way to enable the sql logging (into nqquery.log)
    how to set it?

    I cannot find the way to enable the sql logging (into nqquery.log)The SQL logging can be set in the Administration tool >>Manage>>Security >>users and double click on the user and set the logging level . Best option is to use logging level=2
    http://www.artofbi.com/index.php/2009/07/obiee-logging-security-restrictions-and-levels/
    (OR) if you want to specify only for a single report and if you have the privileages as the Administrator then you can do at report level by going to
    Advance tab>> prefix section >> Set Variable LOGLEVEL=2;
    write it the same way because it sometimes acts case sensitive.Then save it.
    hope answered.
    Cheers,
    KK

  • Enable SQL Query logging while generating a report

    I am a newbie to BI Publisher. We are using Oracle BI Publisher 11.1.1.5.0 for reports generation.
    I am trying to get the actual SQL query executed when a report is generated.
    It would be great if any one can share some tips to enable SQL query logging and how to verify it.
    Thanks,
    Satya

    Thanks for your response.
    It seems the NQQuery.log is for OBIEE not for BI Publisher. I could see the admin guide refers to Oracle Fusion Middleware System Administrator's Guide for Oracle Business Intelligence Enterprise Edition.
    I raised an SR at myoraclesupport (MOS), I got a response saying enable SQL query log option is not available in BIP.
    Best regards,
    Satya

  • How to enable fnd log in self service page

    Hello,
    In professional forms, we can enable fnd log using the profile options "FND: Debug Log Enabled" to Yes and "FND: Debug Log Level" to different levels.
    Similarly, can we do the same with Self Service page? how and where can i see the log results? Also when i'm running the selfservice page from jDeveloper, is there any possibility to see the entire log?
    I need to track why i'm unable to run a page from jdeveloper and i need to track the log.
    Thank you all for the help in advance.
    kK

    Hi,
    To Enable to Log for a self service page click on 'Diagnostics' link avaible at the Upper Right corner of the page. Now from the Diagnostic poplist select the 'Show Log On Screen' then select the log level and save.
    Now you perform your fucntional steps all the log messages you will be able to see at the bottam of the page.
    Regards,
    Syed.

  • SQL 2012 SP1 - How to determine a query that causes Error 8623 in SQL Log: The query processor ran out of internal resources and could not produce a query plan. This is a rare event...

    We are getting multiple 8623 Errors in SQL Log while running Vendor's software.
    How can you catch which Query causes the error?
    I tried to catch it using SQL Profiler Trace but it doesn't show which Query/Sp is the one causing an error. 
    I also tried to use Extended Event session to catch it, but it doesn't create any output either.
    Error:
    The query processor ran out of internal resources and could not produce a query plan. This is a rare event and only expected for extremely complex queries or queries that
    reference a very large number of tables or partitions. Please simplify the query. If you believe you have received this message in error, contact Customer Support Services for more information.
    Extended Event Session that I used;
    CREATE EVENT SESSION
        overly_complex_queries
    ON SERVER
    ADD EVENT sqlserver.error_reported
        ACTION (sqlserver.sql_text, sqlserver.tsql_stack, sqlserver.database_id, sqlserver.username)
        WHERE ([severity] = 16
    AND [error_number] = 8623)
    ADD TARGET package0.asynchronous_file_target
    (SET filename = 'E:\SQLServer2012\MSSQL11.MSSQLSERVER\MSSQL\Log\XE\overly_complex_queries.xel' ,
        metadatafile = 'E:\SQLServer2012\MSSQL11.MSSQLSERVER\MSSQL\Log\XE\overly_complex_queries.xem',
        max_file_size = 10,
        max_rollover_files = 5)
    WITH (MAX_DISPATCH_LATENCY = 5SECONDS)
    GO
    -- Start the session
    ALTER EVENT SESSION overly_complex_queries
        ON SERVER STATE = START
    GO
    It creates only .xel file, but not .xem
    Any help/advice is greatly appreciated

    Hi VK_DBA,
    According to your error message, about which query statement may fail with error message 8623, as other post, you can use trace flag 4102 & 4118 for overcoming this error. Another way is looking for queries with very long IN lists, a large number of
    UNIONs, or a large number of nested sub-queries. These are the most common causes of this particular error message.
    The error 8623 occurs when attempting to select records through a query with a large number of entries in the "IN" clause (> 10,000). For avoiding this error, I suggest that you could apply the latest Cumulative Updates media for SQL Server 2012 Service
    Pack 1, then simplify the query. You may try divide and conquer approach to get part of the query working (as temp table) and then add extra joins / conditions. Or You could try to run the query using the hint option (force order), option (hash join), option
    (merge join) with a plan guide.
    For more information about error 8623, you can review the following article.
    http://blogs.technet.com/b/mdegre/archive/2012/03/13/8623-the-query-processor-ran-out-of-internal-resources-and-could-not-produce-a-query-plan.aspx
    Regards,
    Sofiya Li
    Sofiya Li
    TechNet Community Support

  • Does anyone know how to turn of the pop-up iCloud log-in window on iPhone. I have no desire to use iCloud. I have turned off iCloud in settings but the pesky little critter is not deterred.

    Does anyone know how to turn off the pop-up iCloud log-in window on iPhone 5c. I have no desire to use iCloud. I have turned off iCloud in settings but that does not seem to deter the pesky little pop-up from continually asking me to log-in
    Thanks

    Pop up usually meant that icloud activation lock is still on on Apple servers. In order to deactivate you need to turn icloud back on by signing in and then sign out properly. For your sake I hope that you know the password.

  • The first time i turn on my personal hotspot, i chosen usb only, how can i re-enable wifi hotspot?

    The first time i turn on my personal hotspot, i chosen usb only, how can i re-enable wifi hotspot?

    Yeah, I just noticed it   So does this mean I can't wake my S10 thru LAN right?  Anyway, do you have any suggestions?  I'm looking for a Docking Station, but I can't find any.   Can a USB replicator turn this on?  Any ideas would be greatly appreciated

  • How do I turn off base station logging?

    Airport Extreme seems to have started logging events two days ago with no input from me.  Have been using for about two months.  I wonder what's going on and how I can turn off base station logging.

    There are basically two types of logs that the AirPorts provide: 1) The "real-time" logs under the Logs tab of Logs and Statistics within the AirPort Utility, and 2) Syslogs which require that you provide a destination device that is set up to collect these types of logs.
    Which are you referring to? If it is the former, there is no "off" option. With the latter, you would just need to remove the IP address from the Syslog Destination Address window on the Logging & Statistics tab of the AirPort Utility.

  • How to Open Or read SQL Server log file .ldf

    Hi all,
    How to Open Or read SQL Server log file .ldf
    When ever we create database from sql server, it's create two file. (1) .mdf (2) .ldf.
    I want to see what's available inside the .ldf file.
    Thanks,
    Ashok

    I am not too sure but may be the below two undocumented commands might yield the desired result.
    DBCC Log
    Fn_dblog function
    Refer these links for more info,
    http://www.mssqlcity.com/Articles/Undoc/SQL2000UndocDBCC.htm
    http://blogs.sqlserver.org.au/blogs/greg_linwood/archive/2004/11/27/37.aspx
    http://searchsqlserver.techtarget.com/tip/0,289483,sid87_gci1173464,00.html
    Some 3rd party tools like Log Explorer can do the job for you.
    http://www.lumigent.com/products/le_sql.html
    - Deepak

  • How to enable JCo logging

    I know I've seen this somewhere, but now that I need it, I can't find it.  I've spent two hours searching all the forums.  Can someone tell me how I enable JCo logging?  I have a JCO/Java program that works fine from the command line, but doesn't work when I try to use it in a Tomcat servlet.  None of the log files that I can find have any errors in them, but it appears that the call to JCO.createClient fails in the servlet.  I've read all of the posts about putting the JCo jar file in the servlet's lib directory and copying sapjcorfc.dll to Tomcat's bin directory, but no luck.  I'm hoping that there is some way that I can get JCo to give me a log that will indicate what is going wrong.  Thank you for your help.

    <b>SAP Note 723562</b>
    2. Runtime loading mechanism
    When an application references a JCo class for the first time it will be loaded by the associated class loader. During this process JCo's static initializer will be executed. This routine will search and load the JCo JNI library by using the following algorithm:
    1. Try to load the sapjcorfc library from the same directory where the sapjco.jar file or the JCo class files are located.
    2. Search the sapjcorfc library along the directory path defined in the java.library.path system property from left to right and if found load it from there.
                Note: If this property is not set manually, the JVM will usually set the OS specific library path environment variable as the default java.library.path system property at startup.
    1. Let the JVM handle the loading of the sapjcorfc library by delegating this task to its System.loadLibrary(String) method.
    JCo's JNI library is linked with the native RFC library. So when it is loaded the operating system will try to resolve its dependencies by loading the native RFC library, too. Usually, this will be done by searching for the first occurrence of the rfccm | librfc32 library along the directory path defined by the OS specific library path environment variable from left to right and load it.
    If the sapjcorfc library and/or the rfccm | librfc32 library cannot be loaded, you will get an ExceptionInInitializerError from the JCO. <clinit> method saying that it could not load the middleware layer com.sap.mw.jco.rfc.MiddlewareRFC. This error message may be caused for one of the following reasons:
    The sapjcorfc library cannot be found by using the above described algorithm, because you unintentionally installed it to the wrong directory or forgot to specify its directory in the OS specific library path environment variable or alternatively in the java.library.path system property.
    The rfccm | librfc32 library cannot be found because you unintentionally installed it to the wrong directory or forgot to specify its directory in the OS specific library path environment variable.
    The version of the sapjcorfc library found via the sapjco.jar directory or the java.library.path system property is not the required version (the version numbers and dates of the JCo middleware and the JCo library must be equal).
    The version of the rfccm | librfc32 library found via the OS specific library path environment variable is too old (for example you forgot to copy the librfc32.dll to the <WinDir>\system32 directory and an older version is loaded from there).
    The sapjcorfc library, the rfccm | librfc32 library or both lack the execute permission flag.
    The sapjcorfc library, the rfccm | librfc32 library or both do not have the same bit width as the JVM.
    The sapjcorfc library, the rfccm | librfc32 library or both were from a different JCo distribution and are not for use with your operating system and/or your hardware processor.
    The sapjcorfc library, the rfccm | librfc32 library or both require a higher operating system version.

Maybe you are looking for

  • Issue adding a new column to OBIEE presentation layer

    Hi, I am pretty new to OBIEE so this may be a silly question. I am facing some problems trying to add a new column from a physical table the OBIEE presentation layer. Below are the steps I followed: Task: add a product category set to the presentatio

  • Migrate account to icloud - read mail with 10.6?

    I have an active mobileme account (paid) but I have not yet migrated to icloud. I have a mac running 10.6.8 and multiple ios devices running 5.x. From what I read, if I migrate my account to icloud, I should be able to read my mail in mail.app, provi

  • Database DOWN due to ORA-1092

    I have Oracle 9.2.0.5 running on Windows 2000 SP4. After a cluster failover, the DB will not start and has following messaeg at end of alert log. Any suggestions how to solve the issue? Database Characterset is WE8ISO8859P1 Failure to extend rollback

  • Stopping a infinite loop

    I'm trying to write to a file by using a while loop. I read from the keyboard and then enter the while loop. I print to the file and then I read from the keyboard again. My problem is when I want to exit the loop by entering nothing I can't. The loop

  • Unhandled SOAP Exception When Reading from an External List created from SQL Server

    This is absolutely doing my head it.  Doesn't matter what I do, which approach I take or how its done, I gt the same crappy error from Sharepoint Designer 2010. Pulling Data from SQL Server 2008 using An external List.  All I want to do is read the d