{"id":154,"date":"2008-10-03T22:37:00","date_gmt":"2008-10-03T20:37:00","guid":{"rendered":"http:\/\/antynet.pl\/index.php\/2008\/10\/03\/oracle-dpump\/"},"modified":"2010-08-24T22:44:30","modified_gmt":"2010-08-24T20:44:30","slug":"oracle-dpump","status":"publish","type":"post","link":"https:\/\/www.antynet.pl\/index.php\/2008\/10\/03\/oracle-dpump\/","title":{"rendered":"ORACLE DPUMP"},"content":{"rendered":"<div class=\"content-item\">\n<div id=\"g_body\">\n<h4 style=\"font-family: arial,sans-serif;\"><\/h4>\n<p><span style=\"font-weight: bold;\">crate oracle directory by dba:<\/span><br \/>CREATE OR REPLACE DIRECTORY [oracle_dir] as '[path_to_directory_on_disk]&#8217;;<br \/><span style=\"font-weight: bold;\">remove oracle directory:<\/span><br \/>DROP DIRECTORY [oracle_dir];<br \/><span style=\"font-weight: bold;\">check oracle directory:<\/span><br \/>SELECT directory_name, directory_path FROM dba_directories;<br \/><span style=\"font-weight: bold;\">grant privileges to user:<\/span><br \/>GRANT READ, WRITE ON DIRECTORY [katalog oracle] TO [user];<br \/><span style=\"font-weight: bold;\">expdp:<\/span><br \/>EXPDP [user]\/[pass] SCHEMAS=[schema] LOGFILE=[logfile] DIRECTORY=[oracle dir] DUMPFILE=[dumpfile] PARALLEL=[parallel write to many files &#8211; use witch option %U as sufix in file name]<br \/><span style=\"font-weight: bold;\">impdp:<\/span><br \/>IMPDP [user]\/[pass] DUMPFILE=[plik dumpa] PARFILE=imp.par<\/p>\n<p><span style=\"font-weight: bold;\">[imp.par]<\/span><br \/>REMAP_SCHEMA=[old_user]:[new_user>]<br \/>REMAP_TABLESPACE=[old_ts]:[new_ts]<br \/>REMAP_TABLESPACE=[old_ts]:[new_ts]<br \/>DIRECTORY=[oracle directory]<br \/>LOGFILE=[logfile]<br \/>PARALLEL=[a number of processes]<br \/>STATUS=[time in sek]<br \/>JOB_NAME=[job name]<\/p>\n<p><span style=\"font-weight: bold;\">other:<\/span><br \/>DUMPFILE=dpump_dir1:plik1.dpump, dpump_dir2:plik2.dmp<br \/>FILESIZE=2G<\/div>\n<\/div>\n<p><span style=\"font-weight: bold;\">chack current state of dump process:<br \/><\/span>SELECT job_name,state FROM v$datapump_job;<br \/>SELECT * FROM v$datapump_session;<span style=\"font-weight: bold;\"><\/p>\n<p>estimate dump size:<br \/><\/span>EXPDP [user]\/[pass] FULL=y ESTIMATE_ONLY=y DIRECTORY=[katalog] logfile=[logfile]<span style=\"font-weight: bold;\"><br \/>!warning<br \/><\/span>during estimation, dump size will be lower than original db size, because&nbsp; for indexes&nbsp; during dump only their definition is written, and finally indexes are rebuid, you must notice that index is based on ROWID which changing during dump<\/p>\n<p><span style=\"font-weight: bold;\">dump table:<br \/><\/span>IMPDP [user]\/[pass] TABLES=[tabela] REMAP_SCHEMA=[src_schema]:[dst_schema] DIRECTORY=[directory] PARALLEL=[nr] DUMPFILE=[dumpfile]<span style=\"font-weight: bold;\"><\/p>\n<p>dpump by NETWORK_LINK:<br \/><\/span>&#8211; on source db:<br \/>CREATE DATABASE LINK [link_name] CONNECT TO [src_user] IDENTIFIED BY [src_password] USING [src_tnsname]<br \/>&#8211; choose mode IMPDP or EXPDP (the difference is that IMPDP connect with source db, get data and write them directly to destination db, to specified schema, in the other side EXPDP write data only to file)<\/p>\n<p>IMPDP [dst_user]\/[dst_password] NETWORK_LINK = [link_name] DIRECTORY = [dir_name] SCHEMAS = [schema_name] LOGFILE = [logfile_name]<span style=\"font-weight: bold;\"><span style=\"font-weight: bold;\"><br \/><\/span><\/span><br \/>EXPDP [dst_user]\/[dst_password] NETWORK_LINK = [link_name] DIRECTORY = [dir_name] SCHEMAS = [schema_name] LOGFILE = [logfile_name] DUMPFILE = [file_name]<br \/>&nbsp;<span style=\"font-weight: bold;\"><span style=\"font-weight: bold;\"><br \/><\/span><\/span><span style=\"font-weight: bold;\"><span style=\"font-weight: bold;\">connect to console<\/span>:<br \/><\/span>EXPDP|IMPDP user\/pass ATTACH=[nazwa_joba]<br \/>ctrl C #go to console mode from log mode<\/p>\n<p><span style=\"font-weight: bold;\">console commands:<br \/><\/span>exit_client #go from console mode to system<br \/>continue_client #go from console mode to log mode<br \/>help<br \/>add_file=plik1,plik2 #add files<br \/>kill_job #stop job end exit<br \/>pararell=[nr] #change numbers of process<br \/>start_job #start job which was stoped<br \/>status<br \/>stop_job[=IMMEDIATE] &#8211; stop job for a while<\/p>\n<p><span style=\"font-weight: bold;\"><br \/><\/span><\/p>\n<address style=\"border: medium none; font-family: Courier New; font-size: 10pt; letter-spacing: -0.5pt; line-height: 150%; margin: 6pt -0.5in 6pt 0in; padding: 0in;\"><span style=\"font-style: normal;\"><\/p>\n<p><\/span><\/address>\n","protected":false},"excerpt":{"rendered":"<p>crate oracle directory by dba:CREATE OR REPLACE DIRECTORY [oracle_dir] as '[path_to_directory_on_disk]&#8217;;remove oracle directory:DROP DIRECTORY [oracle_dir];check oracle directory:SELECT directory_name, directory_path FROM dba_directories;grant privileges to user:GRANT READ, WRITE ON DIRECTORY [katalog oracle] TO [user];expdp:EXPDP [user]\/[pass] SCHEMAS=[schema] LOGFILE=[logfile] DIRECTORY=[oracle dir] DUMPFILE=[dumpfile] PARALLEL=[parallel write to many files &#8211; use witch option %U as sufix in file name]impdp:IMPDP [user]\/[pass] DUMPFILE=[plik [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_et_pb_use_builder":"","_et_pb_old_content":"","_et_gb_content_width":"","footnotes":""},"categories":[80],"tags":[72],"class_list":["post-154","post","type-post","status-publish","format-standard","hentry","category-oracle","tag-oracle-dpump"],"_links":{"self":[{"href":"https:\/\/www.antynet.pl\/index.php\/wp-json\/wp\/v2\/posts\/154","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.antynet.pl\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.antynet.pl\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.antynet.pl\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.antynet.pl\/index.php\/wp-json\/wp\/v2\/comments?post=154"}],"version-history":[{"count":1,"href":"https:\/\/www.antynet.pl\/index.php\/wp-json\/wp\/v2\/posts\/154\/revisions"}],"predecessor-version":[{"id":210,"href":"https:\/\/www.antynet.pl\/index.php\/wp-json\/wp\/v2\/posts\/154\/revisions\/210"}],"wp:attachment":[{"href":"https:\/\/www.antynet.pl\/index.php\/wp-json\/wp\/v2\/media?parent=154"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.antynet.pl\/index.php\/wp-json\/wp\/v2\/categories?post=154"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.antynet.pl\/index.php\/wp-json\/wp\/v2\/tags?post=154"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}