Not able to add "/" with dbms_metadata.

Hi all

I use 11 GR 2 and need to generate the ddl for grants of objects. I stopped to do it, I'm using dbms_metadata to generate it. I need to add ' / ' after each command, but it is only adding to the last page of the grants. also, even the linsize was set to 200, but the output is always wraps around before 200.
SELECT DBMS_METADATA.GET_GRANTED_DDL('OBJECT_GRANT', USERNAME) || '/' DDL
FROM DBA_USERS where username in (select grantee from dba_tab_privs) and username in ('user')

  GRANT SELECT ON "PACKAGING"."ASSOCIATED_COMPONENTS
_V" TO "AALKHALI"
  GRANT SELECT ON "PACKAGING"."ASSOCIATED_COMPONENTS2_V" TO
"AALKHALI"
  GRANT SELECT ON "PACKAGING"."ASSOCIATED_COMPONENTS3_V" TO "AALKHA
LI"
  GRANT SELECT ON "PACKAGING"."STANDARDS_REPORT1_ALL_LOC_V" TO "AALKHALI"
  GRANT SELECT ON "PACKAGING"."STANDARDS_REPORT1_BYL
OC_V" TO "AALKHALI"
  GRANT SELECT ON "PACKAGING"."STANDARDS_MANIFEST_V" TO "A
ALKHALI"
  GRANT SELECT ON "PACKAGING"."STANDARDS_MANIFEST2_V" TO "AALKHALI"
  GRANT SELECT ON "PACKAGING"."STANDARDS_COMP_STDS_V"
 TO "AALKHALI"
  GRANT SELECT ON "PACKAGING"."STANDARDS_STDDEFAULT_V" TO "AALK
HALI"
  GRANT SELECT ON "PACKAGING"."STANDARDS_STD_DISTCODE_V" TO "AALKHALI"
  GRANT SELECT ON "PACKAGING"."STANDARDS_STD_LOCATION
_V" TO "AALKHALI"
  GRANT SELECT ON "PACKAGING"."STANDARDS_STD_LIB_V" TO "AALK
HALI"
  GRANT SELECT ON "PACKAGING"."STANDARDS_STDSLIST_V" TO "AALKHALI"
  GRANT SELECT ON "PACKAGING"."STANDARDS_STDSLBLS_V" TO "
AALKHALI"
Published by: user11983993 on July 3, 2012 08:10

Hello

You must use dbms_metadata.set_transform_param to specify the SQLTERMINATOR (either; or /) before issuing the GET_DDL:

System@my11g SQL>exec dbms_metadata.set_transform_param(dbms_metadata.SESSION_TRANSFORM,'SQLTERMINATOR',true);

PL/SQL procedure successfully completed.

System@my11g SQL>SELECT DBMS_METADATA.GET_GRANTED_DDL('OBJECT_GRANT', USERNAME) u_ddl
  2  FROM DBA_USERS where username in (select grantee from dba_tab_privs) and username in ('SCOTT');

U_DDL
------------------------------------------------------------------------------------------------------------------------

  GRANT EXECUTE ON "SYS"."DBMS_SESSION" TO "SCOTT";

  GRANT EXECUTE ON "SYS"."DBMS_LOCK" TO "SCOTT";

  GRANT EXECUTE ON "SYS"."DBMS_ERRLOG" TO "SCOTT";

  GRANT EXECUTE ON "SYS"."DBMS_CRYPTO" TO "SCOTT";

  GRANT READ, WRITE ON DIRECTORY "FOLDER1" TO "SCOTT";

  GRANT READ, WRITE ON DIRECTORY "FOLDER2" TO "SCOTT";

  GRANT READ, WRITE ON DIRECTORY "FOLDER3" TO "SCOTT";

  GRANT EXECUTE ON "SYS"."TRACEME" TO "SCOTT";

  GRANT EXECUTE ON "SYS"."TRACEMEOFF" TO "SCOTT";

  GRANT EXECUTE ON "SYS"."REMOVE_FLARCH" TO "SCOTT";

  GRANT EXECUTE ON "SYSTEM"."REMOVE_FLARCH" TO "SCOTT";

  GRANT READ, WRITE ON DIRECTORY "SCOTTDIR" TO "SCOTT";

Tags: Database

Similar Questions

  • Not able to add printers on El Capitan

    I have a late 2009 Mac Mini running OS X El Capitan 10.11.4.  Since the update to El Capitan, I'm not able to add printers, or find software of the printer.  When I opened the printers and Scanners in system preferences, then click (+) to set up a printer, 'Name', 'Place' and 'Use' is not selectable.  If they are not selectable, how am I supposed to add a printer?

    I have a printer Laser of Brother DCP-7065DN.  When I connect it via USB, it does not appear.  All ports operate. (I checked quad).  The cord works with my other printer (a Canon MX860), is not the power cord.

    Any help in this matter would be greatly appreciated!

    Visit brother support website and search for the latest driver. Download and install, and then try again.

  • I moved my HP Office Jet printer on my desktop and am not able to work with it now. Help me - what can I do to get it back on my list of printers Control Panel?

    I moved my HP Office Jet printer on my desktop and am not able to work with it now. Help me - what can I do to get it back on my list of printers Control Panel.

    Hi Liz L,.

    You can try to run the printer Troubleshooter and check.

    Printer in Windows problems

    You can also check out the following link to add the printer.

    Add or remove a printer

    Hope this information is useful.

  • Portal provider - account - not able to add PayPal info.

    Hello

    Vender ID - 59788.

    I'm not able to add paypal info. It crashes me to add my first app before 11.

    If I click on any tab 'Manage account details. "
    I get routed to the tab "Info from the seller" with an error - "address 1 must be well defined without any special character.
    Special characters I only there is "/" and ",".

    Remove the two and save deletes the error but does not really save address

    (Perhaps because the India has no defined States and validation seems to be stuck).

    Even with this temporary change of address (which survives no disconnection/connection but removes the address 1 error).

    by clicking on any Reroute tab tab information from the seller.

    Well well please please do not use google chrome everything first.

    use firefox or internet explore. clear the cache and it will work perfectly.

    one last thing, if you tried 5 times, then you must update the next day, it won't work not today.

    Press on as if it helped u

  • BlackBerry Smartphones not able to add new contacts or edit existing contacts on my BB Curve 8900

    I'm not able to add new contacts on my BB 8900 curver. This problem started two weeks ago. I tried to remove the battery and all, but still questions is not resolved. Also, I think the phone got a little slow. Can someone help me. My BB PIN is 21921334. If someone me message please... I am now struggling with my bb... I don't want to lose... because I'm so attached to my bb. What should I do to fix this? I think that there are only about 300contacts saved on the phone. I would like to receive assistance...

    We hope to get something of value within our community of bb...

    I'm just try minute couple coz there I am facing same problem and his work. I don't know if can reinstall everything back. Just try and look at the result.

  • BlackBerry Smartphones not able to add or edit contact

    Hello

    I'm not able to add or edit the contact in my phone (BB Curve), 8520. I can only delete contacts. Someone please help with this problem. Thank you

    Kind regards. Harris

    If you have Messenger from Yahoo!, Hotmail Messenger or AIM Messenger, uninstall all of them, the problem will be resolved...

  • I've just updated Adobe Professional, but I'm not able to add, to delete the pages more. Before the update, it wasn't a problem. I missed something?

    I've just updated Adobe Professional, but I'm not able to add, to delete the pages more. Before the update, it wasn't a problem. I missed something?

    Are you sure that you're not open your files with the free player instead of using Acrobat? And please do not post the same question multiple times. Also, try to be more specific. "I am not able" can mean many different things.

  • Not able to add the snapshot file to the virtual machine

    We have Win 2003 virtual machine running on ESXi 4.0.0 261974. The virtual machine has two vmdk files. We had taken the snapshot a few days back and today by mistake, we have removed one of the vmdk (DB - srv - 000001.vmdk - snapshot file). Now, we are not able to add the snapshot file to the virtual machine. When tried to add the existing vmdk, it displays only the source disk (DB - srv.vmdk). Please, help us to solve this problem.

    The GUI allows only adding the base vmdk. To add the Flash disk, you must manually change the vmx file. Registrations for the formerly removed virtual disk could still exist in the vmx file with... .present = "FALSE". After changing the vmx file you must reload the configuration. To do this, remove the VM of the inventory and add it back again (right-click on the vmx file).

    André

  • Not able to add the selection of Types of paper taken in charge

    Hello
    I am new to Oracle B2B.
    Through the steps in the tutorial http://download.oracle.com/docs/cd/E14571_01/integration.1111/e10229/b2b_tps.htm#BABGAJDE
    Completed up to 5.3 - task 2 (add a user in the Interface of B2B Oracle)
    And the next thing,
    I'm not able to add select support Document Types.When I click on the "Add supported document type for the selected user", I see "CUSTOM", "EDI_EDIFACT" etc., but in this form has been disabled my ' Add ' button.
    Please let me know how to proceed with this.

    Thank you
    Dembele.

    Edited by: 796969 09/27/2010 14:11

    Hi dembele,.

    To add a document, you must first create that.

    Follow link below to see that the way to create a document.

    http://download.Oracle.com/docs/CD/E14571_01/integration.1111/e10229/bb_doc_flow.htm#BABFGDBA

    Once you have created a document, then go to add it. After the name of Protocol of document in which you created the document, you will see a sign plus. Expand until you see the definition of documents, that you created. Now, select the document definition name, and add the button is activated. Click Add to add this document definition in the trading partner profile.

    Kind regards
    Anuj

  • HELP: Not able to add attachments - system crashes; only through "END TASK MANAGER" can I leave Mozilla

    I'm not able to add attachments - system freezes. only through "END TASK MANAGER" can I leave Mozilla edit

    jasher2000, later in the same day in Microsoft Outlook folders relate not... then, when everything has failed, I rebooted the system and so far today, no problem! PTL, thanks for your help!

  • Not able to scan with my printer [Krishna]

    Hello

    I am not able to scan with my printer.

    Model No.: P3010

    Serial No.: P3015d

    If you have a HP Laserjet P3010 is a printer function and it has not any ability to scan.

  • The application is not able to cope with the acquisition of equipment.

    I use NI USB 6000 with labview. I'm continuing the analog data acquisition, but then, after running for a while, I get an error

    "The application is not able to cope with the acquisition of equipment.

    Increase in the size of buffer, most frequently the reading of data or by specifying a fixed number of samples to read instead of reading all available samples would correct the problem. "Please find the attached vi.


  • I'm not able to add a shared printer on a Windows XP client computer.

    original title: network printers

    I'm not able to add a shared printer on a Windows XP client. One, printers

    Canon MP830 and an Okidata 320 are installed locally on a Windows 2003 Print

    Server. Both are on the same domain. I also have Windows XP, 7, Vista and Linux

    machines on the same network. They are all able to print. The only one who does

    not working is a Windows XP client. This machine has also win 7, Vista installed

    on different hard drives. they are able to print to shared printers. I have

    cammot access to a printer by using the UNC path. I can see the shared

    printers in Favorites network but I can not connect. If I use the add printer

    Wizard to add a network printer, the printer appear in the book: but

    Yet once, they will not connect the error message I get is:

    "Unable to add the printer connection. Either the typed wsa printer name

    incorrctly, or the specified printer has lost its connection to the server. »

    I checked the permissions for the priners and I am logged in as one

    administrator when I try to add the printer. I also checked the group policy and

    everything seems to be oK. I also deleted and added the printer to the

    Server, that I managed to install them as local printers on the affected XP machine

    using the \\server_name\printer_share_name port. The priner name and the

    share name are the same for each printer. They have all worked last week that

    network printers. I'm curious to know what is causing this weird behavior. Any

    help would be greatly appreciated.

    Thank you

    John

    Hello

    Your question is more complex than what is generally answered in the Microsoft Answers forums. It is better suited for the IT Pro TechNet public. Please post your question in the Technet Forum. You can follow the link to your question:

    http://social.technet.Microsoft.com/forums/en-us/category/w7itpro

    Hope that helps.

  • I am a student and I'm not able to pay with a Mastercard or Visa card. So, how can I pay for my subscription? Is it possible to pay with Ideal?

    I am a student and I'm not able to pay with a Mastercard or Visa card. So, how can I pay for my subscription? Is it possible to pay with Ideal?

    Hello

    I'm sorry cloud creative subscription payment can be done using the credit card. for your countries Paypal is also a method that you can use. No other method of payment can be used for it.

    For more information, please contact Adobe customer. Contact the customer service

    You can also check Adobe Store | Order FAQ and your online payment

  • I installed Photoshop CS6 extended (student version) on my Mac in May last year. It has worked perfectly until recently when the system tells me that the program is perhaps not able to work with OSX (I have OSX 10.9.5). I have now uninstalled the PS one a

    I installed Photoshop CS6 extended (student version) on my Mac in May last year. It has worked perfectly until recently when the system tells me that the program is perhaps not able to work with OSX (I have OSX 10.9.5). I have now uninstalled the PS application and you want to reload. I have the S/N codes and redemption. How should I proceed?

    Please visit to download applications download Creative Suite 6 .

    Kind regards

    Hervé Khare

Maybe you are looking for

  • Satellite C660-119 starts

    Hi guys I got some problems with my laptop, need some advice. I've had my laptop for about 4 years now. For the last two months the laptop just stops suddenly and randomly. When I click the power button the power light once and the battery flashing l

  • Monitor NEC

    I recently bought a NEC monitor used with no installation disc.  How install it?

  • Copy on a printer wireless HP4620 function

    Everything is good with my printer wireless HP 4620... except, when I copy a paper it comes out too big and not is not on one page.  Scanning and printing works well, it's the COPY feature... where should I go to the default value of the smaller COPY

  • error code 0 x 80041006

    Why windows 7 has problems with error code 0 x 80041005/6

  • 4.2.5 causing problem of formatting of the apex_mail update fixes group

    I'm under Oracle DB 11.2.0.3 Windowsx64 and Apex 4.2.4.  I recently applied patches 4.2 - > 4.2.5 update Group and I see some weird behavior in the e-mails that sends the Apex.  When you view the email in HTML (with Outlook), I see paragraph breaks a