Welcome Guest ( Log In | Register )


 
 
 
 
 
 

 
 
Oracle 

Performance Tuning Reference poster
 
Oracle training in Linux 

commands
 
Oracle training Weblogic Book
 
Easy Oracle Jumpstart
 
Oracle training & performance tuning books
 
Burleson Consulting Remote DB Administration
 
 
 
Reply to this topicStart new topic
> importing table along with sequence datapump package, i want to import tables & sequnce (table exists action replace) th
umair khan
post May 3 2017, 12:49 AM
Post #1


Newbie
*

Group: Members
Posts: 1
Joined: 3-May 17
Member No.: 51,952



hii

I am exporting tables along with the sequence by following code

declare
h1 number;
v_schema VARCHAR2(32);
v_job_state varchar2(4000);
v_time varchar2(32);
begin
SELECT to_char(SYSDATE, 'DD_MM_YYYY_hh24_mi_ss') INTO v_time FROM DUAL;
v_schema:='KNK';
h1 := dbms_datapump.open(operation => 'EXPORT', job_mode => 'SCHEMA');
DBMS_DATAPUMP.add_file (h1, v_schema||'_'||v_time||'.DMP','EXP',reusefile => 1);
DBMS_DATAPUMP.add_file (handle => h1,filename => v_schema||'_'||v_time||'.LOG',directory => 'EXP1',reusefile => 1,filetype => DBMS_DATAPUMP.KU$_FILE_TYPE_LOG_FILE);
dbms_datapump.metadata_filter(handle => h1,name => 'SCHEMA_EXPR',value => '= ''KNK''');
dbms_datapump.metadata_filter(handle => h1,name => 'NAME_EXPR',value => 'IN (''T_VISIT'',''T_SUBVISIT'',''T_SERVICES'')', object_type => 'TABLE');
dbms_datapump.metadata_filter(handle => h1,name => 'NAME_EXPR',value => 'IN (''PATIENT_INFO_SEQ'',''PATIENT_SERVICES_REG2_SEQ'')', object_type => 'SEQUENCE');
dbms_datapump.start_job(h1);
DBMS_DATAPUMP.WAIT_FOR_JOB(h1, v_job_state);
DBMS_OUTPUT.PUT_LINE(v_job_state);
end;
i want to import tables & sequnce (table exists action replace) the same exported file( tables & sequnces together). can anybody help?
Go to the top of the page
 
+Quote Post
burleson
post May 3 2017, 01:34 PM
Post #2


Advanced Member
***

Group: Members
Posts: 13,491
Joined: 26-January 04
Member No.: 13



Hi Umair, and welcome to the forum!

>> i want to import tables & sequnce (table exists action replace) the same exported file( tables & sequnces together)

Please see my notes here:

http://www.dba-oracle.com/t_advanced_dbms_datapump.htm




--------------------
Hope this helps. . .

Donald K. Burleson
Oracle Press author
Author of Oracle Tuning: The Definitive Reference
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Lo-Fi Version Time is now: 21st August 2017 - 01:34 AM