How do I see the Rewritten sql in 8i

I would like to be able to see the sql produced by a re-written query. We are using database 8.1.6.2. We have created a materialized view based on prebuilt table based on months. We have a dimension for our calendar that rolls up months to quarters and years.
When we try to query based on quarter or year, explain plan fails and cannot find the re-written sql to see what is happenning in the database.
Thanks for any help you can provide.

Does it not turn up in a trace file?
(alter session set sql_trace=true;
Perform the sql on the mv
Check the trace file created)

Similar Messages

  • APEX4-How can I see the insert sql apex is creating to insert form into db?

    Hi,
    I've a table with around 78 columns and a form to submit the values. Till around 68 columns it was working fine, when I added another 10 fields and modified names of few other, on clicking Create or Apply it throws duplicate column name error. I've given the exact error below.
    How can I find out which is the duplicate column? or where the problem lies? The form is quite big and complex so I don't want to recreate it.
    Is it possible for me to see the sql apex is generating to insert or update the value?
    When I try to create a new entry, application throws this error:
    ORA-06550: line 1, column 79: PL/SQL: ORA-00957: duplicate column name ORA-06550: line 1, column 7: PL/SQL: SQL Statement ignored
    On editing an existing entry, application throws error:
    ORA-20505: Error in DML: p_rowid=181, p_alt_rowid=RT_ID, p_rowid2=, p_alt_rowid2=. ORA-00957: duplicate column name
    Thanks for you time.
    Thanks,
    Hozy

    Fixed, I was referring to same column name twice.

  • How can I see the relationship of tables in Microsoft SQL Server?

    How can I see the relationships of the tables? Exactly like what we see in Access. In Access if we select Database tool and then relationships, we can see how the tables are linked to each other. How can I find this option in SQL Server Management Studio?
    Thanks,
    GGGGGNNNNN
    GGGGGNNNNN

    Thanks,
    I could verify what you explained here. how can I overcome this message and resolve it when my database owner is not there:
    Message while starting with database diagrams of a attached/restored database
    If you have just attached/restored a database from another SQL Server instance. While accessing its database diagrams folder, you may get the following message
    It is an informational message and would prevent you from working on database diagrams. The message says that your database has no valid owner currently. Reason for this error is that database owner on a previous SQL Server instance does not exist here.
    To overcome this error just add the valid database owner through T-SQL or SSMS. Also verify the compatibility level of your database is correct for your SQL Server instance.
    I appreciate your help.
    GGGGGNNNNN
    GGGGGNNNNN

  • How can I see the contents in a Ref Cursor

    I have this code:
    CREATE OR REPLACE PACKAGE APOD_LOG.APOD_C3_LOG_API_PKG
    AUTHID CURRENT_USER
    AS
    type rc is ref cursor;
    PROCEDURE Fetch_Log_Spec
    in_LOCAL_IP_VALUE IN BINARY_INTEGER,
    out_RESULT_SET OUT rc
    END APOD_C3_LOG_API_PKG;
    CREATE OR REPLACE PACKAGE BODY APOD_LOG.APOD_C3_LOG_API_PKG
    AS
    PROCEDURE Fetch_Log_Spec
    in_LOCAL_IP_VALUE IN BINARY_INTEGER,
    out_RESULT_SET OUT rc
    IS
    BEGIN
    DBMS_APPLICATION_INFO.set_module(module_name => 'APOD_LOG.API_PKG',action_name => 'Fetch_Log_Spec');
    DBMS_APPLICATION_INFO.set_client_info(client_info => 'Calling with in_LOCAL_IP_VALUE = ' ||to_char(in_LOCAL_IP_VALUE));
    open out_RESULT_SET for
    select
    in_LOCAL_IP_VALUE as IN_LOCAL_IP_VALUE,
    10002 as PORT,
    APOD_CORE.UTIL_IP_PKG.IPAddressToIPValue2('''224.168.100.1''') as MULTICAST_IP_VALUE
    from
    dual
    union
    select
    in_LOCAL_IP_VALUE as IN_LOCAL_IP_VALUE,
    10002 as PORT,
    APOD_CORE.UTIL_IP_PKG.IPAddressToIPValue2('''224.168.200.1''') as MULTICAST_IP_VALUE
    from
    dual
    union
    select
    in_LOCAL_IP_VALUE as IN_LOCAL_IP_VALUE,
    10002 as PORT,
    APOD_CORE.UTIL_IP_PKG.IPAddressToIPValue2('''224.168.100.123''') as MULTICAST_IP_VALUE
    from
    dual
    union
    select
    in_LOCAL_IP_VALUE as IN_LOCAL_IP_VALUE,
    10002 as PORT,
    APOD_CORE.UTIL_IP_PKG.IPAddressToIPValue2('''224.168.200.123''') as MULTICAST_IP_VALUE
    from
    dual;
    DBMS_APPLICATION_INFO.set_client_info(client_info => 'Called Fetch_Log_Spec '||to_char(SQL%ROWCOUNT)||' row(s) returned with in_LOCAL_IP_VALUE = '||to_char(in_LOCAL_IP_VALUE) );
    END Fetch_Log_Spec;
    END APOD_C3_LOG_API_PKG;
    And I am trying to test it like this:
    DECLARE
    IN_LOCAL_IP_VALUE BINARY_INTEGER;
    OUT_RESULT_SET APOD_LOG.APOD_C3_LOG_API_PKG.rc;
    BEGIN
    IN_LOCAL_IP_VALUE := 23374048;
    -- OUT_RESULT_SET := NULL; How do I see this
    APOD_LOG.APOD_C3_LOG_API_PKG.FETCH_LOG_SPEC ( IN_LOCAL_IP_VALUE, OUT_RESULT_SET );
    END;
    How can I see the dataset returnd by the OUT_RESULT_SET in SQLPlus or Quest ScriptRunner?

    A ref cursor doesn't really contain rows but you can use them to reference a SQL statement that fetches the rows.
    Re: returning resultset from procedure...or pkg

  • How can i see the text of one view?

    I want to see the text of one view stored in my Oracle DB, then i run the next query:
    SELECT TEXT FROM ALL_VIEWS WHERE VIEW_NAME = view_name;
    The problem is that the information return me truncated.
    How can i see the text of one view?
    Sorry, my English is terrible.
    I'm from Argentina.

    Use 'set long 100000000' at sql prompt. Run your query again.

  • How do I see the full SQLl/Query text of a spid?

    How do I see the full SQLl/Query text of a spid?
    I use different ways to get the query, the problem is it truncates the end, so I cannot see the entire query/sql text. Is there another way to a query/sql text that is being run?
    Please mark solved if I've answered your question, vote for it as helpful to help other users find a solution quicker
    Praveen Dsa | MCITP - Database Administrator 2008 |
    My Blog | My Page

    IF @@TRANCOUNT > 0 COMMIT TRAN
    What i want to see is the entire batch.
    It means this was the last batch submitted by client. You can try below as well.
    SELECT s.session_id,
    r.status,
    r.blocking_session_id 'Blk by',
    r.wait_type,
    wait_resource,
    r.wait_time / (1000.0) 'Wait Sec',
    r.cpu_time,
    r.logical_reads,
    r.reads,
    r.writes,
    r.total_elapsed_time / (1000.0) 'Elaps Sec',
    Substring(st.TEXT,(r.statement_start_offset / 2) + 1,
    ((CASE r.statement_end_offset
    WHEN -1
    THEN Datalength(st.TEXT)
    ELSE r.statement_end_offset
    END - r.statement_start_offset) / 2) + 1) AS statement_text,
    Coalesce(Quotename(Db_name(st.dbid)) + N'.' + Quotename(Object_schema_name(st.objectid,st.dbid)) + N'.' + Quotename(Object_name(st.objectid,st.dbid)),
    '') AS command_text,
    r.command,
    s.login_name,
    s.host_name,
    s.program_name,
    s.last_request_end_time,
    s.login_time,
    r.open_transaction_count
    FROM sys.dm_exec_sessions AS s
    JOIN sys.dm_exec_requests AS r
    ON r.session_id = s.session_id
    CROSS APPLY sys.Dm_exec_sql_text(r.sql_handle) AS st
    WHERE r.session_id != @@SPID
    ORDER BY r.cpu_time desc, r.status,
    r.blocking_session_id,
    s.session_id
    Balmukund Lakhani
    Please mark solved if I've answered your question, vote for it as helpful to help other users find a solution quicker
    This posting is provided "AS IS" with no warranties, and confers no rights.
    My Blog |
    Team Blog | @Twitter
    | Facebook
    Author: SQL Server 2012 AlwaysOn -
    Paperback, Kindle

  • How do I see the tables in an existing business area and add tables to it

    Hi
    I am having a business area which contains a number of business folders.
    I am creating a new custom folder in it but i dont know if the table exists in the business area or not. How can I see the lisst of tables which are being used by the business area.

    Hi,
    Easiest way is to look at the folder properties using the administrator tool, you can see there the objects the folder is created on.
    Another way is to create a SQL to query your needs.
    You can find here in the forum several SQL regarding the connection between folders and BA.
    In the folders table you will be able to see the source of it.
    Of course that for custom folder you will need to see the SQL to get your requirment.
    Tamir

  • How to change & see the PO Status (Purchase Order Status) ?

    Hi Everybody,
    I have to change the PO Status. For this I am using the Function Module 'BBP_PD_PO_STATUS_CHANGE'. But it is not changing the PO Status. How/Where to see the PO Status?
    Please help me out asap.
    Thanks & Regrds,
    Nagaraju Maddi
    Message was edited by: Nagaraju Maddi

    Hi ,
    It is possible to Update the Pricing procedure in Old PO. For this what you need  to do is Open PO in ME22N transaction, in the header Org. Data tab remove the Purch. Org and Company Code and press Enter Key for 3 or 4 times now enter the Purch. Org and Company Code now check in the Item Data, condition tab Analysis button new Pricing procedure is picked up. Even we can change the PO Currency in this way if it is changed in Vendor master.
    Hope this will help you
    Best Regards,
    Pradeep Naik

  • How can I see the old backups of my previous Macbook done by Time machine in a Time capsule with my new iMac?

    How can I see the old backups of my previous Macbook done by Time machine in a Time capsule with my new iMac? I've changed from a Macbook to a iMac because that one stopped working and I cannot use it anymore. I've been able to import all the data of the last backup of the Macbook when setting the new iMac, but I cannot access now to the old backups of the Macbook and there are information that wasn't in the last backup and I would like to recover. Thank you very much.

    Yes, you can ..
    Read Q17 here.
    http://pondini.org/TM/FAQ.html
    Strongly recommend his whole section.. 14-17 and read it carefully to understand the ways you can make TM work for you.

  • Recently I bought an Ipad, now I need to find the old owner, so he can unlock it, but the full e-mail isn't written. How can I see the old e-mail?

    So, yesterday I bought an Ipad 3 16gb. when I unpacked it, I found that it is locked, so I need the previous owner to unlock it. For the bad cause, the owner is from UK, and I've bought it from a  intermediary in Bulgaria. How can I see the full email so I can contact him?

    Apple will not provide that information unless order to do so by a court order.  Your only option at this point is to return it to the intermediary and get your money back.  They should not have sold you a locked device.  Then don't buy another device without confirming that it isn't locked, as explained under "how do I check for activation lock before buying a used device" in this article: Find My iPhone Activation Lock.

  • I have an AirPort Express, iPhone 5, and MacBook (late 2010). How do I see the graphical overview of my network?

    I have an AirPort Express, iPhone 5, and MacBook (late 2010). How do I see the graphical overview of my network? (I can't seem to find a way to see it).
    My computer is acting....well, strange.  I can't put my finger on it but it doesn't seem right.  Menus look skewed.  Some applications look like they're trying to disguise themselves as apple (no consistant window formats).  Airplay turns on and off on my devices on it's own.  And some locked system preference seem to unlock themselves, or won't even grey-out after I lock them. 
    I have changed my password many times but the issue keeps coming back.  I feel like I'm going crazy - but I know that something just isn't right...maybe someone's been hacking me? (I have no idea why...) 
    Anyway, maybe I could have stemmed from an improper setup of my wireless network.
    Any thoughts?
    Also, right now, when I just signed into apple communities....
         I have an iCloud email address that is accociated with my 1 and ONLY Apple ID...
         It seems to have been working but...
         When I loged in here it only saw my:
                                  OLD MacBookPro
                                  3 Old iPods
                                  My new MacMini with OS X Sever (Server is currently turned off)
         Could my Apple ID be confusing my MacBook (which I'm currently using) as an old iPod or my old MacBookPro?
         I doesn't even see my iPad (1st generation), or my iPhone 5
         Also, the Mac App store is giving me the option to download Mountain Lion??? I already have version 10.8.3...
    Can anyone perform an analysis on my account and computer?  I have been to the Apple Store 6 seperate time and the problem was not resolved (after 6 COMPLETE hard drive wipes).
    PLEASE HELP!

    i guess you could put the aiport utility app on your iphone, click on the aiport express there, it will show you how many devices are connected to it and the mac addresses of those devices.

  • How can i see the "manage devices" in my itunes account? because i want to remove a device from using my apple id. tnx so much

    how can i see the "manage devices" in my itunes account? because i want to remove a device from using my apple id. tnx so much

    Thanks pvonk, I will try downloanding the book from the Iphone right now.......
    Just tried to download and it wants me to buy it again?  Is there some way around this?  I guess I thought that was the whole point of the cloud, buy it once and access from any of your devices right?
    Also, I have logged into the icloud.com as suggested and will plink around there for a bit and try to understand.  It is just all so dang different that what I am used to; Apple's way, that is.
    Thanks again for the Icloud tip and if you know of a way to download without making a 2nd purchase I would sure love to hear it!
    Geez. one other thing (I guess I am complaining) but I bought more space in the cloud, they took my cash fast enough but have not yet increase the size of my storage space yet?  Is Apple sometimes slow to get internal stuff done?

  • How can I see the url of a link before clicking on it?

    Hi. I have Firefox 10.0.2. I used to be able to see the url of a link on web pages in the bottom left of the browser. That way, if I the url didn't seem legit I wouldn't click on the link. But now, when I put the mouse over a link, nothing comes up. How can I see the link addresses again? Thanks.

    The Status Bar. where the link previously showed on mouse hover, has been replaced by the Add-on Bar. You can install the following add-on to get some of the former Status Bar functions back. The Add-on Bar must be turned on. The add-on will also stop the showing of the "tooltip" type status loading text, and will, instead, show it in the Add-on Bar:
    *See --> https://support.mozilla.org/en-US/kb/what-happened-status-bar
    *To turn on the Add-on Bar, see --> https://support.mozilla.org/en-US/kb/Back%20and%20forward%20or%20other%20toolbar%20items%20are%20missing#w_showing-the-navigation-toolbar '''and click on "Add-on Bar" to check it'''
    *Add -on '''''Status-4-Evar''''': https://addons.mozilla.org/en-US/firefox/addon/status-4-evar/
    *If necessary, after install and restart:
    **Open Customze window (Firefox button > Options > Toolbar Layout '''''OR''''' View > Toolbars > Customize '''''OR''''' ALT+V+T+C '''''OR'''''right-click in the empty space at the end of the Tab Bar and choose Customize)
    **'''While Customize window is open''', drag any or all of the following from the Customize window to the Add-on Bar in the order and position you want them to appear. Then click "Done" button at lower right on the Customize window.
    ***"Status Text" ('''''link on mouse hover or during page loading''''' or "Done" when page is loaded)
    ***"Progress Meter" (progress bar of page loading)
    ***"Download Status" (status of download)
    '''If this reply solves your problem, please click "Solved It" next to this reply when <u>signed-in</u> to the forum.'''
    Not related to your question, but...
    You may need to update some plug-ins. Check your plug-ins and update as necessary:
    *Plug-in check --> http://www.mozilla.org/en-US/plugincheck/
    *Adobe Shockwave for Director Netscape plug-in: [https://support.mozilla.org/en-US/kb/Using%20the%20Shockwave%20plugin%20with%20Firefox#w_installing-shockwave Installing ('''''or Updating''''') the Shockwave plugin with Firefox]
    *Adobe PDF Plug-In For Firefox and Netscape: [https://support.mozilla.org/en-US/kb/Using%20the%20Adobe%20Reader%20plugin%20with%20Firefox#w_installing-and-updating-adobe-reader Installing/Updating Adobe Reader in Firefox]
    *Shockwave Flash (Adobe Flash or Flash): [https://support.mozilla.org/en-US/kb/Managing%20the%20Flash%20plugin#w_updating-flash Updating Flash in Firefox]
    *'''''Next Generation Java Plug-in for Mozilla browsers''''': [https://support.mozilla.org/en-US/kb/Using%20the%20Java%20plugin%20with%20Firefox#w_installing-or-updating-java Installing or Updating Java in Firefox]

  • HT1351 when my iphone 5 is connected, i can't see the content in itunes library.  when i have an older ipod plugged in, there is a button to view what's on the ipod but not iphone.  how do i see the music stored on iphone 5 in itunes??

    When i connect my iphone 5 to cpu, i cant figure out how to see the music held on phone.  When I click the "iphone" icon, it pulls up the options (summary, info, music, apps, etc) but when i click music, it just gives sync options.  When i plug in an older ipod, there's an option to see what's on the ipod but not with my iphone 5.  how do i see the music stored on my iphone in itunes?

    There is a OneClickdigital ereader available in the App Store. Download that to your iPod to read pdfs and books from the library. And you might need to download the OneClickdigital eaudio player to listen to audiobooks from the library. Once both are downloaded sync you iPod again to transfer them.

  • How can I see the tracklist in the Podcast app (like I can in the Music app in ios6)?

    When playing a podcast in the Music app in ios6, I can tap the screen and see the track list.  How can I see the track list in the Podcast app in ios7?

    Dakota
    The table MARV holds the current and previous values for the purchasing period and who changed them.  The table is usually set for logging of changes and you may be able to find the history you want depending on how your database is setup.  I hope this helps.
    Regards
    H

Maybe you are looking for