DBMS_METADATA.GET_DDL- how does it format output

I call "DBMS_METADATA.GET_DDL" to get package body source code, see example call below.
Can i be always sure that it will always:
1. Return schema name before package name as for example this: "MYSCHEMA"."COLLECTSTATS". Or may it return sometimes without schema/owner-name the package name as " CREATE OR REPLACE PACKAGE BODY "COLLECTSTATS" IS"
2. Will it always be in capital letters the "owner.packagename" part?
3. wil lthere always be Double quotes surrounding package name and owner name as "MYSCHEMA"."COLLECTSTATS"?
select DBMS_METADATA.GET_DDL('PACKAGE_BODY','COLLECTSTATS','MYSCHEMA') from DUAL;
Result:
CREATE OR REPLACE PACKAGE BODY "MYSCHEMA"."COLLECTSTATS" IS
    PROCEDURE save_log(p_logrec IN LiveStatsLog%ROWTYPE) IS

Can i be always sure that it will always:
1. Return schema name before package name as for example this: "MYSCHEMA"."COLLECTSTATS". Or may it return sometimes without schema/owner-name the package name as " CREATE OR REPLACE PACKAGE BODY "COLLECTSTATS" IS"This is controlable through a parameter
2. Will it always be in capital letters the "owner.packagename" part?If you have created object names with double quotes when you defined it like:
Create package "p"then no, it will keep the case as it appears in the data dixtionary. If you never use double quotes when creating objects, then ot will always be upper case.
3. wil lthere always be Double quotes surrounding package name and owner name as "MYSCHEMA"."COLLECTSTATS"?Yes, this is done so that case can be preserved if neccessary.
John

Similar Messages

  • How does one format "phone numbers" using "Numbers"?

    Want all phone numbers to format as (555) 555 5555
    How is this done?

    Hi Thomas,
    The old Numbers will be on your computer unless you deleted it. Look in a folder called iWork '09 inside your Applications folder. Launch Numbers 2 (Numbers '09) and do what you used to do to create a Custom Cell Format. For example, you might want a nine-digit phone number to appear as (123) 456 789.
    Save that document. To protect it from Numbers 3.0, make a copy of that document with a different name. Ensure that both your original Phone Number documents are closed (to protect them from that bully Numbers 3.0). Then Open the copy in Numbers 3.0. The custom format will be listed in Format Inspector > Cell > Data Format
    Type a nine-digit number into any cell and format the cell with Format Inspector > Cell > Data Format > Phone Numbers.
    Note: copying a cell with Custom Format in Numbers 2 and then pasting into Numbers 3 does not work. The pasted cell ends up as Text, and the Custom Format is not added to the Data Format list.
    Regards,
    Ian.

  • Laptop vs. tower: how does it effect output to HD projectors

    i'm working with our video production crew and deciding between getting a new laptop or tower. i want the laptop, they want the tower. they want the video card and output features of the tower, i want the portability and convenience of the laptop. we do shows all over the world. how can we get the best resolution from the laptop? does hooking it up to a cinema 23 HD diplay help? does closing the laptop when it's hooked up help? should we update the video card in the laptop? how can i justify getting the laptop.
    (we mostly run keynote/quicktime files for the shows to dual HD projectors on 3:1 screens. usually 3000 pixels wide)
    macbook pro   Mac OS X (10.4.7)  

    Laptops and towers both use DVI connectors (except for the iBook).
    The iBooks only had display mirroring, so the external display was the same as the laptop screen. The PowerBooks, MacBooks, and MacBook Pros have extended desktop, so the external display can have a different picture and resolution. Some have dual-link DVI and can display up to 2,560 X 1,600. Those with single-link can display up to 1,920 X 1,200. I don't know of a Mac laptop or tower that can display the 3,000 pixels you mentioned in your post.

  • Output cut off from dbms_metadata.get_ddl

    When I execute DBMS_METADATA.GET_DDL('TABLE','table_name','schema_name'), the output for some tables is cut off. When I run it from SQL Plus or Toad, it works fine. Is there a setting that I am missing.
    Thanks

    [email protected] wrote:
    When I execute DBMS_METADATA.GET_DDL('TABLE','table_name','schema_name'), the output for some tables is cut off. When I run it from SQL Plus or Toad, it works fine. Is there a setting that I am missing.You did not tell where are you running the dbms_metadata package.
    If you can set long 10000 on the client utility try this then.
    Otherwise SQLPLUS is the best way to extract metadata and spool it to the file.
    HTH
    SS

  • Formatting output values

    How can I format output money values to display 2 decimal digits ?
    For examole, for table values 1.20, 2.00 DBMS output displays 1.2 and 2. I want to display all missing zeroes.
    Thanks

    Use a format mask.
    SQL> select to_char(1.2,'999.99') from dual;
    TO_CHAR
    1.20
    SQL> select to_char(2.0,'999.99') from dual;
    TO_CHAR
    2.00

  • Dbms_metadata.get_ddl output format is not runable.

    Hi,
    I am using dbms_metadata.get_ddl to extract the objects. But the output returned is not runable.
    In output lines are broken so it makes unable to run that code.
    Ex. If I run this for all the synonyms like this.
    set pagesize 0
    set long 90000
    set feedback off
    set echo off
    spool /tmp/FixSyn.out
    select
    DBMS_METADATA.GET_DDL('SYNONYM',u.object_name,'ADMINSRV_D1')
    from
    dba_objects u
    where
    object_type = 'SYNONYM' and owner= 'ADMINSRV_D1';
    spool off;
    Output from this is coming like this.
    CREATE OR REPLACE SYNONYM "ADMINSRV_D1"."ASSTATEAPPORVALTYPE222" FOR "ADMINSRV
    _D1"."ASSTATEAPPORVALTYPE";
    CREATE OR REPLACE SYNONYM "ABC"."ASSTATEAPPORVALTYPE3" FOR "ADMINSRV_D
    1"."ASSTATEAPPORVALTYPE";
    This is broken in multiple lines so not possible to run this.
    Please provide any solution to fix this output.
    Thanks a lot,
    Amit.

    How about using word_wrapped
    set pagesize 0
    set long 90000
    set lines 131
    column txt format a121 word_wrapped
    set feedback off
    set echo off
    spool /tmp/FixSyn.out
    select
    DBMS_METADATA.GET_DDL('SYNONYM',u.object_name,'ADMINSRV_D1') txt
    from
    dba_objects u
    where
    object_type = 'SYNONYM' and owner= 'ADMINSRV_D1';
    spool off;
    For help on Column and default attributes.
    SQL> help column
    You can also check asktom replies.
    http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:30802454515375
    Regards,
    Sabdar Syed.

  • How to change the output as text format in Apps R12.1.3

    Hi All,
    Currently iam trying to modify the Java Concurrent Program (FDExtractAndFormatting) in Batch Payment Process. This Program is generated in text format in 11i APPS. Now we are upgrading to R12.1.3. In R12.1.3 output is coming as PDF format. Here my requirement is how to change the output as text format in R12.1.3 also.
    Please do the needful and suggest me.
    Regards,
    Jagadeesh

    1. It is seeded java concurrent program. Some attributes are missing from 11i to R12. In 11i it is a text format.So i have to investgate on how to retrive those attributes in R12. What is the concurrent program name?
    Have you tried to change the output and submit the request?
    2. Once all are attributes are coming in PDF format. Client wants to open same output in text format as it is 11i (In R12 it is generated in PDF format).If the above does not help, please log a SR.
    Thanks,
    Hussein

  • How to send the output to PDF format in reports 6i?

    Hi,
    How to send the output to PDF format in reports 6i? I given Mode = BITMAP.
    DESTYPE = File, DESFORMAT = PDF, DESNAME = C:\x.pdf.
    Report is running fine. But PDF file not generated. I don't know what i missed. Any one can help this?
    Thanks
    Kavitha

    Hello,
    Do you get this problem only for DESFORMAT=PDF ?
    Test with :
    DESFORMAT = RTF, DESNAME = C:\x.rtf
    or
    DESFORMAT = HTMLCSS, DESNAME = C:\x.html
    does it work ?
    Check if DESNAME is modified in the reports itself.
    Regards

  • DBMS_METADATA.GET_DDL - output trucating

    Hi,
    I am generating Database Package Scripts using the following.
    =====================================================
    set pagesize 0
    set long 90000
    set feedback off;
    column DDL format a80 WORD_WRAPPED
    spool FMONTUSER_PACKAGE.sql
    select dbms_metadata.get_ddl(object_type,object_name,owner) DDL from dba_objects
    where owner='FMONTUSER' and
    object_type in('PACKAGE');
    spool off;
    ============================================
    This is the last PROCEDURE of Last PAKCGE in FMONTUSER_PACKAGE.sql
    =============================================
    PROCEDURE insert_loan_year_end_data(argloan_id IN LOAN.LOAN_ID%TYPE,
    arg_temp_prio_end_row IN TEMP_PRIOR_YEAR_END%ROWTYPE)
    IS
    v_as_of_dt LOAN_YEAR_END_DATA.ASOFDATE%TYPE;
    BEGIN
    -- Insert the record into original loan table
    DBMS_OUTPUT.put_line ('before insert LOAN_YEAR_END_DATA');
    v_as_of_dt := arg_temp_prio_end_row.AS_OF_DATE;
    INSERT INTO LOAN_YEAR_END_DATA     VALUES(LOAN_YEAR_END_DATA_SEQ.NEXTVAL,argloan_id,
    arg_temp_
    prio_end_row.BEGINNING_PRINCIPAL_BAL,arg_temp_prio_end_row.YTD_PRINCIPAL_PAID,
    =============================================
    I am getting trucated some lines in this procedure.
    I increased 'set long 90000' to 'set long 100000'
    Still I am getting truncated output.
    Please help me to solve this.
    regards,
    Mathew

    Hi,
    This script I am using.
    =======================================
    set pagesize 0
    --set long 90000
    set long 2000000000
    set feedback off;
    column DDL format a80 WORD_WRAPPED
    EXECUTE dbms_metadata.set_transform_param(DBMS_METADATA.SESSION_TRANSFORM,'SQLTERMINATOR',true);
    EXECUTE dbms_metadata.set_transform_param(DBMS_METADATA.SESSION_TRANSFORM,'PRETTY',true);
    EXECUTE dbms_metadata.set_transform_param(DBMS_METADATA.SESSION_TRANSFORM,'CONSTRAINTS',true);
    EXECUTE dbms_metadata.set_transform_param(DBMS_METADATA.SESSION_TRANSFORM,'REF_CONSTRAINTS',false);
    EXECUTE dbms_metadata.set_transform_param( DBMS_METADATA.SESSION_TRANSFORM, 'CONSTRAINTS_AS_ALTER', false);
    EXECUTE dbms_metadata.set_transform_param( DBMS_METADATA.SESSION_TRANSFORM, 'STORAGE', false );
    EXECUTE dbms_metadata.set_transform_param( DBMS_METADATA.SESSION_TRANSFORM, 'SEGMENT_ATTRIBUTES', false );
    EXECUTE dbms_metadata.set_transform_param( DBMS_METADATA.SESSION_TRANSFORM, 'TABLESPACE', false );
    spool FMONTUSER_PACKAGE.sql
    REM -------------------------------------------------------------------------------------------------------
    REM FMONTUSER_PACKAGE.sql
    REM PACKAGE.sql
    select dbms_metadata.get_ddl(object_type,object_name,owner) DDL from dba_objects
    where owner='FMONTUSER' and
    object_type in('PACKAGE');
    spool off;
    regards
    Mathew

  • Setting DBMS_METADATA.GET_DDL Output for Materialized Views

    Hi all.
    My Oracle version is 10g.
    I'm extracting the DDL of all the objects from database using the DBMS_METADATA package. I'm using SET_TRANSFORM_PARAM to configure the output because I need a simple sql code, without information about tablespaces, storage and segment attributes. Everything works fine except when I'm working with mviews object types. I can't remove the information about tablespace, storage or segment attributes for materialized views.
    I would like to know if there's a related issue about it. Or there's something missing in my code?
    I tried to specify the object type as another parameter on DBMS_METADATA.SET_TRANSFORM_PARAM but don't work too.
    The only transform parameter that works fine with Materialized Views is the SQLTERMINATOR.
    See how I have done:
    declare
    vDDL clob;
    begin
    dbms_metadata.set_transform_param (DBMS_METADATA.SESSION_TRANSFORM, 'STORAGE', FALSE);
    dbms_metadata.set_transform_param (DBMS_METADATA.SESSION_TRANSFORM, 'TABLESPACE', FALSE);
    dbms_metadata.set_transform_param (DBMS_METADATA.SESSION_TRANSFORM, 'SEGMENT_ATTRIBUTES', FALSE);
    dbms_metadata.set_transform_param (DBMS_METADATA.SESSION_TRANSFORM, 'SQLTERMINATOR',TRUE);
    select dbms_metadata.get_ddl ('MATERIALIZED_VIEW', 'MV_STO020', 'HIS117_CHECK') into vDDL FROM DUAL;
    dbms_output.put_line (vDDL);
    end;
    and how the output is:
    CREATE MATERIALIZED VIEW "HIS117_CHECK"."MV_STO020"
    ORGANIZATION HEAP 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 "TS_HIS117"
    BUILD IMMEDIATE
    USING INDEX
    REFRESH FORCE ON DEMAND
    WITH PRIMARY KEY USING DEFAULT LOCAL ROLLBACK SEGMENT
    DISABLE QUERY REWRITE
    AS SELECT
    STO020_MOVEMENT_LOG_ID STO020_MOVEMENT_LOG_ID
    , STO020_QUANTITY STO020_QUANTITY
    , STO020_DATE STO020_DATE
    , STO020_BEFORE_BALANCE STO020_BEFORE_BALANCE
    , STO011_PRODUCT_MOVEMENT_ID STO011_PRODUCT_MOVEMENT_ID
    , ADM082_PRODUCT_ID ADM082_PRODUCT_ID
    , ADM089_PRODUCT_PRESENTATION_ID ADM089_PRODUCT_PRESENTATION_ID
    , STO010_MOVEMENT_TYPE_ID STO010_MOVEMENT_TYPE_ID
    , STO001_STOCK_ID STO001_STOCK_ID
    , STO001_TARGET_STOCK_ID STO001_TARGET_STOCK_ID
    , STO003_PRODUCT_LOT_ID STO003_PRODUCT_LOT_ID
    , SYS010_USER_ID SYS010_USER_ID
    , EIR001_MPI EIR001_MPI
    , ADM056_MEDICAL_ATTENTION_ID ADM056_MEDICAL_ATTENTION_ID
    , ADM094_USE_UNIT_ID ADM094_USE_UNIT_ID
    FROM
    STO020_MOVEMENT_LOG;
    Thank you in advanced!
    Edited by: lucporto on 28/08/2012 07:26

    Right. I found this way but I consider this just a quick fix, because I think there should be a better way to do this.
    create table t_clob (c_long);
    declare
    p clob;
    begin
    delete from t_clob;
    execute immediate 'insert into t_clob (select to_lob(query) from dba_mviews where owner = :1 and mview_name = :2)'
    USING 'HIS117', 'MV_STO020';
    select 'CREATE MATERIALIZED VIEW MV_STO020' || chr(10) ||
    'REFRESH ON DEMAND' || chr(10) || 'AS' || CHR(10) || mv.c_long
    into p
    from t_clob mv;
    dbms_output.put_line(p);
    end;
    Thanks all.

  • Error When creating Broadcastings "Portal theme does not fit output format"

    Hi All,
    When i create a Broadcasting Settings i am getting an Error saying "Portal theme does not fit output format", and below is the detailed that we are getting,
    "Diagnosis
    You used separate portal themes to generate PDF or print formats (PS or PCL). The output format that you selected is not appropriate for the portal theme currently set.
    System Response
    The broadcast setting is not consistent and you cannot save or execute it.
    Procedure
    Change the output format or the portal theme correspondingly. (The portal theme is set to the first valid value for the current output format when you display the corresponding tab page).
    Procedure for System Administration
      Notification Number RSRD 640"
    Can anyone help how to resolve this issue?
    Regards,
    Muruganand.K

    Would you have chance to provide me the sollution...
    We are facing the exactly the same error message
    Thanks a lot in advance
    Regards
    Ivan

  • Does anyone know how to convert the output from the standard report to xml?

    Does anyone know how to convert the output from the standard SAP report to xml?

    since it a standard report which you cannot modify you can only do the following.
    submit report exporting list to memory
    then
    list from memory and then
    use the returned itab along with CALL TRNSFORMATION key word to convert to xml.
    but this only going to place the whole list content (including data and formating lines,etc) into a xml element and not the actual data alone in the list .

  • I just bought a WD external HD but it is formated for windows. It says the drive has to be reformatted for Mac. How does one do that?

    I just bought a WD external HD but it is formated for windows. It says the drive has to be reformatted for Mac. How does one do that?

    shldrtothewheel
    http://lmgtfy.com/?q=youre+awesome+

  • How to  send ALV output data into Excel sheet format via Mail to the user?

    Hi friends,
    I have a doubt ie,
    How to  send ALV output data into Excel sheet format via Mail to the user?
    regards
    Moosa

    Hi,
    Provide the output internal table to the objbin in the below FM
    Send Message
      CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
           EXPORTING
                document_data              = i_docdata
                put_in_outbox              = c_x
           TABLES
                packing_list               = i_objpack
                object_header              = i_objhead
                contents_bin               = i_objbin
                contents_txt               = i_objtxt
                receivers                  = i_reclist
    and specify the document type
      i_objpack-doc_type   = 'XLS'.
    and try.
    Regards,
    Nandha

  • How to get the output of the report in pdf format

    how to get the output of the report in pdf format?
    Thanks in advance,
    madan.

    Refer these links
    http://www.sap-img.com/bc037.htm
    http://www.members.tripod.com/abap4/Save_Report_Output_to_a_PDF_File.html
    CONVERT_ABAPSPOOLJOB_2_PDF FM convert abap spool output to PDF

Maybe you are looking for

  • Is Elements 8 a true 64 bit Windows 7 product?

    Having just two months ago bought the upgrade to Elements 7, I was very unhappy to find that it is not listed by Microsoft as being compatible with Windows 7 in either 32 bit or 64 bit mode (http://www.microsoft.com/windows/compatibility/windows-7/en

  • OBIEE Cache mangement in cluster enviornment

    Hi all, We have cluster env in OBIEE(Two OBIEE server) Node1 primary node Node2 secondary node. now I want to seed the cache using IBOT(In single env we got it) And purge the cache. 1. Do we need to do it on both the node. or how we can do this?

  • Employee Interaction centre

    hi everyone i am working with Interaction centre in my project i am stucked in Employee Interaction centre concept. Really i dont have any idea about this. it will be great help if anybody provide such information . regards sam

  • What is the standard DS for daily expenses?

    Hi What is the standard DataSource for daily expenses?

  • ITune 9.0.2 Error "-69" and error "unable to read or write from iPod".

    I have an iPod 64GB touch and i can't upload a big chunck of my music and photos since i upgraded my sw version of the iTune to 9.0.2. I hate this new 9.0.2 version of the iTune, it's SH**. so... how can i downgrade back to the latest 8.x.x version?