How do you get a list of all the trigger DDLs?

I want to get a list of all the DB trigger DDLs of owner 'ABS'. I want to do it using 1 SQL statement.
This is what I ran:
SELECT
TO_CHAR(DBMS_METADATA.GET_DDL('TRIGGER', TRIGGER_NAME, 'ABS'))
FROM
ALL_TRIGGERS
WHERE
OWNER = 'ABS';
I get this error: [1]:
(Error): ORA-22835: Buffer too small for CLOB to CHAR or BLOB to RAW conversion (actual: 4414, maximum: 4000)
Then I looked up in the web and they ask to use DBMS_LOB.SUBSTR instead. So I do that:
SELECT
DBMS_LOB.SUBSTR(DBMS_METADATA.GET_DDL('TRIGGER', TRIGGER_NAME, 'ABS'), 32767, 1)
FROM
ALL_TRIGGERS
WHERE
OWNER = 'ABS';
Now I get this error:
[1]: (Error): ORA-06502: PL/SQL: numeric or value error: character string buffer too small ORA-06512: at line 1
Looks like you cannot show more than *4000* chars. There are 43 triggers whose DDL is more than 4000 chars long.
Why is this?
How can I solve my problem?
Edited by: Channa on Feb 16, 2010 9:45 PM

Herald, fantastic news. SET LONG did the trick.
But I had to put a very big value. 32000 was not enough. Otherwise some of the triggers (big ones) got cut off.
This is my complete code which did it.
SPOOL F:\Channa\zz_zzTemp\Binuka\OutPut.txt
set trimspool on
set pages 0
set long *1000000000*
set linesize 32767
SET TERMOUT OFF
SELECT DBMS_METADATA.GET_DDL('TRIGGER', TRIGGER_NAME, 'ABS')
FROM ALL_TRIGGERS
WHERE OWNER = 'ABS' AND trigger_name NOT LIKE 'BIN$%'
SPOOL OUT
THANKS A LOT. REALLY APPRECIATE IT.
P.S: I had to include the NOT LIKE 'BIN$%' in the where clause because otherwise I got this error:
ERROR:
ORA-31603: object *"BIN$cqXDSqghrFngQKjAJAovgw==$0"* of type TRIGGER not found in
schema "ABS"
ORA-06512: at "SYS.DBMS_SYS_ERROR", line 105
ORA-06512: at "SYS.DBMS_METADATA", line 2805
ORA-06512: at "SYS.DBMS_METADATA", line 4333
ORA-06512: at line 1
no rows selected
I THINK BIN$... triggers are dropped triggers in the DB recycle bin???
Edited by: Channa on Feb 17, 2010 2:58 AM
Edited by: Channa on Feb 17, 2010 3:01 AM

Similar Messages

  • How do you get a list of all the machines a user has rights to remote control?

    Is there a way to get a list of the workstations that a user has rights to
    control?

    Wsixsmith,
    It appears that in the past few days you have not received a response to your
    posting. That concerns us, and has triggered this automated reply.
    Has your problem been resolved? If not, you might try one of the following options:
    - Do a search of our knowledgebase at http://support.novell.com/search/kb_index.jsp
    - Check all of the other support tools and options available at
    http://support.novell.com.
    - You could also try posting your message again. Make sure it is posted in the
    correct newsgroup. (http://support.novell.com/forums)
    Be sure to read the forum FAQ about what to expect in the way of responses:
    http://support.novell.com/forums/faq_general.html
    If this is a reply to a duplicate posting, please ignore and accept our apologies
    and rest assured we will issue a stern reprimand to our posting bot.
    Good luck!
    Your Novell Product Support Forums Team
    http://support.novell.com/forums/

  • How do i get a list of all the apps i have purchased this year

    how do i get a list of all the apps  have purchased this year and how much each app was

    Check your iTunes purchase history (click your email address in the upper right corner in the iTunes App Store-> log in -> click Purchase History).  This gives you a comprehensive list of apps you've purchased.
     Cheers, Tom

  • How can i get a list of all the apps i purchased last year?

    i would like to get a summary of all the apps i purchased as well as the prices

    Open App Store and sign in with your Apple ID. Click on the Purchase icon in the toolbar. This will list out all your App Store purchases. It will not list prices, but you can look those up for each purchased application.
    There should also be an account summary. Click on the Account link under Quick Links on the right.

  • How do I get a list of all the music I have purchased?

    I wish to list all the music I have purchased from the iTunes music store. The Store/Purchased option on the lefthand side of the iTunes screen does not show all my purchased music. So how can I find them?
    HP   Windows XP Pro  

    Posted in error!

  • I have a user who has permissions on site A B C 's some libraries. How can I get a list for all the contents the user have permission for?

    The user has permissions on site A B, and C. within the sites, the user has permissions on some lists/libraries.
    how can i retrieve an entire list to see what the user has permissions on?
    thank you 
    I might be a newbie in some area. But I'm working hard. :)

    You can get the report using powershell, please check below posts
    http://social.technet.microsoft.com/Forums/sharepoint/en-US/5a3252bf-cb03-4488-9a0d-f4e0ce07d497/user-permissionsaccess-report-in-sharepoint-site
    http://reality-tech.com/2011/12/30/reporting-on-all-user-permissions-in-a-web-application/
    My Blog- http://www.sharepoint-journey.com|
    If a post answers your question, please click Mark As Answer on that post and Vote as Helpful

  • Hi ,How can I get a list of all laptops or users with folder direction enabled or offline files enabled, be it sccm or poerwshell . i have struggled for a week.

    Hi ,how can I get a list of all laptops or users with folder direction enabled or offline files enabled, be it sccm
    or poerwshell . i have struggled for a week
    tchocr

    Hi,
    There is no such PowerShell command can achiev this. Maybe you can use a script to get the user name with folder redirection enabled. However, I am not familiar with writing script, and it would be better for you to ask in script forum below for professional
    assistance:
    http://social.technet.microsoft.com/Forums/en-US/home?forum=ITCG&filter=alltypes&sort=lastpostdesc
    Best Regards,
    Mandy
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact [email protected]

  • How can I get a list of all workbooks

    Can anybody please tell me how can I get a list of all my workbooks that are on my Oracle Discoverer database without having to manually write them down? I am using Oracle Database 10g Enterprise Edition.

    Hi,
    To implement the EUL Management BA follow metalink NOTE:556932.1
    there are very simple steps you need to perform in order to use it

  • How can I get a list of all laptops or users with folder direction enabled or offline files enabled, be it sccm or poerwshell . i have struggled for a week.

    How can I get a list of all laptops or users with folder direction enabled or offline files enabled, be it sccm or poerwshell . i have struggled for a week.

    Hi,
    There is no such PowerShell command can achiev this. Maybe you can use a script to get the user name with folder redirection enabled. However, I am not familiar with writing script, and it would be better for you to ask in script forum below for professional
    assistance:
    http://social.technet.microsoft.com/Forums/en-US/home?forum=ITCG&filter=alltypes&sort=lastpostdesc
    Best Regards,
    Mandy
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact [email protected]

  • How do I get a list of all missing files in a catalog in LR2?

    Is there an easy way to get a list of all missing files for the thumbnails in Lr2? I know the symbol that appears in the upper right corner of any particular photo that is missing its file, but how can I get a list of all such photos for an entire catalog (or at least big chunks of a catalog).
    Thanks.

    You can right click a folder and choose Synchronise - it has a Show Missing Files buttom.
    John

  • How do you get a list of events in a Calendar in Mountain Lion?

    I use a lot of calendars in Calendar to organize events. I am trying to consolidate these calendars because I have been having weird issues such as two calendars being linked to each other in a strange way. I want to move events into new calendars and delete the old calendars once I am certain they are empty. To do this, I want to be able to list all events in a given calendar. (Not page through month by month.) You used to be able to do this by searching for "." This no longer works.  How can I get a list of all events in a single calendar?

    If you are moving from an On My Mac Calendar to another On My Mac calendar or to an iCloud Calendar, you can use this AppleScript:
    tell application "Calendar"
              move events of calendar "Source" to calendar "Destination"
    end tell
    When I tried to move from an iCloud Calendar, Calendar got a server error.
    Further testing and it will move to an iCloud, but not iCloud to iCloud. Also, it doesn't move, although it looks that way. Once you close and open Calendar, it has the events in both locations.

  • How do i get a list of all Roles defubed under a particular OrganizationalUnit? How can i use LDAPConnection.search method for this?

     

    Sorry for the typographical mistake.
    Please read the question as:"How do i get a list of all Roles defined under a particular OrganizationalUnit? How can i use LDAPConnection.search method for this?"

  • How can I get a list of all my annotations to send to someone else, listed by PAGE #, not order.

    How can I get a list of all my annotations to send to someone else, listed by PAGE #, not order??

    The comments list is sorted by page by default. If it's not for some reason, click the "Sort comments" button and select that option. It looks like this:

  • How to get a list of all the clients logged in to the network

    hiii
    how can i fetch a list of all the users who are currently logged on the network...so that the list can then be sent to a database..plz tel me what techniqe can followed to do this....thanx

    hiii
    how can i fetch a list of all the users who are
    currently logged on the network...Easy, nobody logs onto the network so this is always nobody.
    You may be asking, how do I determine all the users who have logged in to all the PCs on the network.
    Write a program which is added to each user's Startup a program which updates the database with their details. If you have network scripts, this can be added to the user' network login batch script.

  • How do you get a list of your contacts nick names and their phone numbers on line and print them out?

    How do you get a list of your contacts nick names and their phone numbers on line and print them out?  I've been trying to figure out how to get the list to print out but I can't even find a complete list to view on Verizon's web site.  Does anyone know how to do this?

    Log into your online account. In the, 'I want to', box type, Manage Contacts.
    Place your cursor over any contact, a pop screen will appear with the option to print your contacts

Maybe you are looking for

  • How can I add a custom title to multiple ALV reports selected by layout?

    Greetings and good day, everyone! Within the past week or so, I posted a question asking the best way to create a program that would generate multiple ALV reports.  I got some great ideas, and I've actually coded up a few simple demos based on your f

  • Need Help: Can not detect monitor

    I have built a computer from scratch and the computer restart itself once awhile. I tried to update all the drivers by running a live update from MSI. All the drivers were updated, except the BIOS. I also updated the newest AGP Video driver. When I r

  • How to implement static tables in XI Mapping

    I need to use a static table for lookup purposes in an XI mapping. I am using Java Mapping. -- This is a small  5 columns - 264 rows table, which is unlikely to be changed.

  • Getting a Song into the Right Key?

    I'm trying to use GarageBand as an accompanying "band" for improvisation practice for myself and my students. I can't seem to figure out how to get a tune using only GB loops into the exact key I want. For example, I set the song to E major (and that

  • Sync new versions of apps using Home Sharing?

    I sync my iPad and iPhone off of my laptop, but keep a backup of my library on another computer using Home Sharing. This works great for almost everything I do, however it will only import an app that isn't in the library, it won't import updated ver