How to spool DBMS_OUTPUT.PUT_LINE from SqlPlus?

Hi,
i have a stored procedure test:
procedure test is
begin
dbms_output.put_line('Test');
dbms_output.put_line('Test2');
dbms_output.put_line('Test3');
dbms_output.put_line('Test4');
dbms_output.put_line('Test5');
end;
I start the stored procedure out of sqlplus:
spool C:\Temp\test.spl;
exec test;
commit;
spool off;
exit;
My problem is no Test or Test2 appeared in the spool file.
What should i do?
thanks a lot

create or replace procedure hmm as
begin
dbms_output.put_line('Test1');
dbms_output.put_line('Test2');
dbms_output.put_line('Test3');
dbms_output.put_line('Test4');
dbms_output.put_line('Test5');
end;
spool C:\Temp\test.spl;
exec hmm;
spool off;File content is:
Test1
Test2
Test3
Test4
Test5
PL/SQL procedure successfully completed.

Similar Messages

  • How to edit stored procedure from sqlplus ?

    Hi,
    Can anyone advise how to edit stored procedure from sqlplus ?
    Many thanks.

    You can get the source for an object from SQL*Plus by querying the user_source table, i.e.
    SQL> create procedure foo
      2  as
      3  begin
      4    dbms_output.put_line( 'foo' );
      5  end;
      6  /
    Procedure created.
    SQL> select text
      2    from user_source
      3   where name = 'FOO'
      4   order by line;
    TEXT
    procedure foo
    as
    begin
      dbms_output.put_line( 'foo' );
    end;Most commonly, though, if you are using SQL*Plus and a text editor to develop stored procedures, you will have all your stored procedures in .sql files that you edit and just use SQL*Plus to create (or recreate) the stored procedures.
    Justin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

  • Dbms_output.put_line  and sqlplus : output truncated to 100 Characters.

    HI all,
    please see the following script where the variable length is more than a 100 charecters...
    When i run this in sqlplus with SERVEROUTPUT ON, i see the ouput being truncated to 100 charecters.
    sql> ed
    Wrote file afiedt.buf
      1  declare
      2     l_var varchar2(400);
      3  begin
      4     l_var := 'abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefgh
      5     dbms_output.put_line(length(l_var));
      6     dbms_output.put_line(l_var);
      7* end;
      8  /
    130
    abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvI think I am looking for a sqlplus "SET XXXX..." command, but my search has been futile so far.
    Please advice.
    Thanks,
    John.

    Thanks for your reply .. Frank.
    Sorry... I Previewed the post but did not notice my code being truncated in my sqlplus sesssion.
    The actual script has the output to 130 charecters. but when i close the edit (afeidt.buf) and execute it, the display only shows 100 charecters...
    My SQLPLUS version is 9.2.0.1.
    I am using the "WE8ISO8859P1" charecter set.
    declare
        l_var varchar2(500) := 'abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz';
    begin
        dbms_output.put_line(length(l_var));
        dbms_output.put_line(l_var);
    end;
    130
    abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuv
      1  declare
      2      l_var varchar2(500) ;
      3  begin
      4      for i in 1 .. 5 loop
      5          l_var := l_var || 'abcdefghijklmnopqrstuvwxyz';
      6      end loop;
      7      dbms_output.put_line(length(l_var));
      8      dbms_output.put_line(l_var);
      9* end;
    sql> /
    130
    abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuv

  • How to spool a file in sqlplus with feedback off option?

    Is there a way to spool a file in sqlplus with the feedback turn off? I want to capture all the logs, but do not want to see all commands and entries on my screen. When I set the feedback off, I get nothing in my logfiles due to the set feedback off option.

    here's what i did
    SET echo off
    SET feedback off
    SET term off
    SET pagesize 0
    SET linesize 200
    SET newpage 0
    SET space 0
    col name format a120
    SQL> spool test.log
    SQL> @trunc_ref_tables.sql -- this script truncates tables
    SQL> spool off
    SQL> exit
    As expected, there was no logs generated in the logfile with the set feedback off option. This is what was in my log file.
    SQL> @trunc_ref_tables.sql
    SQL> spool off
    How do i see the list of tables that were truncated in my logfiles without havign to see the following on my screen.
    Table truncated.
    Table truncated.
    Table truncated.
    Table truncated.
    Table truncated.
    Table truncated.
    Table truncated.
    Table truncated.
    Table truncated.
    Table truncated.
    Table truncated.
    Table truncated.
    Table truncated.

  • How to insert unicode charater from SQLPLUS

    Hi all,
    My problem is following :
    I want to store unicode character in a column of table so I create table with command : CREATE TABLE PERSON( ID NUMBER(4) NOT NULL ,NAME NVARCHAR2(64) NOT NULL).
    NLS_CHARACTERSET is set in DB :
    SQL> SELECT * FROM NLS_DATABASE_PARAMETERS;
    PARAMETER VALUE
    NLS_LANGUAGE AMERICAN
    NLS_TERRITORY AMERICA
    NLS_CURRENCY $
    NLS_ISO_CURRENCY AMERICA
    NLS_NUMERIC_CHARACTERS .,
    NLS_CHARACTERSET WE8ISO8859P1
    NLS_CALENDAR GREGORIAN
    NLS_DATE_FORMAT DD-MON-RR
    NLS_DATE_LANGUAGE AMERICAN
    NLS_SORT BINARY
    NLS_TIME_FORMAT HH.MI.SSXFF AM
    PARAMETER VALUE
    NLS_TIMESTAMP_FORMAT DD-MON-RR HH.MI.SSXFF AM
    NLS_TIME_TZ_FORMAT HH.MI.SSXFF AM TZH:TZM
    NLS_TIMESTAMP_TZ_FORMAT DD-MON-RR HH.MI.SSXFF AM TZH:TZM
    NLS_DUAL_CURRENCY $
    NLS_COMP BINARY
    NLS_NCHAR_CHARACTERSET UTF8
    NLS_RDBMS_VERSION 8.1.7.0.0
    18 rows selected.
    when I insert data into above table (PERSON) with none unicode character is OK, but I failed with unicode character.
    Can anyone help me to solve this proplem?
    Thank you so much for any hints
    Pls email me at : [email protected]

    NLS_CHARACTERSET WE8ISO8859P1 is a western eurpoean character set (without the Euro symbol and about !# other funky characters being supported - use NLS_CHARACTERSET WE8ISO8859P1% if you want the Euro symbol, sorry just a sidenote). Anyways, this will need to be changed to UTF* before it can store Unicode characters. There are various ways to do this, but the best option is probably to export the entire database, create scripts to recreate all tablespaces and datafiles, drop the database, recreate the database in UTF8, then import the export file. There's a lot of little 'gotchas' involved so be prepared for it not to work the first time. But if it doesn't work, you can always create the database again with NLS_CHARACTERSET WE8ISO8859P1 and reimport so everything is back to how it was.

  • How to exe OS command from sqlplus

    I used to exe OS command with ! in sqlplus in older version of Oracle. I just installed 10g Express and I tried !dir, and got the following error:
    SQL> !dir
    SP2-0042: unknown command "!dir" - rest of line ignored.
    Did I do something wrong?

    host seems to work in special cases
    On Microsoft Windows XP
    where dirme.bat contains
    dir
    host d:\path\to\dirme.bat
    results in output of dir
    whereas host dir
    results in an exception java.lang.ProcessImpl.create(Native Method)
    at oracle.dbtools.raptor.scriptrunner.commands.Host.handleEvent(Host.java:30)
    Works in Linux (for host ls)
    Could be a path/built in dos command problem.
    What is other peoples experience?
    -Turloch

  • Database monitoring from sqlplus prompt?

    How can one monitor database from sqlplus prompt? I want to know about the connected users,queries fire by users,deadlock and explain plan of the query from sqlplus.
    Is there any direct query for the same.
    Thanks
    Vipin

    connected users,queries fire by users,deadlockYou can use v$ views example v$session, v$lock
    explain plan of the query from sqlplusYou can use
    SELECT PLAN_TABLE_OUTPUT FROM TABLE(DBMS_XPLAN.DISPLAY());
    Additionaly I would advise you visit and search more about it
    http://www.oracle.com/technology/documentation/index.html
    Adith

  • How to move the data of a table from sqlplus to XML file

    Hi,
    Could you pls guide me how to move the data of a table from sqlplus to XML file.
    i want to do it from sqlplus rather than toad.pls help
    Thanks

    Oh..I'm in 9i.
    Try this out..and let me know.
    DECLARE
    CTX DBMS_XMLGEN.CTXHANDLE ;
    XML CLOB ;
    F UTL_FILE.FILE_TYPE;
    XMLC VARCHAR2(32767);
    BEGIN
    CTX := DBMS_XMLGEN.NEWCONTEXT('SELECT * FROM department1 ') ;
    XML := DBMS_XMLGEN.GETXML(CTX) ;
    XMLC:=TO_CHAR(XML);
    SHOW_ENVELOPE(XMLC);
    F := UTL_FILE.FOPEN('ATTACH_FILES','DEPT.XML', 'W');
    UTL_FILE.PUT_LINE(F,XML);
    UTL_FILE.FCLOSE(F);
    END ;
    Good luck!!!
    Bhagat
    null                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • How to Populate a table with DBMS_OUTPUT.put_line

    Hey Guys, it's Xev.
    Please only pleasant people reply to this.
    I have a PL/SQL Program that searches for strings and then at the end of it it prints out to DBMS_OUTPUT.put_line.
    I have the owner, the table_name, the column name and the count, then it goes to DBMS_OUTPUT.put_line
    What i want to do, is take the results of DBMS_OUTPUT.put_line and insert it into a table.
    Here is the script I am talking about, as you can see it's simple, yet for me it works.  I want to take the results of this and insert it into a table. How can i do  that??
    set serveroutput on size unlimited
    execute DBMS_OUTPUT.ENABLE (buffer_size => NULL);
    DECLARE
       FND_GOVIDS       INTEGER;
       BEGIN
    FOR t  IN (SELECT owner, table_name, column_name
                FROM all_tab_columns
                WHERE owner = upper('&SCHEMA_NAME'))
    LOOP
      BEGIN
        EXECUTE IMMEDIATE 'with a as ( select  case when REGEXP_LIKE(' || t.column_name ||
    --This searches for 8 Alpha Digits
    ',''^([[:alpha:]]{2}|[[:alpha:]]{4})?[ ]?[0-9]{8}[ ]?([[:alpha:]]{2}|[[:alpha:]]{4})?$'')
    then ''Match Found''
    else ''No Match Found'' end as output from ' || t.owner || '.' || t.table_name || ')
    select count(*) from a where a.output=''Match Found'' '
          INTO FND_GOVIDS ;
    IF FND_GOVIDS > 0         THEN
    DBMS_OUTPUT.put_line (
    t.owner
    || '.'
    || t.table_name
    || ' '
    || t.column_name
    || ' '
    || FND_GOVIDS);
      END IF;
      EXCEPTION
        WHEN OTHERS
          THEN
          DBMS_OUTPUT.put_line (
          'Generic Error '
          || t.column_name
          || ' from '
          || t.owner
          || '.'
          || t.table_name);      
          END;
       END LOOP;
    END;

    Nope, the table is empty....
    But it ran without error??!?! Wait a minute, I think i have to commit right? Since it's not straight sql, ok, that's what I am going to try..
    set serveroutput on size unlimited
    execute DBMS_OUTPUT.ENABLE (buffer_size => NULL);
    DECLARE
       FND_GOVIDS       INTEGER;
       BEGIN
    FOR t  IN (SELECT owner, table_name, column_name
                FROM all_tab_columns
                WHERE owner = upper('&SCHEMA_NAME'))
    LOOP
      BEGIN
        EXECUTE IMMEDIATE 'with a as ( select  case when REGEXP_LIKE(' || t.column_name ||
    --This searches for 6 Alpha Digits
    ',''^([[:alpha:]]|[[:alpha:]]{3})[0-9]{6}$'')
    then ''Match Found''
    else ''No Match Found'' end as output from ' || t.owner || '.' || t.table_name || ')
    select count(*) from a where a.output=''Match Found'' '
          INTO FND_GOVIDS ;
    /*Table insert for resulting */
    IF FND_GOVIDS > 0 THEN
    INSERT INTO "SMEG"."DYNAMIC_COUNTS" (T_OWNER, T_TABLE_NAME, T_COLUMN_NAME, FND_GOVIDS) VALUES
    ('t.owner','t.table_name','t.column_name','FND_GOVIDS');
      END IF;
    /* dbms_output */
    IF FND_GOVIDS > 0 THEN
    DBMS_OUTPUT.put_line (t.owner || '.' || t.table_name || ' ' || t.column_name || ' ' || FND_GOVIDS);
      END IF;
    /* Exception Handeling */
      EXCEPTION
        WHEN OTHERS
          THEN
          DBMS_OUTPUT.put_line (
          'Generic Error '
          || t.column_name
          || ' from '
          || t.owner
          || '.'
          || t.table_name);     
          END;
       END LOOP;
    END;

  • How to print extract value in dbms_output.put_line

    CREATE OR REPLACE PROCEDURE pr_srch_data
    AS
    xml_data_val xmltype:=null;
    vPropertyName clob;
    vstr varchar2(1000);
    operation varchar2(1000);
    vQuery VARCHAR2(4000):=NULL;
    vQry VARCHAR2(4000):=NULL;
    vPartyid VARCHAR2(2000):=NULL;
    vPerson varchar2(4000);
    BEGIN
    FOR I IN (SELECT EAPP_XML_DATA
    FROM binary_xml
    WHERE extractvalue(eapp_xml_data,'/OLifE/Party[@id="Party1"]/Person/LastName') Like 'Rajesh%'
    LOOP
    BEGIN
         SELECT extractvalue(value(t),'/Relation/@RelatedObjectID')
         INTO vPartyid
         FROM TABLE (XMLSEQUENCE (EXTRACT (xml_data_val,'/OLifE/Relation'))) t
         WHERE extractvalue(value(t),'/Relation/RelationRoleCode')='Owner'
    AND existsnode(value(t),'/Relation/@RelatedObjectID')=1 ;
    END;
    SELECT extract(value(t),'/OLifE/Party[@id='''||vPartyid ||''']/Person')
    INTO vPerson
    FROM TABLE (XMLSEQUENCE (EXTRACT (I.EAPP_XML_DATA,'/OLifE')))t;
    dbms_output.put_line('vPerson'||'--'||vPerson);
    END LOOP;
    END;
    But when i am printing vPerson i am getting error. I need to print that extract value.

    Things to remember (that you should know by now)
    Please remind us of which version of 11g you are using in this post and all future posts.
    Look at the FAQ under your sign-in name to see how to use the tag to retain formatting of your code as you have seen our examples to you look like.
    We can't see your screen or your data so how about the error message and some data from your table?
    Please start using either XMLTable or XMLCast/XMLQuery as odie_63 as shown you.
    What are you trying to do?                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Spooling via DBMS_OUTPUT.PUT_LINE without new lines

    Is there a way to spool output to a file using DBMS_OUTPUT.PUT_LINE so that each line is placed on a same line? ie spool all output to one line?
    I guess this probably goes against design of PUT_LINE as it is mean to put a line.
    What I am trying to do is build a DOS command via a SQL script that spools to a file all on one line. this is so that when the spool file is run (either as a .bat or .sh file) the command can execute correctly since it is all on one line.
    Any ideas?
    Leigh.

    You can try below code.
    create or replace procedure p1(P_AMU varchar2) as
    cursor cu_get_workbooks is
    select '/workbook "'||doc_created_by||'.'||doc_name||'"' workbook
    from (
    SELECT EUL4_DOCUMENTS.DOC_NAME,
    DOC_CREATED_BY
    FROM EUL4_DOCUMENTS EUL4_DOCUMENTS
    WHERE DOC_CREATED_BY=P_AMU;
    str varchar2(4000);
    begin
    for cu_rec in cu_get_workbooks loop
    str := cu_rec.workbook;
    end loop;
    insert into temp values (str);
    end;
    And then you can write a sql script:
    exec p1(&&AMU);
    select * from temp;
    Regards,
    Vidyadhar Singh.

  • DBMS_OUTPUT.PUT_LINE multi records from PL/SQL procedure to Java web page.

    Hello
    I will explain the scenario:
    In our java web page, we are using three text boxes to enter "Part number,Description and Aircraft type". Every time the user no need to enter all these data. The person can enter any combination of data or only one text box. Actually the output data corresponding to this input entries is from five Oracle table. If we are using a single query to take data from all the five tables, the database will hang. So I written a procedure "SEARCH1",this will accept any combination of values (for empty values we need to pass NULL to this procedure) and output data from all the five tables. When I executing this procedure in SQL editor, the execution is very fast and giving exact result. I used "dbms_output.put_line" clause for outputing multiple records in my procedure. The output variables are "Serial No, part Number, Description, Aircraft type,Part No1,Part No2,Part No3,Part No4". I want to use the same procedure "SEARCH1" for outputing data in java web page.The passing argument I can take from the text box provided in java web page. I am using jdbc thin driver to connect our java web page to Oracle 9i database.
    Note1 : If any combination of search item not available, in procedure itself I am outputing a message like "Part Number not found". Here I am using four words ("Part" is the first word,"Number" is the second,"Not" s the third, and "found" is the fourth) for outputing this message.Is it necessary to equalise number of words I am using here to the record outputing eight variable?
    Our current development work is stopped because of this issue. So any one familier in this field,plese help me to solve our issue by giving the sample code for the same scenario.
    My Email-id is : [email protected]
    I will expect yor early mail.
    With thanks
    Pramod kumar.

    Hello Avi,
    I am trying to solve this issue by using objects. But the following part of code also throwing some warning like "PLS-00302: component must be declared". Plese cross check my code and help me to solve this issue.
    drop type rectab;
    create or replace type rectype as object(PartNo varchar2(30),Description varchar2(150),AIrcraft_type varchar2(15),status_IPC varchar2(30),status_ELOG varchar2(30),status_SUPCAT varchar2(30),status_AIRODWH varchar2(30));
    create or replace type rectab as table of rectype;
    create or replace package ioStructArray as
    procedure testsch2(pno in varchar2,pdes in varchar2,air in varchar2,orec in out rectab);
    end ioStructArray;
    create or replace package body ioStructArray as
    procedure testsch2(pno in varchar2,pdes in varchar2,air in varchar2,orec in out rectab) is
    mdescription varchar2(150);
    mpartnum varchar2(30);
    mpno varchar2(30);
    mdes varchar2(150);
    mair varchar2(15);
    mstat varchar2(1);
    cursor c1 is select partnum,description,aircraft_type from master_catalog where partnum=mpno and aircraft_type=mair and description like ltrim(rtrim(mdes))||'%';
    cursor c2 is select partnum from ipc_master where partnum=mpartnum;
    cursor c3 is select partnum from fedlog_data where partnum=mpartnum;
    cursor c4 is select partnum from superparts where partnum=mpartnum;
    cursor c5 is select part_no from supplier_catalog where part_no=mpartnum;
    mpno1 varchar2(30);
    mpno2 varchar2(30);
    mpno3 varchar2(30);
    mpno4 varchar2(30);
    mpno5 varchar2(30);
    maircraft_type varchar2(15);
    mstat1 varchar2(30);
    mstat2 varchar2(30);
    mstat3 varchar2(30);
    mstat4 varchar2(30);
    begin
    mstat:='N';
    mpno:=pno;
    mdes:=pdes;
    mair:=air;
    if mpno is not null and mdes is not null and mair is not null then
    begin
    mstat:='N';
    mpno:=pno;
    mdes:=pdes;
    mair:=air;
    for i in c1 loop
    mstat:='N';
    mstat1:='N';
    mstat2:='N';
    mstat3:='N';
    mstat4:='N';
    mpno1:=i.partnum;
    mpartnum:=i.partnum;
    mdescription:=i.description;
    maircraft_type:=i.aircraft_type;
    for j in c2 loop
    mpno2:=j.partnum;
    end loop;
    for k in c3 loop
    mpno3:=k.partnum;
    end loop;
    for l in c4 loop
    mpno4:=l.partnum;
    end loop;
    for m in c5 loop
    mpno5:=m.part_no;
    end loop;
    if mpno2=mpartnum then
    mstat1:=mpno2;
    end if;
    if mpno3=mpartnum then
    mstat2:=mpno3;
    end if;
    if mpno4=mpartnum then
    mstat3:=mpno4;
    end if;
    if mpno5=mpartnum then
    mstat4:=mpno5;
    end if;
    if mpno1=mpartnum then
    mstat:='Y';
    orec.PartNo:=mpno1;
    orec.Description:=mdescription;
    orec.AIrcraft_type:=maircraft_type;
    orec.status_IPC:=mstat1;
    orec.status_ELOG:=mstat2;
    orec.status_SUPCAT:=mstat3;
    orec.STATUS_AIRODWH:=status_AIRODWH;
    end if;
    end loop;
    end;
    end if;
    end testsch2;
    end ioStructArray;
    Expecting your early reply.
    With thanks
    Pramod kumar.

  • Hello, How do I tell sql+ to spool output file from windows to Unix server?

    Hello, How do I tell sql+ to spool output file from windows to Unix server?
    I am new to SQL+ and just learned how to spool the file. But file is saved in my local windows enviroment and since it's 2GB in size...I want to spool it directly to another remote unix server.
    Pls answer in detail... I have been to most of the thread and didn't see relevant answer to above question.
    Am I suppose to develope some script which FTP the spool file directly to the server I want to
    or
    i Have to use UTL_FILE Package ?
    Thanks for reply

    You may not be able to...
    SQL*Plus can only spool to the local machine. If you have mapped a directory on the Unix server from your Windows machine, you can specify that directory in your SPOOL command.
    You could telnet to the Unix server, run SQL*Plus there, and spool the file to a local (Unix) directory.
    If the Unix server is also the Oracle database server, you could use the UTL_FILE package rather than using SQL*Plus to spool a file.
    If the Unix server is also an FTP server, you could also FTP the file from your local machine to the server.
    Of course, I would tend to re-examine a requirement to regularly generate a 2 GB text file. It seems likely that there is a better way...
    Justin

  • How to get ddls from sqlplus like that of TOAD

    Hi,
    I have to work on a terminal machine for a client where the TOAD is not installed. For my regular DBA activities I need to take the DDL many times.
    I am very much used to the style of DDL scripts which TOAD 9.6.x.x gives for any object in a schema.
    Can someone suggest how I can I get exactly TOAD-like scripts (which provide not just the create statements)
    For e.g.
    *1.From sqlplus when I do*
    select dbms_metadata.get_ddl('TABLE','APE1_ACCUMULATORS') from dual;
    I get only the below
    CREATE TABLE XLTDBO92.APE1_ACCUMULATORS
    CYCLE_CODE NUMBER(4) CONSTRAINT APE1ACCU_CYCLE_CODE_NN NOT NULL,
    CYCLE_INSTANCE NUMBER(2) CONSTRAINT APE1ACCU_CYCLE_INSTANCE_NN NOT NULL,
    CUSTOMER_SEGMENT NUMBER(4) CONSTRAINT APE1ACCU_CUSTOMER_SEGMENT_NN NOT NULL,
    CUSTOMER_ID NUMBER(9) CONSTRAINT APE1ACCU_CUSTOMER_ID_NN NOT NULL,
    ACCUM_TYPE_ID NUMBER(9) CONSTRAINT APE1ACCU_ACCUM_TYPE_ID_NN NOT NULL,
    OWNER_ID
    *2.But from TOAD 9.6.x.x when i click on "create scripts" I will get*
    DROP TABLE XLTDBO92.APE1_ACCUMULATORS CASCADE CONSTRAINTS;
    CREATE TABLE XLTDBO92.APE1_ACCUMULATORS
    CYCLE_CODE NUMBER(4) CONSTRAINT APE1ACCU_CYCLE_CODE_NN NOT NULL,
    CYCLE_INSTANCE NUMBER(2) CONSTRAINT APE1ACCU_CYCLE_INSTANCE_NN NOT NULL,
    CUSTOMER_SEGMENT NUMBER(4) CONSTRAINT APE1ACCU_CUSTOMER_SEGMENT_NN NOT NULL,
    CUSTOMER_ID NUMBER(9) CONSTRAINT APE1ACCU_CUSTOMER_ID_NN NOT NULL,
    ACCUM_TYPE_ID NUMBER(9) CONSTRAINT APE1ACCU_ACCUM_TYPE_ID_NN NOT NULL,
    OWNER_ID
    DROP SYNONYM XLTDB92.APE1_ACCUMULATORS;
    CREATE SYNONYM XLTDB92.APE1_ACCUMULATORS FOR XLTDBO92.APE1_ACCUMULATORS;
    GRANT DELETE, INSERT, SELECT, UPDATE ON XLTDBO92.APE1_ACCUMULATORS TO XLTDBO92_ALL;
    So my question is:
    How to such scripts from sqlplus as well ,irrespective of the type of the object?_
    Note:I am posting a new thread because my previous question was answered even though i was not able to type in completely. My mistake as it was posted in before i could finish the question.
    Regds,
    Kunwar

    If the DDL returned by dbms_metadata is not to your liking then write your own scrips to generate DDL or cover scripts to generate all related items that you want.
    In the case of synonyms and grants this is very easy using rdbms dictionary views, but if you generate a table's DDL you may also want and need the PK, UK, FK, secondary indexes, comments, and policies on the table as well as synonyms and grants. Everything that if you drop the tables goes away.
    There is a dbms_metaddata procedure get_dependent_ddl to generate dependend objects on a table that may be of interest.
    HTH -- Mark D Powell --

  • How to Execute a OWB Mapping or a Process from SQLPLUS editor?

    I need to know how can we execute a OWB mapping from SQLPLUS editor or from a Stored Procedure.

    Hi,
    You can use the MDL export/import utility for this, but as you are importing into the same repository you will end up with importing into the same project again.
    So for this you can follow the workaround as:
    ->Take export of the required mapping from the project OWB_B
    -> Rename the Project OWB_B to some thing like OWB_B_1(or any other name), note that you have to rename both logical and physical name of the project
    -> Rename the project OWB_A to OWB_B and if you import the MDL all the objects will be imported to OWB_B then you can rename back the project to OWB_A
    -> Finally rename the project OWB_B_1 to OWB_B (to its original name).
    Regards,
    Pnreddy

Maybe you are looking for

  • Tiny burn on a functioning logic board causing dark screen!?

    Hello everyone!!! Hoping someone can help me because i am totally STUMPED! I have a 2010 macbook pro and the screen suddenly went dark. The computer works perfecty with an external monitor, so i assumed the backlight was just burnt out. When i took i

  • Repairing / Compressing .PST files and Outlook Processes in Task Manager

    Does Outlook 2010 still use scanpst.exe for repairing .PST files?  That seems to be what I read in a few articles that I found online, but I can't seem to find my scanpst.exe   file.  It either wasn't installed originally or it has been deleted by so

  • "Layers" on webpages not working for me

    I am not very well versed in webpage lingo, but I will try to explain the problem I am having. I have noticed that recently with Safari, the certain "layers" of a webpage will fall behind other "layers." For instance, I might go to a drop-down menu o

  • Power BI for Mexico

    When is it going to be available the Power BI Preview for Mexico?

  • Difficulty with syncing videos??

    I am trying to add some videos to my ipad by syncing through my itunes. When I connect my IPAD to the PC to complete the sync it wont let me sync it says that I have 24GB of videos on my IPAD yet under movies and TV shows there are no videos. How can