Dbms_metadata.get_ddl returns text of table script but not the view

Hi all
I am using a DDL trigger like
CREATE OR REPLACE TRIGGER SYS.log_ddl AFTER DDL
ON DATABASE
declare
n_text varchar2(2000);
begin
if ora_sysevent='CREATE' and ora_dict_obj_type='VIEW' then
select dbms_metadata.get_ddl
(ora_dict_obj_type ,ora_dict_obj_name,ora_dict_obj_owner)
into n_text from dual;
elsif ora_sysevent='CREATE' and ora_dict_obj_type='TABLE' then
select dbms_metadata.get_ddl
(ora_dict_obj_type ,ora_dict_obj_name,ora_dict_obj_owner) into n_text from dual
end if;
end;
on execution
the first condition produces an error if the view does not already exists
ORA-31603: object "TEST" of type VIEW not found in schema "SHAI"
but the second condition of table creation executs successfuly and return the script of the table
what can be the main theory behind this.

I think some of the bug fixes were targeted for 9.2.0.5, but I can't tell you for certain.
One of the things I really don't like about DBMS_METADATA is that it returns an error if a specified object does not exist. For example, I created a sql script that would accept a schema name as the input parameter and would generate all the ddl for the schema. If the schema did not have a particular object, for example a sequence, the call to DBMS_METADATA to generate the sequence ddl would return an error instead of returning nothing. I had error checking in the script, so this caused problems. (Oracle's response is that this is expected behaviour).
This might be what is happening with your call.
Dan

Similar Messages

  • I have made a webpage in HTML with several links to JPGs / GIFs. The text matter opens perfectly but not the images. Please help me

    I have made a web page in HTML with several links to JPGs / GIFs. While text matter opens up perfectly, but not the images. Please help me.
    == This happened ==
    Every time Firefox opened
    == User Agent ==
    Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; CTS Version; .NET CLR 1.1.4322; .NET CLR 2.0.50727)

    URL of that web page?

  • Is there a way of just changing the text to the main menu..but not the submenus?

    Is there a way of just changing the text to the main
    menu..but not the submenus?
    Also i have looked at in the browser and when i glide over
    the menu catergories or click on them they dont show the
    submenu...what can i do to solve this?

    Does the example described at
    http://labs.adobe.com/technologies/spry/articles/menu_bar/index.html
    work for you?
    What are you doing that's different from the example?
    When you say you just want to change the text of the main
    menu without changing the submenus, do you mean you want to do so
    dynamically, at some later stage after the page has loaded?
    If so, you could try retrieving the main menu elements you
    want to update from the DOM and updating them from your script's
    event handler for whatever event it is that you want to update them
    in response to. This presumes the widget will detect this and
    update appropriately, which I can't say for sure since I haven't
    actually tried it.
    Hope that helps!
    Rob

  • Allow user to select data, see the tables list but not view the table/view/stored procs definition

    Hi,
    May I know how to achieve the above ? Please enlighten me.
    TIA !

    So you want users to be able to see the name of the table, but not the definition? I am afraid that this is not possible. You can give users access to a table and hide the definition, but the name is considered part of the definition.
    Olaf mentioned VIEW DEFINITION. What he did not say is that when you have SELECT permission (or EXECUTE permission on a stored procedure), the permission VIEW DEFINITION is implied by the stronger permission. For this reason you need to explicitly DENY this
    permission as shown in the script below.
    In the script I create a user without a login and then impersonate a user. This is an excellent way to test permissions.
    [sql]
    CREATE TABLE tabbe (a int NOT NULL)
    go
    CREATE USER usse WITHOUT LOGIN
    go
    GRANT SELECT ON tabbe TO usse
    DENY VIEW DEFINITION ON tabbe TO usse
    go
    EXECUTE AS USER = 'usse'
    go
    SELECT * FROM tabbe
    go
    SELECT name FROM sys.objects WHERE type = 'U'
    EXEC sp_help tabbe
    go
    REVERT
    go
    DROP USER usse
    DROP TABLE tabbe
    {/sql]
    Note: rather than denying VIEW DEFINITION on an individual object you can leave out "ON tabbe" to deny the permission across the database.
    Erland Sommarskog, SQL Server MVP, [email protected]

  • How to create a custom control of a button where the look will be applied to all others but not the Boolean text?

    Hi all
    I would like to create a customized button as a master so that if I change the look of the master all other buttons will change too.
    I have done this with a custom control as a "strict type def" otherwise the look will not change BUT If I do this as a strict type def I cannot change the Boolean text anymore which should be different on every button.
    How can I create a master control of a button where the look will be applied to all others but not the Boolean text?
    Stay Hungry, Stay Foolish
    Solved!
    Go to Solution.

    Steve Chandler wrote:
    I don't think you can do that. I just looked and as I suspected the Boolean text property is read only for strict typedefs so you cannot use property nodes to change the text.
    As a workaround just make it a typedef. When you want to change the look open the typedef and make it strict, make your changes, then make it non strict again. You will have to update the Boolean text again for all instances. Kind of a pain. Maybe this is something for the idea exchange.
    Kudos for being sneaky.
    I like these creative work-arounds!
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • Why can't I save text I've entered into a PDF file?  When I hit "Save As", only the PDF document is saved, but not the text i typed into the document.  I'm using Windows 8.

    Why can't I save text I've entered into a PDF file?  When I hit "Save As", only the PDF document is saved, but not the text i typed into the document.  I'm using Windows 8.

    THANK YOU!
    Jan Whitfield
    The College Planning Center
    250 Palladio Parkway, Suite 1311
    Folsom, CA 95630
    (916) 985-0453
    www.TheCollegePlanningCenter.com

  • How do i delete files in pages, i have some old invoices in pages that i want to delete, i can delete the text but not the whole file, please help. Dennis

    As it say's above i need to delete some of my oldinvoices/estimates from my files in pages, i can get rid of the text but not the whole file, thanks Dennis

    You locate the file in the Finder(it's in the Documents item of the sidebar by default), drag it to the Trash, and empty the Trash.
    (59926)

  • Trying to attach pdf files to emails I'm sending to myself.  Instead of attaching the file, it copies the text.  I want the file so I can have it on my iPad.  I've been able to do this in the past, but not the last two tries.  What's wrong?  Thanks.

    Trying to attach pdf files to emails I'm sending to myself.  Instead of attaching the file, it copies the text.  I want the file so I can have it on my iPad.  I've been able to do this in the past, but not the last two tries.  What am I doing wrong?  Thanks.

    You aren't doing anything wrong.
    If the PDF is short enough, your iPad Mail app will display the text as part of the mail.
    Actually it is still an attachment.
    Tap and HOLD on the text and you should see options to "Open In..." that will allow you to open the PDF in most PDF readers such as iBooks, GoodReader, etc.

  • I want to increase the ringer volume but not the background volume (ie texts, emails, etc)

    I want to increase the ringer volume but not the background volume (ie texts, emails, etc)

    nigelb999 wrote:
    Can anyone shed some light as to why it's not possible to adjust the ringer volume at the lock screen? Even though it's possible to adjust the volume during music playback and responses from Siri, etc.
    Cannot answer that question. That is a decision made by Apple.
    nigelb999 wrote:
    If there was a profile app available in the app store that allowed me to automatically set different volume levels at different times of the day it would be great - particularly if the app didn't require me to jailbreak the phone.
    There would not be an app like that, as they would not have access to the API. You can provide feedback to Apple if you would like to see this enhancement at http://www.apple.com/feedback and click on the appropriate link.

  • Query returns record in SQL Developer but not in iSQLPlus

    ... back in a minute, I may not have done a commit at the end of the insert.
    The problem I was having was I hadnt commited the record in SQL Developer but the queries where returning records in this environment but not in iSQLPlus or Apex and it was confusing me.
    Message was edited by:
    Benton
    Message was edited by:
    Benton

    Finally got to know the reason why Timezone Abbr woudn't show up in SQL Plus.
    I ran below query in SQL PLUS
    SELECT SESSIONTIMEZONE, CURRENT_TIMESTAMP, systimestamp, LOCALTIMESTAMP FROM DUAL;
    SESSIONTIMEZONE CURRENT_TIMESTAMP SYSTIMESTAMP LOCALTIMESTAMP
    -05:00 08-SEP-12 12.00.31.575228 AM -05:00 08-SEP-12 12.00.31.575223 AM -05:00 08-SEP-12 12.00.31.575228 AM
    Now executed the same query in SQL Developer:
    SESSIONTIMEZONE CURRENT_TIMESTAMP SYSTIMESTAMP LOCALTIMESTAMP
    America/Chicago     08-SEP-12 12.08.32.072424000 AM AMERICA/CHICAGO     08-SEP-12 12.08.32.072420000 AM -05:00     08-SEP-12 12.08.32.072424000 AM
    The difference between the 2 outputs is the way in which time_zones were respresented. In SQL PLUS, it is shown as an offset whereas in SQL Developer as a time zone region name. Now there are many "time sone regions" that follow an offset of -5:00. This confuses Oracle and a "UNK"(Unknown) for a query like the one below when trying to execute in SQL PLUS:
    select extract(timezone_abbr from from_tz(cast(sysdate as timestamp),SESSIONTIMEZONE)) from dual;
    EXTRACT(TI
    UNK
    Therefore we need to specify the exact Time Zone Region(TZR) in order to obtain the corresponding TZD(Daylight Savings Format i.e. CDT or CST). This we do by altering the session environment vaiable time_zone
    alter session set time_zone='America/Chicago';
    Now executing the queries to find the abbreviated time zone( in TZD format) will finally work to return a non-null char value.
    select extract(timezone_abbr from from_tz(cast(sysdate as timestamp),SESSIONTIMEZONE)) from dual;
    EXTRACT(TI
    CDT
    select to_char(CURRENT_TIMESTAMP, 'TZD') from dual;
    TO_CHA
    CDT

  • When e-mailing pdfs, the text becomes blurry/blocked, but not images

    Recently, when e-mailing pdfs to certain individuals, they complain that the pdfs they receive contain blocked/blurry text. ALL of the text is dropped or blurred, but not the images. I originally thought that it was a probelm with only the pdfs created from Publisher, but this week it happened to several pdfs that I did not originally create. One person uses his iPad to view files, and wants all pdfs created as "Print to PDF" options--however, that compromises the resolution of the file. Does anyone else experience this probelm? Is there a solution?

    Please let me know which device are they trying to open the PDFs on? Are they trying to open it on their desktops or on a portable device?
    Also, what happens if the same PDF is not opened via mail but is open directly on the individuals machine? Is the behavior the same.
    Thanks
    Ankit

  • ITunes opens but without any text showing.  Drop down menus have text but not the app itself. I have a Mac Powerbook Pro running Windows XP under Boot Camp.

    Running under Windows XP,  a few upgrades ago iTunes started opening without any text showing in the application.  Clicking on PLAY will play music but no text shows to indicate what's playing and no text to show music library. Drop down windows show text but not the app itself.
    Subsequent upgrades and reinstalls have not corrected the problem, When I run under iOS (Snow Leopard), iTunes opens with text and runs correctly.
    Help!

    Because I created FAT32 partition using Boot Camp tool few days ago I installed my custom copy of Windows XP with SP3, IE7 and WMP10 integrated using nLite (for WMP10 integration use RVM Integrator). I did not use Boot Camp tool this time - I just booted CD using Option key. Then I installed Boot Camp 2.0 drivers you can find on Mac Disk 1. After this I installed Boot Camp drivers 2.1 update. In Add or remove Programs I checked drivers - I uninstalled old drivers which call identical, but you can skip this. Everything works fine BTW it is better to format your partition to NTFS - you have much less disk errors, you do not waste time for disk errors scans during Windows startup, your data are much more safe. If you need NTFS write permissions use great tool Paragon NTFS for Mac OSX or open source NTFS driver.
    Message was edited by: limo79

  • Extract only the records exist in Table A but not in Table B

    Hi guru, I need to compare two big SAP tables and only select the records that exist in Table A but not in Table B, i.e. Exclude the records that exist in both tables. Due to the volume, left outer join is not preferred. Does anybody know any smart and quick way to do so?
    Thanks,

    Sounds like you're looking for alternatives from performance perspective, so maybe your question would be better posed in .
    As always for any performance related questions the answer is: It depends...
    I.e. you need to provide some further background: How many entries in table A, how many in table B? How are they linked (e.g. index, primary key, what fields)? On average, how many entries do you expect in your result set?
    Depending on those parameters (and possibly others) one can then evaluate other options: There's probably not many, I'd try also using [subqueries|http://help.sap.com/abapdocu_70/en/ABENWHERE_LOGEXP_SUBQUERY.htm]. Since performance tuning always requires an analysis, it's best to try out the different variations and check what happens (e.g. how long do they run, what kind of load do they introduce on the database, etc.). Subquery versus outer join performance depends also on the used database.
    Cheers, harald

  • On my iPad I can see in mail only the headlines of the mails but not the text - why?

    On my iPad I can see in mail only the headlines of the mails but not the text - why?

    Try closing the Mail app completely and see if the text shows when you re-open the Mail app : from the home screen (i.e. not with the Mail app 'open' on-screen) double-click the home button to bring up the taskbar, then press and hold any of the apps on the taskbar for a couple of seconds or so until they start shaking, then press the '-' in the top left of the Mail app to close it, and touch any part of the screen above the taskbar so as to stop the shaking and close the taskbar.
    If that doesn't work then also do a reset : press and hold both the sleep and home buttons for about 10 to 15 seconds (ignore the red slider), after which the Apple logo should appear - you won't lose any content, it's the iPad equivalent of a reboot

  • I don't have a phone plan, so I cannot text without wifi. I have been using iMessage to text my friends, until it stopped working. I can text my sisters email, but not my boyfriends iPhone. The send button will not turn blue. Help? Please?

    I don't have a phone plan, so I cannot text without wifi. I have been using iMessage to text my friends, until it stopped working. I can text my sisters email, but not my boyfriends iPhone. The send button will not turn blue. Help? Please?

    There is a problem with iMessage with what Apple says is a small number of iPhones and they are working on a fix. In the meantime try this:
    1. Settings > Messages > iMessage = Off
    2. Settings > FaceTime > FaceTime = Off
    3. Settings > General > Reset > Reset Network Settings
    4. Wait for the iPhone to Reboot
    5. Settings > FaceTime > FaceTime = On
    6. Settings > Messages > iMessage = On
    You may have to repeat the steps a couple of times.
      - with thanks to @deggie

Maybe you are looking for

  • Windows 7 -64 bit syncing with Outlook 2003 not working

    Hello all, I have a Dell Vostro 1720 (64-bit) with MS-Office 2003 (32-bit), in German language. My Iphone 3GS (Dutch language) won't sync any contacts or appointments with Outlook 2003. There is no error message, Itunes seems to think everything is O

  • Apple TV 1st generation via rca

    Hey, i have the old style back box TV & i was wondering is there anyway to connect my 1st gen apple tv to it using RCA? as cheap as pos

  • GridBagLayout() hell

    Hello, I have almost completed the GUI for my RAT client although there are layout problems i.e. some elements are not where they should be. This is what the layout should be like: / label / / /textField / JEditorPane / / textField / / /textField / /

  • PSD import losing text

    I have a PSD with several text layers that fill the layer vertically and extend beyond the visible edges horizontally. For example, one is the word general. In the PSD it is positioned with the 'ene' in the center of the document, but I can scroll to

  • OBIEE 11g services.

    Hi Gurus, I am very new to OBIEE 11g,I had installed 11.1.1.3 in my PC,I have some questions.... 1)when I am trying to open default RPD it is asking Repository password..what is the default pwd? 2)what services need to up and run in services(like OBI