Impdp any table

When I run this command:

expdp tosandata/tosandata tables = (acact2act) Directory is dumpfile dumpdir is acact2actdmp.dmp

A dump file and a log file is created with the content of the journal the following:

;;;

Export: Release 11.2.0.1.0 - Production on Mon Dec 16 14:45:53 2013

Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.

;;;

Connected to: Oracle Database 11 g Enterprise Edition Release 11.2.0.1.0 - 64 bit Production

With partitioning, OLAP, Data Mining and Real Application Testing options

Start "TOSANDATA". "" SYS_EXPORT_TABLE_01 ': tosandata / * tables (acact2act) directory = dumpdir dumpfile = acact2actdmp.dmp

Current estimation using BLOCKS method...

Processing object type TABLE_EXPORT/TABLE/TABLE_DATA

Total estimation using BLOCKS method: 128 KB

Object type TABLE_EXPORT/TABLE/TABLE processing

Processing object type TABLE_EXPORT/TABLE/SCHOLARSHIP/OWNER_GRANT/OBJECT_GRANT

Object type TABLE_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS treatment

. . exported "TOSANDATA." "' ACACT2ACT ' 45.03 lines 1313 KB

Table main "TOSANDATA." "" SYS_EXPORT_TABLE_01 "properly load/unloaded

******************************************************************************

Empty set of files for TOSANDATA. SYS_EXPORT_TABLE_01 is:

F:\TOSAN\DATADUMP\ACACT2ACTDMP. DMP

Work "TOSANDATA". "" SYS_EXPORT_TABLE_01 "conducted at 14:45:57

When I want to import the dump with the following command file:

impdp MYTESTUSER / 123456 tables= (acact2act) Directoryis dumpdir dumpfile is acact2actdmp.dmp

The table does not matter and the following log is generated

;;;

Import: Free 11.2.0.1.0 - Production on Mon Dec 16 14:54:05 2013

Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.

;;;

Connected to: Oracle Database 11 g Enterprise Edition Release 11.2.0.1.0 - 64 bit Production

With partitioning, OLAP, Data Mining and Real Application Testing options

Table main "MYTESTUSER." "' SYS_IMPORT_TABLE_01 ' properly load/unloaded

ORA-39166: Object MYTESTUSER. ACACT2ACT was not found.

Work "MYTESTUSER". "" SYS_IMPORT_TABLE_01 "carried out at 14:54:06

Work "MYTESTUSER". "" SYS_IMPORT_TABLE_01 "carried out at 14:54:06

But when I use the following commands:

exp tosandata/tosandata tables = (acact2act) file =F:\Tosan\DataDump\expdptool.dmp

imp MYTESTUSER / 123456 tables= (acact2act) file=F:\Tosan\DataDump\expdptool.dmp

export and import is done properly

Use the REMAP_SCHEMA clause instead of the parameter TABLES - explanation in the docs

Data pump import

Data pump import

HTH
Srini

Tags: Database

Similar Questions

  • Select any table except a few tables

    Database 11g:

    --------------------

    I would like to give a right to select user on all the tables, except in a few tables.  I thought to give "Select any table", but this does not also some paintings, should not access.

    2nd way is to go... one by one, select wise schema and grant privileges using script.  But it's a lot of time because we have the very large number of tables.

    Is there another way by which we can accomplish this easily.

    You must grant select to each table. Please do not choose any table - which is almost never appropriate.

    If it's so hard, just write a query like:

    Select "grant select on" | table_name | "from some_user '.

    from user_tables

    where table_name not in ('FOO', 'BAR', "Etc.")

    and reel the results to a file.

    If it is necessary, consider granting privileges to a role and then assign this role to a user - will make it easier to manage if you ever have to do the same for other users.

  • Audit to create any table

    SQL > select * from v version $;

    BANNER

    --------------------------------------------------------------------------------

    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production

    PL/SQL Release 11.2.0.1.0 - Production

    CORE 11.2.0.1.0 Production

    AMT for 32-bit Windows: Version 11.2.0.1.0 - Production

    NLSRTL Version 11.2.0.1.0 - Production

    SQL > select audit_option in the dba_stmt_audit_opts;

    no selected line

    SQL > see the parameter checking.

    VALUE OF TYPE NAME

    ------------------------------------ ----------- ------------------------------

    audit_file_dest string C:\APP\ADMINISTRATOR\ADMIN\ORC

    L\ADUMP

    audit_sys_operations boolean FALSE

    AUDIT_TRAIL DB string

    SQL > select count (*) in the dba_audit_trail;

    COUNT (*)

    ----------

    4132

    SQL > audit create any table Scott.

    Verification succeeded.

    SQL > select audit_option in the dba_stmt_audit_opts;

    AUDIT_OPTION

    ----------------------------------------

    CREATE A TABLE

    SQL > create table dummy (a number);

    Table created.

    SQL > insert into values dummy (1);

    1 line of creation.

    SQL > commit;

    Validation complete.

    SQL > select count (*) in the dba_audit_trail;

    COUNT (*)

    ----------

    4132

    SQL >

    So, my question is why I see no + 1 in dba_audit_trail while the user scott has been audit to create any table that is before activation of the audit and creating the table there are 4132 lines in dba_audit_trail and they are same even after activation of the audit and create the table. Kindly help me to understand.

    Thank you.

    It seems the user scott created table in its own schema, you must check create table as well.

    Thank you

    Bigot

  • eul5 - any table lists the folders used by each query

    Hello world

    Hope all is well,

    We use the discoverer to the Sungard banner (universities) data report
    We report out of an ODS, not directly on the production system.

    We are moving from 3.1 to 8 ODS ODS.

    I learned here recently EUL5_DOCUMENTS to empty a list of the existing queries.
    There is a table that lists folders for each query, which uses the query?

    Recently I learned here that when you create an OUTER join in the Admin, there is a desc. field
    to describe the join. We do this now, but we have previous joins that are not documented in this way.

    If I could create a query with all the tables that uses a query, I could use this query as a kind of checklist
    as we create the joins in 8 ODS.

    Please advise with your thoughts and ideas, tx, sandra

    Hi Sandra,.

    I am not aware of any table schema layer end user which includes the worksheet, the file and the items in folder used, but the EUL V5 business district it has a folder called "EUL5 user requests ', which has it all. This file uses the EUL5_GET_OBJECT_NAME function (as opposed to that seen in other tables) to get all the folder and the folder item information.

    You probably want to consider the installation of the business district of EUL V5 (if you do not already). Guidelines are provided in chapter 19 of the Oracle Business Intelligence Discoverer Administration Guide. Just a few steps, and I think that would greatly help your project.

    Patrick

  • Access control table and select any table privs

    Can we restrict access to a table of other users that have select any table privs? I think of the CAE, but not familiar with it. Not sure VPD can ensure the owner have access fulll and others not. Any idea?

    -Denis

    >
    Can we restrict access to a table of other users that have select any table privs? I think of the CAE, but not familiar with it. Not sure VPD can ensure the owner have access fulll and others not. Any idea?
    >

    Yes it is possible with the SRM. Users with SELECT ANY TABLE would see no lines with the following method, which assumes that the owner of the table is HR:

    connect system/pwofsystem
    create or replace function only_owner (schema varchar2, tab varchar2) return varchar2 is
    begin
    return 'user=''HR'' ';
    end;
    /
    
    BEGIN
      dbms_rls.add_policy(object_schema => 'hr',
      object_name => 'departments',
      policy_name => 'hr_policy',
      function_schema =>'system',
      policy_function => 'only_owner'
    );
    END;
    /
    

    Only the DB HR user is now able to see the rows in the table.
    And sys, which has the privilege of POLICE TAX-FREE ACCESS.

    Kind regards
    Uwe

    http://uhesse.WordPress.com

  • Of FUNDING and dynamic SQL CREATE ANY TABLE

    Hi gurus,

    I have a dynamic SQL code in a procedure where a table to an existing table without data will be created.

    strSQL: = "create table ' | strTemp | ' in select * from '. strArc. "where 1 = 2"; "
    Execute immediate strSQL;


    without GRANT CREATE ANY TABLE to user, * "ORA-01031: insufficient privileges" * error executing. "."

    Is there a way to tackle this problem without providing a GRANT CREATE ANY TABLE privileged?


    Thank you very much
    Charles

    (1) why you are creating a table to run? Which seems to me very concerning. If you create a temporary table and you're accustomed to work how temporary tables in other databases, I would strongly suggest you look at how Oracle manages global temporary tables. If temporary storage is really necessary (99% of the time is not because of the consistent reading multi-version), you should be able to create global temporary tables a few during execution.

    (2) the owner of the procedure should just need the CREATE TABLE privilege granted directly to the user (not granted through a role), assuming that it is in stored procedure a standard DEFINER rights.

    Justin

  • GRANT CREATE ANY TABLE

    Hello
    in 10g,.
    If I have:
    GRANT CREATE ANY TABLE to user1;
    then:
    1 - user1 can create a table in any schema and remove any table in any schema?

    2-can we user1 create a table in any schema and drop any table from only its own schema?

    Thank you.

    just give a try if you have a test database.

  • Impossible to revoke 'select any table' system priv

    I created a new user and could revoke it select all table permissions. It seems that any new user oracle, I create a select it the permissions on the tables. I want only alow this new user to choose among 5 tables and not others. It seems that there is a global setting on the database to allow selection of any table. I can't change that, if this is the case, but I would like to create this limited user.

    How can I change the permissions on my new user oracle does not allow to select any table?

    Any help would be appreciated

    No, it is not possible. As the name suggested, the PUBLIC is everyone in society. You cannot exclude a person from the public.

  • How to count the amount of toys that every boy has (without creating any table)?

    For example, there are 3 boys (boy, a boy b, boy c) and 2 types of toys (A toy, toy B).

    Insert the following records:

    (boy a, A toy)

    (boy a toy B)

    (boy a toy B)

    (boy b, a toy)

    So I expect to get the following statistics:


    A toy
    Toy B
    Boy one12
    b Boy10
    c boy00

    Notice 1: The list of boys and the list of the toy_kind are determined, that is, I can generate the phrase sql in c#, using the two lists.

    Notice 2: I wish that all the columns appeared, even if a column is made up of 0. If a row of 0 as 'boy c' is displayed or not has no importance.

    How to do this WITHOUT creating tables? Use sql or a procedure are OK. I had to use the result in c# to add the table to Word.

    Thank you!

    These data are stored in a table already?

    You say "without creating table", but we don't know what that makes reference.

    You are looking for something like this?

    SQL > with boys like (select "boy a ' as a boy all the double union")
    2 Select 'b boy' union double all the
    3 select 'boy c' double
    4               )
    5, boys_toys as (select ' boy a "boy,"A toy"as any double union toy")
    6 select 'boy a', 'toy B' from dual union all
    7 if he would choose "a boy ', 'toy B' dual Union all"
    8 select 'boy b', 'A Toy' go two
    9                    )
    10-
    11 - the end of test data
    12-
    13. Select boys.boy
    14, sum (case when toy = 'toy A' then 1 else 0 end) as the toyA
    15, sum (case when toy = ' toy B' then 1 else 0 ") as toyB
    boys 16
    17 left outer join (boys_toys.boy = boys.boy) boys_toys
    Group 18 by boys.boy
    19 order by 1
    20.
    TOYA TOYB BOY
    ----- ---------- ----------
    boy's 1 2
    Boy b 1 0
    Boy c 0 0

    3 selected lines.

  • Impdp exclude tables error

    Hello

    I published impdp like this

    $impdp dumpfile = xxxxx.dmp = directory = xxxxxx = table exclude xxx.log logfile: "('scott.emp', 'tiger.dept') IN ' full = version of y = 10.2.0.3"

    get the error

    "exclude formed incorrectly.

    Thanks in advance

    g

    Better, you use a settings file, which is especially more easy:

    http://docs.Oracle.com/CD/E11882_01/server.112/e22490/dp_import.htm#BEHECGCA

  • How to prevent a user not to access a table of perticular? This user has select any table privilege. Please help me solve this problem.

    Hello

    How to prevent a user not to access a table special (xxx)?

    This user has SELECT a TABLE ALL privilege. I need to restrict to only not for access xxx to the table, but this table is not existed in its own schema.

    But there is access able as select * from schema.table;

    How can I revoke this privilege.

    Please help me solve this problem.

    Thank you

    Lacombe

    1623609 wrote:

    How can I select privilege on specific tables at the same time?

    I want to create a new user and grants the right to select for tables, except a table (xxxx).

    It will be possible without the keystone of the database?

    One way, in several sql

    coil doit.sql

    Select ' grant select on ' | owner: '. ' || table_name |' to someuser. »

    from dba_tables

    where

    spool off

    Then sanity check "doit.sql" and execute it.

  • How to get a magic number for any table that returns more than 32 k?

    I'm in a unique situation where in I try to extract the values of the multiple tables and to publish as XML output. The problem is based on the condition of a few tables can retrieve more than 32 KB and less than 32 KB of data. Less than 32KB is not a problem, as the generation of XML is smooth. The minute he reached more than 32 k, it generates a runtime error. I was wondering if there is a way to make sure that the minute results of the query is greater than 32 KB, it must break say - if results is 35KO, so should I break this result 32 KB and 3 KB. Once then pass these data to appear as XML output. Again, it is not just for a table, but all the tables which are called in the function.

    Is it possible? I'm unable to get ideas, or did I do something so complex from the point of view of production support. If you'd be grateful if someone can guide me on this.

    The way it is, is the following:
    I have a table named ctn_pub_cntl


    CREATE TABLE CTNAPP.ctn_pub_cntl 
    (ctn_pub_cntl_id          NUMBER(18)
    ,table_name                  VARCHAR2(50)
    ,last_pub_tms              DATE
    ,queue_name               VARCHAR2(50)
    ,dest_system              VARCHAR2(50)
    ,frequency                  NUMBER(6)
    ,status                      VARCHAR2(8)
    ,record_create_tms          DATE
    ,create_user_id                VARCHAR2(8)
    ,record_update_tms          DATE
    ,update_user_id             VARCHAR2(8)
    ,CONSTRAINT ctn_pub_cntl_id_pk PRIMARY KEY(ctn_pub_cntl_id)
    );
    
    

    To do this, the data are:


    INSERT INTO CTNAPP.ctn_pub_cntl
    (ctn_pub_cntl_id    
     ,table_name         
     ,last_pub_tms  
    ,queue_name  
     ,dest_system        
     ,frequency          
    )
    VALUES
    (CTNAPP_SQNC.nextval
    ,'TRKFCG_SBDVSN'
    ,TO_DATE('10/2/2004 10:17:44PM','MM/DD/YYYY HH12:MI:SSPM')
    ,'UT.TSD.TSZ601.UNP'
    ,'SAP'
    ,15
    );
    
    INSERT INTO CTNAPP.ctn_pub_cntl
    (ctn_pub_cntl_id    
     ,table_name         
     ,last_pub_tms  
     ,queue_name  
     ,dest_system        
     ,frequency          
    )
    VALUES
    (CTNAPP_SQNC.nextval
    ,'TRKFCG_TRACK_SGMNT_DN'
    ,TO_DATE('02/06/2015 9:50:00AM','MM/DD/YYYY HH12:MI:SSPM')
    ,'UT.TSD.WRKORD.UNP'
    ,'SAP'
    ,30
    );
    
    INSERT INTO CTNAPP.ctn_pub_cntl
    (ctn_pub_cntl_id    
     ,table_name         
     ,last_pub_tms  
    ,queue_name  
     ,dest_system        
     ,frequency          
    )
    VALUES
    (CTNAPP_SQNC.nextval
    ,'TRKFCG_FXPLA_TRACK_LCTN_DN'
    ,TO_DATE('10/2/2004 10:17:44PM','MM/DD/YYYY HH12:MI:SSPM')
    ,'UT.TSD.YRDPLN.INPUT'
    ,'SAP'
    ,30
    ); 
    
    INSERT INTO CTNAPP.ctn_pub_cntl
    (ctn_pub_cntl_id    
     ,table_name         
     ,last_pub_tms  
    ,queue_name  
     ,dest_system        
     ,frequency          
    )
    VALUES
    (CTNAPP_SQNC.nextval
    ,'TRKFCG_FXPLA_TRACK_LCTN2_DN'
    ,TO_DATE('02/06/2015 9:50:00AM','MM/DD/YYYY HH12:MI:SSPM')
    ,'UT.TSD.TSZ601.UNP'
    ,'SAP'
    ,120
    );
    
    INSERT INTO CTNAPP.ctn_pub_cntl
    (ctn_pub_cntl_id    
     ,table_name         
     ,last_pub_tms 
    ,queue_name  
     ,dest_system        
     ,frequency          
    )
    VALUES
    (CTNAPP_SQNC.nextval
    ,'TRKFCG_FXPLA_TRACK_LCTN2_DN'
    ,TO_DATE('04/23/2015 11:50:00PM','MM/DD/YYYY HH12:MI:SSPM')
    ,'UT.TSD.YRDPLN.INPUT'
    ,'SAP'
    ,10
    );
    
    INSERT INTO CTNAPP.ctn_pub_cntl
    (ctn_pub_cntl_id    
     ,table_name         
     ,last_pub_tms 
    ,queue_name  
     ,dest_system        
     ,frequency          
    )
    VALUES
    (CTNAPP_SQNC.nextval
    ,'TRKFCG_FIXED_PLANT_ASSET'
    ,TO_DATE('04/23/2015 11:50:00AM','MM/DD/YYYY HH12:MI:SSPM')
    ,'UT.TSD.WRKORD.UNP'
    ,'SAP'
    ,10
    );
    
    INSERT INTO CTNAPP.ctn_pub_cntl
    (ctn_pub_cntl_id    
     ,table_name         
     ,last_pub_tms 
    ,queue_name  
     ,dest_system        
     ,frequency          
    )
    VALUES
    (CTNAPP_SQNC.nextval
    ,'TRKFCG_OPRLMT'
    ,TO_DATE('03/26/2015 7:50:00AM','MM/DD/YYYY HH12:MI:SSPM')
    ,'UT.TSD.WRKORD.UNP'
    ,'SAP'
    ,30
    );
    
    INSERT INTO CTNAPP.ctn_pub_cntl
    (ctn_pub_cntl_id    
     ,table_name         
     ,last_pub_tms
    ,queue_name  
     ,dest_system        
     ,frequency          
    )
    VALUES
    (CTNAPP_SQNC.nextval
    ,'TRKFCG_OPRLMT_SGMNT_DN'
    ,TO_DATE('03/28/2015 12:50:00AM','MM/DD/YYYY HH12:MI:SSPM')
    ,'UT.TSD.WRKORD.UNP'
    ,'SAP'
    ,30
    );
    
    /
    
    COMMIT;
    
    

    Once the above data are inserted and committed, then I created a feature in a package:


    CREATE OR REPLACE PACKAGE CTNAPP.CTN_PUB_CNTL_EXTRACT_PUBLISH
    IS
    
    TYPE tNameTyp IS TABLE OF ctn_pub_cntl.table_name%TYPE INDEX BY BINARY_INTEGER;
    g_tName tNameTyp;
    
    TYPE tClobTyp IS TABLE OF CLOB INDEX BY BINARY_INTEGER;
    g_tClob tClobTyp;
    
    
    FUNCTION GetCtnData(p_nInCtnPubCntlID IN CTN_PUB_CNTL.ctn_pub_cntl_id%TYPE,p_count OUT NUMBER ) RETURN tClobTyp;
    
    
    END CTNAPP.CTN_PUB_CNTL_EXTRACT_PUBLISH;
    
    
    --Package body
    
    CREATE OR REPLACE PACKAGE BODY CTNAPP.CTN_PUB_CNTL_EXTRACT_PUBLISH
    IS
    
         doc           xmldom.DOMDocument;
         main_node     xmldom.DOMNode;
         root_node     xmldom.DOMNode;
         root_elmt     xmldom.DOMElement;
         child_node    xmldom.DOMNode;
         child_elmt    xmldom.DOMElement;
         leaf_node     xmldom.DOMNode;
         elmt_value    xmldom.DOMText;
         tbl_node      xmldom.DOMNode;
         table_data    XMLDOM.DOMDOCUMENTFRAGMENT;
      
         l_ctx         DBMS_XMLGEN.CTXHANDLE;
         vStrSqlQuery  VARCHAR2(32767);
         l_clob        tClobTyp;
         --
         l_xmltype     XMLTYPE;
         --
    --Local Procedure to build XML header     
    PROCEDURE BuildCPRHeader IS
    
      BEGIN
        child_elmt := xmldom.createElement(doc, 'PUBLISH_HEADER');
        child_node  := xmldom.appendChild (root_node, xmldom.makeNode (child_elmt));
    
        child_elmt := xmldom.createElement (doc, 'SOURCE_APLCTN_ID');
        elmt_value := xmldom.createTextNode (doc, 'CTN');
        leaf_node  := xmldom.appendChild (child_node, xmldom.makeNode (child_elmt));
        leaf_node  := xmldom.appendChild (leaf_node, xmldom.makeNode (elmt_value));
        
        child_elmt := xmldom.createElement (doc, 'SOURCE_PRGRM_ID');
        elmt_value := xmldom.createTextNode (doc, 'VALUE');
        leaf_node  := xmldom.appendChild (child_node, xmldom.makeNode (child_elmt));
        leaf_node  := xmldom.appendChild (leaf_node, xmldom.makeNode (elmt_value));
    
        child_elmt := xmldom.createElement (doc, 'SOURCE_CMPNT_ID');
        elmt_value := xmldom.createTextNode (doc, 'VALUE');
        leaf_node  := xmldom.appendChild (child_node, xmldom.makeNode (child_elmt));
        leaf_node  := xmldom.appendChild (leaf_node, xmldom.makeNode (elmt_value));
    
        child_elmt := xmldom.createElement (doc, 'PUBLISH_TMS');
        elmt_value := xmldom.createTextNode (doc, TO_CHAR(SYSDATE, 'YYYY-MM-DD HH24:MI:SS'));
        leaf_node  := xmldom.appendChild (child_node, xmldom.makeNode (child_elmt));
        leaf_node  := xmldom.appendChild (leaf_node, xmldom.makeNode (elmt_value));
        
    END BuildCPRHeader;
    
    --Get table data based on table name
    FUNCTION GetCtnData(p_nInCtnPubCntlID IN CTN_PUB_CNTL.ctn_pub_cntl_id%TYPE,p_Count OUT NUMBER) RETURN tClobTyp IS
        
        vTblName      ctn_pub_cntl.table_name%TYPE;
        vLastPubTms   ctn_pub_cntl.last_pub_tms%TYPE;
         
    BEGIN
                g_vProcedureName:='GetCtnData';    
                g_vTableName:='CTN_PUB_CNTL';
                
            SELECT table_name,last_pub_tms
            INTO   vTblName, vLastPubTms
            FROM   CTN_PUB_CNTL
            WHERE  ctn_pub_cntl_id=p_nInCtnPubCntlID;
        
        -- Start the XML Message generation
            doc := xmldom.newDOMDocument;
            main_node := xmldom.makeNode(doc);
            root_elmt := xmldom.createElement(doc, 'PUBLISH');
            root_node := xmldom.appendChild(main_node, xmldom.makeNode(root_elmt));
            
          --Append Table Data as Publish Header
            BuildCPRHeader;
            
          --Append Table Data as Publish Body
          
           child_elmt := xmldom.createElement(doc, 'PUBLISH_BODY');
           leaf_node  := xmldom.appendChild (root_node, xmldom.makeNode(child_elmt)); 
           
           DBMS_SESSION.SET_NLS('NLS_DATE_FORMAT','''YYYY:MM:DD HH24:MI:SS''');
           
           vStrSqlQuery := 'SELECT * FROM ' || vTblName 
                          || ' WHERE record_update_tms <= TO_DATE(''' || TO_CHAR(vLastPubTms, 'MM/DD/YYYY HH24:MI:SS') || ''', ''MM/DD/YYYY HH24:MI:SS'') ' ;
                        --  ||  ' AND rownum < 16'
                          --;
          DBMS_OUTPUT.PUT_LINE(vStrSqlQuery);
           
           l_ctx  := DBMS_XMLGEN.NEWCONTEXT(vStrSqlQuery);
          DBMS_XMLGEN.SETNULLHANDLING(l_ctx, 0);
          DBMS_XMLGEN.SETROWSETTAG(l_ctx, vTblName); 
           
          -- Append Table Data as XML Fragment
          l_clob(1):=DBMS_XMLGEN.GETXML(l_ctx);  
          elmt_value := xmldom.createTextNode (doc, l_clob(1)); 
         leaf_node  := xmldom.appendChild (leaf_node, xmldom.makeNode (elmt_value)); 
         
         xmldom.writeToBuffer (doc, l_clob(1));
         l_clob(1):=REPLACE(l_clob(1),'&lt;?xml version=&quot;1.0&quot;?&gt;', NULL);
         l_clob(1):=REPLACE(l_clob(1),'&lt;', '<');
         l_clob(1):=REPLACE(l_clob(1),'&gt;', '>');
         
         RETURN l_clob;
         
         DBMS_OUTPUT.put_line('Answer is' ||l_clob(1));
         
         EXCEPTION
            
            WHEN NO_DATA_FOUND THEN
            
            DBMS_OUTPUT.put_line('There is no data with' || SQLERRM);
            g_vProcedureName:='GetCtnData';
            g_vTableName:='CTN_PUB_CNTL';
            g_vErrorMessage:=SQLERRM|| g_vErrorMessage;
            g_nSqlCd:=SQLCODE;
            ctn_log_error('ERROR',g_vErrorMessage,'SELECT',g_nSqlCd,p_nInCtnPubCntlID,g_vPackageName,g_vProcedureName,g_vTableName);
            
            
            WHEN OTHERS THEN
           
           DBMS_OUTPUT.PUT_LINE('ERROR : ' || SQLERRM);
           ctn_log_error('ERROR',g_vErrorMessage,'OTHERS',g_nSqlCd,p_nInCtnPubCntlID,g_vPackageName,g_vProcedureName,g_vTableName);
           
    END GetCtnData;
    
    
    PROCEDURE printClob (result IN OUT NOCOPY CLOB) IS
        xmlstr   VARCHAR2 (32767);
        line     VARCHAR2 (2000);
    BEGIN
        xmlstr := DBMS_LOB.SUBSTR (result, 32767);
    
        LOOP
           EXIT WHEN xmlstr IS NULL;
           line := SUBSTR (xmlstr, 1, INSTR (xmlstr, CHR (10)) - 1);
           DBMS_OUTPUT.put_line (line);
           xmlstr := SUBSTR (xmlstr, INSTR (xmlstr, CHR (10)) + 1);
        END LOOP;
    END printClob;
    
    END CTN_PUB_CNTL_EXTRACT_PUBLISH;
    
     
    

    If you notice my query:


    vStrSqlQuery := 'SELECT * FROM ' || vTblName 
                          || ' WHERE record_update_tms <= TO_DATE(''' || TO_CHAR(vLastPubTms, 'MM/DD/YYYY HH24:MI:SS') || ''', ''MM/DD/YYYY HH24:MI:SS'') ' ;
                         ||  ' AND rownum < 16'
                        ;
    

    The minute I comment

    ||  ' AND rownum < 16' ;


    It generates an error because this query returns about 600 lines and all these lines must be published in XML format and the tragedy, is that it is a C program between institutions i.e. C calls my functions of packged and then will do all the processing. This will return the results to the C program. Then obviously C does not recognize the CLOB and somewhere in the process, I convert to VARCHAR or CLOB CLOB, I have to use VARCHAR as a return type. That's my challenge.


    Someone who can help me find the number required of magic and also a brief knows how, I understand that. Thanks in advance.

    Not that I would use it myself but your package can be simplified down, like this:

    create or replace package ctn_pub_cntl_extract_publish is
    
      C_DTFORMAT  constant varchar2(30) := 'YYYY-MM-DD HH24:MI:SS';
    
      function getXMLData (p_table_name in varchar2, p_pub_tms in date) return xmltype;
      function getCTNData (p_id in number) return clob;
    
    end ctn_pub_cntl_extract_publish;
    /
    
    create or replace package body ctn_pub_cntl_extract_publish is
    
      function getXMLData (p_table_name in varchar2, p_pub_tms in date)
      return xmltype
      is
    
        v_query  varchar2(32767) :=
                 q'{select * from $$TABLE_NAME where record_update_tms <= to_date(:1, 'YYYYMMDDHH24MISS')}';
    
        ctx      dbms_xmlgen.ctxHandle;
        doc      xmltype;
    
      begin
    
        execute immediate 'alter session set nls_date_format = "'||C_DTFORMAT||'"';
        v_query := replace(v_query, '$$TABLE_NAME', dbms_assert.simple_sql_name(p_table_name)); 
    
        ctx := dbms_xmlgen.newContext(v_query);
        dbms_xmlgen.setBindValue(ctx, '1', to_char(p_pub_tms, 'YYYYMMDDHH24MISS'));
        dbms_xmlgen.setRowSetTag(ctx, p_table_name);
        dbms_xmlgen.setNullHandling(ctx, dbms_xmlgen.DROP_NULLS);
        doc := dbms_xmlgen.getXMLType(ctx);
        dbms_xmlgen.closeContext(ctx);
    
        return doc; 
    
      end;
    
      function getCTNData (p_id in number)
      return clob
      is
    
        doc  clob;
    
      begin
    
        select xmlserialize(document
                 xmlelement("PUBLISH"
                 , xmlelement("PUBLISH_HEADER"
                   , xmlforest(
                       'CNT' as "SOURCE_APLCTN_ID"
                     , 'VALUE' as "SOURCE_PRGRM_ID"
                     , 'VALUE' as "SOURCE_CMPNT_ID"
                     , to_char(sysdate, C_DTFORMAT) as "PUBLISH_TMS"
                     )
                   )
                 , xmlelement("PUBLISH_BODY"
                   , getXMLData(t.table_name, t.last_pub_tms)
                   )
                 )
               )
        into doc
        from ctn_pub_cntl t
        where t.ctn_pub_cntl_id = p_id;
    
        return doc;
    
      end;
    
    end ctn_pub_cntl_extract_publish;
    

    Function getXMLData() generates a canonical XML document out of the table that is passed as a parameter.

    Function built getCTNData() code XML "PUBLISH", the document using SQL/XML functions, the getXMLData() call in the process and returns the content serialized as a CLOB.

  • Try to generate PDF - "not found any table of content entries.

    Hello

    Please can someone help?

    I am trying to generate a PDF version of our Robohelp file (in Robohelp 10) for users to download (the file is a help file for our software).

    However, when I generate it using the option "Printed material" in the single Source layouts, either in PDF or Word doc, it only builds a two page document with the name of literature printed on the first page, and 'no table entries of content not found' printed on the second.

    The file was imported from an older version of Robohelp, if that helps.

    Thank you very much in advance for your help.

    Waiting for Dan

    Create a new print layout, not a duplicate. Run the wizard by default other than him affecting only to create a Word document on the first page and applying your model on the last page.

    Not better then?

    See www.grainge.org for creating tips and RoboHelp

    @petergrainge

  • possibility to import any particular table full dmp file

    Hello

    I use Oracle 10 G database.
    I have a dmp file.
    I need to import only a particularly since this dmp file.
    Y at - it any possibility to import a particular table of the whole bucket.

    Thank you and best regards,
    Eliane.

    Eliane says:
    Hello

    I use Oracle 10 G database.
    I have a dmp file.
    I need to import only a particularly since this dmp file.
    Y at - it any possibility to import a particular table of the whole bucket.

    Thank you and best regards,
    Eliane.

    You can specify as an example below

    impdp hr TABLES=employees, xxx, xxx
    

    See you soon

  • Importing data with impdp table with 3 new columns

    Hello

    Is it possible to import data with impdp in tables with 3 new columns?

    Kind regards

    William

    To do this, I use this method:

    Add the three columns in the source table and create the package:

    CREATE OR REPLACE PACKAGE DATAPUMP_TECH_COLS

    IS

    FUNCTION SET_DML_DATE (p1 in TIMESTAMP)

    BACK TO TIMESTAMP;

    FUNCTION SET_DML_TYPE (p2 in VARCHAR2)

    RETURN VARCHAR2;

    FUNCTION SET_DML_SCN (p3 in NUMBER)

    RETURN NUMBER;

    END DATAPUMP_TECH_COLS;

    /

    CREATE OR REPLACE PACKAGE BODY SYS. DATAPUMP_TECH_COLS

    IS

    FUNCTION SET_DML_DATE (p1 in TIMESTAMP)

    RETURNS THE TIMESTAMP

    IS

    BEGIN

    SYSDATE RETURN;

    END;

    FUNCTION SET_DML_TYPE (p2 in VARCHAR2)

    RETURN VARCHAR2

    IS

    BEGIN

    RETURN ' ';

    END;

    FUNCTION SET_DML_SCN (p3 in NUMBER)

    RETURN NUMBER

    IS

    BEGIN

    RETURN 0;

    END;

    END;

    /

    Export a table with remap_data

    expdp = TEMP_DIR PARALLEL = 8 TABLES directory is PIVOTMAT2. ACCTG_LINE LOGFILE = expdp_acctg.log = COMPRESSION STATISTICS ALL EXCLUDE =.

    DUMPFILE = ACCTG1.dmp, ACCTG2.dmp, ACCTG3.dmp, ACCTG4.dmp, ACCTG5.dmp, ACCTG6.dmp, ACCTG7.dmp, ACCTG8.dmp REUSE_DUMPFILES = YES.

    REMAP_DATA = PIVOTMAT2. ACCTG_LINE. DML_TYPE:SYS. DATAPUMP_TECH_COLS. SET_DML_TYPE.------

    REMAP_DATA = PIVOTMAT2. ACCTG_LINE. DML_DATE:SYS. DATAPUMP_TECH_COLS. SET_DML_DATE.------

    REMAP_DATA = PIVOTMAT2. ACCTG_LINE. DML_SCN:SYS. DATAPUMP_TECH_COLS. SET_DML_SCN

    Import table

    Impdp "" / as sysdba "" DIRECTORY = SRC_PIVOT TABLE_EXISTS_ACTION = TRONQUER REMAP_SCHEMA = PIVOTMAT2:STGPIV.

    DUMPFILE = ACCTG1.dmp, ACCTG2.dmp, ACCTG3.dmp, ACCTG4.dmp, ACCTG5.dmp, ACCTG6.dmp, ACCTG7.dmp, ACCTG8.dmp PARALLEL = 8

    to complete the removal of the collar if necessary.

Maybe you are looking for

  • Where my iBook is stored on the time machine

    Hello I recently had to install a new copy of OS X El Capitan on my iMac 27 "Office 2010 and I'm unable to locate the file extension which had more than 100 books.  Most of my books were conversions when I went to kindle for iPad and I lose nothing I

  • Cannot delete the bookmark shipped,

    Hello Idid years ago something to add dictionary.com to my Safari bookmarks bar, so that it became a part of it. Now I don't know how to remove it. It does not appear in my favorites or my favorites, or anywhere in my applications or elsewhere on my

  • reproduce the extraction method from page to page 5.0 09 image

    Hello (El Cap 10.11.3) In recent years, I supported pages 09 to my work as a storyboard artist. Now I would like to do some of my work on an ipad pro as well and this will require me to use the 5.0 instead Pages I need to used 5.0, even when working

  • Be a space between the word in wordpad

    I opened a word pad document and all the letteres have a space between them. How can I fix this. I tried the format, and it does nothing. I have Windows Vista Home premium. Original title: Windows Vista Home premium.

  • NetBook HP Mini series 4CZ048138J white screen

    I want to tanya.notebook HP Mini Series 4CZ048138J I serve, first of all I want to install new windows because the old windows broken, so the data in my document I do not secure order to format (before I install new windows), but after I finished I m