DBMS_METADATA. GET_DDL for all the procedures for a schema

I'm trying to capture all the DDLS procedure for CUSTOM schema

I use 11g on Linux.

I have run this command...
SELECT dbms_metadata. GET_DDL('PROCEDURE',,'CUSTOM') FROM DUAL;

And this error occurs:
ORA-31600: input value invalid NULL for the parameter VALUE in function SET_FILTER
ORA-06512: at "SYS." Dbms_metadata", line 4018
ORA-06512: at "SYS." Dbms_metadata", line 5843
ORA-06512: at line 1


Thanks in advance.

user13716252 wrote:
Now it works but I have only the first row in SQL PLUS...

Select dbms_metadata. GET_DDL (u.object_type, u.object_name, 'SAPSR3')
u dba_objects
where type_objet = 'PROCEDURE '.
and the owner = "SAPSR3";

How to bring back the whole procedure?

SQL > SET LONG 32000

Tags: Database

Similar Questions

  • How can I use statistics for all the tables in a schema in SQL Developer? and how long will it take on average?

    Hello

    How can I use statistics for all the tables in a schema in SQL Developer? and how long will it take on average?

    Thank you

    Jay.

    Select the connection and right-click on it and select schema statistics collection

  • I downloaded Itunes 12.3.3 and now I tunes does not recognize my Ipad or Iphone. I went through all the procedures and just uninstall and reinstall. Please fix 12.3.3.Thanks.

    I downloaded Itunes 12.3.3 and now I tunes does not recognize my Ipad or Iphone. I went through all the procedures and just uninstall and reinstall. Please fix 12.3.3.Thanks.

    iTunes: fix iPhone or iPod not detected Windows 10

  • Impossible to make it appear in the volume icon notification area. Have you tried all the procedures of sugested suggested on Microsoft Help.

    Impossible to make it appear in the volume icon notification area.  Have you tried all the procedures of sugested suggested on Microsoft Help.

    Try this:

    In the run box type: regedit, click OK
    Navigate to:

    HKEY_CURRENT_USER
    \SOFTWARE
    \Microsoft
    \Windows
    \CurrentVersion
    \Explorer
    \TrayNotify

    Right-click on icon stream, click on remove, restart your computer.
    The icon stream all will return.
    This works on most of the configurations.
    You may need to do a few times.

  • After following all THE procedures to change my homepage when I restart Firefox, the previous home page is still showing.

    At some point in the past, I have installed Bear Share. I removed from my programs (and checked it's gone), but whenever I run Firefox, "search.bearshare.com" appears as the home page. Any ideas as to what is happening?

    See:

    You can search for a program "Mediabar" under "Control Panel > programs and features.

    See also this thread by forum on BearShare:

  • Expdp tables a schema and all the objects in another schema

    Hello

    Is there a way we can export tables to a diagram and everything else a diagram? I tried below, but none of them did the job.

    Table = A.Table1, A.table2

    schemas = b, c

    include = table: "in (a. 'Table1'., 'Table2')" "

    schemas = b, c

    Thank you

    The datapump has several modes:

    "Full import mode.

    "Schema Mode".

    "Table mode".

    'Space Mode '.

    "Transportable Tablespace mode."

    It seems that datapump cannot be in one mode at a time.

    So you have to choose the mode of table first, then for the following export select pattern mode.

  • How to find all the elements a permission scheme is associated with?

    Hello

    It is a follow-up to thread unable to table the request APEX_APPLICATION_ALL_AUTH

    Looks like discover APEX_APPLICATION_ALL_AUTH shows * most * items that a licensing system is related to, but apparently not enter information on IR report columns (it does not capture standard report though - columns for example, I have items in the component type "Report column Page" report).  I ran another report however view APEX_APPLICATION_PAGE_IR_COL and found an article not on the previous.  Are there other elements that does not capture the APEX_APPLICATION_ALL_AUTH?  Or between these two views of report I will be able to see any component, page, column report etc. which has a related authorization scheme?

    Thank you

    Steve

    Hello

    I was able to confirm that this is a bug and it will be corrected in the next version of Application Express 5.0.

    Steve

  • How to delete all the rows in all the tables of a schema in Oracle?

    Hi all

    I want to delete all records of all tables of a schema and I think that there should be a statement for this but I don't know how?

    can help you?

    Published by: user8105261 on November 25, 2009 23:06
    BEGIN
       FOR i IN (SELECT table_name FROM user_tables)
       LOOP
          EXECUTE IMMEDIATE 'DELETE FROM' || i.table_name;
       END LOOP;
       COMMIT;
    END;
    

    (Y)

  • How to allow a user to view all the tables from another schema?

    I have a 'vic4ever' scheme where I have created all my tables. Now, I create a new user named "nvvp1". So, I want to enable nvvp1 display all tables in a schema vic4ever. But I don't know how to do! Or I need to run this command for each table?
    Grant select on vic4ever.table1 to nvvp1;
    Grant select on vic4ever.table2 to nvvp1;
    ....

    Thank you

    Yes, that's what you have to do, but you could speed up a bit:

    BEGIN
    FOR cur_rec IN (SELECT table_name FROM ALL_TABLES WHERE UPPER(owner) = 'NVVP1')
      LOOP
        EXECUTE IMMEDIATE 'Grant select on vic4ever.' || cur_rec.table_name || ' to nvvp1';
      END LOOP;
    END;
    /
    
  • grant for dbms_metadata.get_ddl on objects in another schema

    In Oracle 11 g R2, I use dbms_metadata.get_ddl to get the DDL to another schema, but I got an error:

    ORA-31603: object not found 'IS_SNMP_DATA' of type TABLE in the schema "TXV.

    that grant is necessary for this package to get from another schema ddl?
    I tried with authid current_user (that I found on google), but no result...

    See the following example:

    SQL> create user us_one identified by us1;
    User created.
    
    SQL> grant connect, resource to us_one;
    Grant succeeded.
    
    SQL> create user us_two identified by us2;
    User created.
    
    SQL> grant connect, resource to us_two;
    Grant succeeded.
    
    SQL> conn us_one/us1
    Connected.
    SQL> create table t (id number);
    
    Table created.
    
    SQL> grant select on t to us_two;
    Grant succeeded.
    
    SQL> conn / as sysdba
    Connected.
    
    SQL> grant execute on dbms_metadata to us_two;
    
    Grant succeeded.
    
    SQL> conn us_two/us2
    Connected.
    
    SQL> select dbms_metadata.get_ddl('TABLE','T','US_ONE') from dual;
    ERROR:
    ORA-31603: object "T" of type TABLE not found in schema "US_ONE"
    ORA-06512: at "SYS.DBMS_SYS_ERROR", line 105
    ORA-06512: at "SYS.DBMS_METADATA", line 2806
    ORA-06512: at "SYS.DBMS_METADATA", line 4333
    ORA-06512: at line 1
    
    no rows selected
    
    SQL> conn / as sysdba
    Connected.
    SQL> grant select_catalog_role to us_two;
    
    Grant succeeded.
    
    SQL> conn us_two/us2
    Connected.
    SQL> select dbms_metadata.get_ddl('TABLE','T','US_ONE') from dual;
    
    DBMS_METADATA.GET_DDL('TABLE','T','US_ONE')
    --------------------------------------------------------------------------------
    
      CREATE TABLE "US_ONE"."T"
       (    "ID" NUMBER
       ) PCTFREE 10 PCTUSED 40 INITRA
    
    SQL> 
    
  • get the table script using dbms_metadata.get_ddl but with clob field

    Thus, Oracle 11g R2...
    I use dbms_metadata.get_ddl for table scripts and it works fine...

    now, I have a table with clob field, and it does not work... I got an error "missing a closing parenthesis (ora-0907) '...
    I could paste a script I had, but I don't think that it makes no sense...

    does anyone have an experience on the use of this package on clob tables?


    TNX

    See this code.

    DECLARE
      myddl clob;
      PROCEDURE print_clob(p_clob in clob) as
        l_offset number default 1;
      BEGIN
        loop
          exit when l_offset > dbms_lob.getlength(p_clob);
          dbms_output.put_line(dbms_lob.substr(p_clob, 255, l_offset));
          l_offset := l_offset + 255;
        end loop;
      END print_clob;
      FUNCTION get_metadata return clob is
        h   number;
        th  number;
        doc clob;
      BEGIN
        h := dbms_metadata.open('TABLE');
        dbms_metadata.set_filter(h, 'SCHEMA', 'HR');
        dbms_metadata.set_filter(h, 'NAME', 'EMPLOYEES');
        th := dbms_metadata.add_transform(h, 'MODIFY');
        th := dbms_metadata.add_transform(h, 'DDL');
        --dbms_metadata.set_transform_param(th,'SEGMENT_ATTRIBUTES',false);
        doc := dbms_metadata.fetch_clob(h);
        dbms_metadata.CLOSE(h);
        return doc;
      END get_metadata;
    BEGIN
      myddl := get_metadata;
      print_clob(myddl);
    END;
    

    This procedure of print_ddl I took of the documentation.
    Use of the long VALUE. See, in the first example out put is truncated.

    SQL> SELECT dbms_metadata.get_ddl('TABLE','EMP','SCOTT') FROM dual;
    
    DBMS_METADATA.GET_DDL('TABLE','EMP','SCOTT')
    --------------------------------------------------------------------------------
    
      CREATE TABLE "SCOTT"."EMP"
       (    "EMPNO" NUMBER(4,0),
            "ENAME" VARCHAR2(10),
    
    SQL> set long 10000
    SQL> /
    
    DBMS_METADATA.GET_DDL('TABLE','EMP','SCOTT')
    --------------------------------------------------------------------------------
    
      CREATE TABLE "SCOTT"."EMP"
       (    "EMPNO" NUMBER(4,0),
            "ENAME" VARCHAR2(10),
            "JOB" VARCHAR2(9),
            "MGR" NUMBER(4,0),
            "HIREDATE" DATE,
            "SAL" NUMBER(7,2),
            "COMM" NUMBER(7,2),
            "DEPTNO" NUMBER(2,0),
             CONSTRAINT "PK_EMP" PRIMARY KEY ("EMPNO")
    
    DBMS_METADATA.GET_DDL('TABLE','EMP','SCOTT')
    --------------------------------------------------------------------------------
      USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
      STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
      PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
      TABLESPACE "USERS"  ENABLE,
             CONSTRAINT "FK_DEPTNO" FOREIGN KEY ("DEPTNO")
              REFERENCES "SCOTT"."DEPT" ("DEPTNO") ENABLE
       ) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
      STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
      PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
      TABLESPACE "USERS"
    
    SQL> SET LINESIZE 132
    SQL> SET pagesize 0
    SQL> SET LONG 1000000
    SQL> /
    
      CREATE TABLE "SCOTT"."EMP"
       (    "EMPNO" NUMBER(4,0),
            "ENAME" VARCHAR2(10),
            "JOB" VARCHAR2(9),
            "MGR" NUMBER(4,0),
            "HIREDATE" DATE,
            "SAL" NUMBER(7,2),
            "COMM" NUMBER(7,2),
            "DEPTNO" NUMBER(2,0),
             CONSTRAINT "PK_EMP" PRIMARY KEY ("EMPNO")
      USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
      STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
      PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
      TABLESPACE "USERS"  ENABLE,
             CONSTRAINT "FK_DEPTNO" FOREIGN KEY ("DEPTNO")
              REFERENCES "SCOTT"."DEPT" ("DEPTNO") ENABLE
       ) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
      STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
      PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
      TABLESPACE "USERS"
    
    SQL>
    
  • How to value all the sequence all the table schema/user

    Hello

    I use the Oracle 11 g server. I have a table close to 100. I want to know all the current sequence value ("Currval")
    of all the paintings in particular schema/user

    Please help me how can I get with this query

    Thanks in advance
    karmaya

    nordine B wrote:
    Try this...

    SELECT sequence_name, last_number FROM all_sequences
    where lower(sequence_owner) = '';
    

    HTH
    Vanessa B.

    Published by: Vanessa B December 3, 2012 13:25

    It is not always correct (again that depends on the condition)

    create sequence seq1 cache 100;
    
    SELECT sequence_name, last_number
    FROM all_sequences
    where sequence_name = 'SEQ1';
    
    SEQUENCE_NAME                  LAST_NUMBER
    ------------------------------ -----------
    SEQ1                                     1 
    
    select seq1.nextval from dual;
    
    NEXTVAL
    -------
          1
    
    SELECT sequence_name, last_number
    FROM all_sequences
    where sequence_name = 'SEQ1';
    
    SEQUENCE_NAME                  LAST_NUMBER
    ------------------------------ -----------
    SEQ1                                   101 --"Showing 101"
    
    select seq1.currval from dual;
    
    CURRVAL
    -------
          1 --"CURRVAL is different"
    
  • reading of the objects in another schema schema

    My requirement is to create a schema and grant privileges to read all objects in another main schema, including the functions and procedures. creating a role and assigning it to the schema will read or select the tables, but she will not allow the user to see the description of a function, or a procedure. can you please tell me what are my options. Thank you.

    Hello

    Yes you can GRANT SELECT privilege to allow access to Tables / views, and GRANT EXECUTE privilege on the procedures in another schema.

    You can also CREATE SYNONYM of these Tables in order to hide their location. There is a way to ensure the transparency of the location, otherwise use views or procedures.

    These links can give you a few tracks on the transparency of the situation and manage privileges:

    http://download.Oracle.com/docs/CD/B28359_01/server.111/b28310/ds_admin006.htm

    http://download.Oracle.com/docs/CD/B28359_01/network.111/B28531/authorization.htm#DBSEG004

    Hope this helps.
    Best regards
    Jean Valentine

  • Cannot change the privacy of my story setting. He always comes back to save history. I tried all the possible solutions without change. Any help for this problem?

    I tried to change my privacy settings for history to remember the history of custom settings and he returned always to remember history. I tried all the fixes including refreshing Firefox, by removing the prefs.js file, check my Norton Security Suite to be sure that Firefox Cleanup is disabled, synchronization is turned off and all the other recommendations I can find with an online search of the problem. Another that a deletion total Firefox and fresh installation is there any other recommendation that I can try allowing the change in my setting of the story.
    The reason why I ask is recently that my browser does not store cookies permanently. When I try to enter a password sites (my Bank for example), I have to answer a question before you enter my password. I have to do this every day. Previously, I was able to save the computer and should not be the question that arises, unless I have cleared my cache, history and cookies. However, it seems that cookies seem to disappear when I close the computer power off or after an unknown period of time and I have to go through the procedure to properly identify myself and my computer on the site. This is a private computer with no access by someone else and it became cumbersome to re-enter the requested information whenever I go to some of my usual sites.
    I use Windows 7 Ultimate with 37.0.1 Firefox as my browser. Any help is greatly appreciated.

    The problem only occurs when you restart Windows and not between the closing and startup of Firefox without having to restart Windows?

    Outside Norton, do you have any other utility that can 'clean up' browser like CCleaner settings?

  • What is the procedure for upgrading Thunderbird ESR 17.0.7 at 31.6 on Mac OSX 10.10.2?

    What is the procedure for upgrading from Thunderbird ESR 17.0.7 at 31.6 (last public version) on Mac OSX 10.10.2?

    Is it as simple as install new version and then run to see all local folders and my email and its folders from IMAP to my company as before the upgrade?

    Thank you

    Create a full backup of your Thunderbird profiles folder.
    Uninstall the old version of ESR.
    Download the latest version from https://www.mozilla.org/en-US/thunderbird/all.html and install it.

Maybe you are looking for

  • generate a digital signal for 6722 or 6221

    Hello Thanks first for the help I'm already on this forum. Now, I have the following problem: I like to generate a digital signal: high for 300µs, low 300 µs, 300µs high, low 300µs, top for about 2 ms. I'm looking for a solution how to generate this

  • No there is no way that a person can create a print style sheet?

    It's really annoying when you ask you questions on here and get some great response (s) that you want to print and keep it, but when you do the text is only of high 5px.  So small that you can not read.  And before you say there is one, I just checke

  • Wild tangent bloatware - REQUIRES installation of unknown sources

    ACER has put bloatware wild tangent games on my A3 - A20 tablet, and it cannot be deleted. That sucks all by itself. But what is really unacceptable is wild tangent pops up a notification that he needs your attention.  And to make this notification d

  • How can I get the volume on the meter display screen back?

    Hello I have a small problem... for some reason counter display on screen for my volume when you press the keyboard suddenly disappeared, I would like to get that back. I found this thread in the forum http://h30434.www3.hp.com/t5/Notebook-Display-an

  • I can't find the "date modified" by downloading files to websites

    When I try to upload files to various sites, I can't find the "change date". Usually, I have the 'update' so that the last file that I worked on is on the top of the list and I quikly find. I checked on three different sites and each of them, when I