Posts

Showing posts with the label datapump

Export in Pl/Sql via DBMS_DATAPUMP

Image
CREATE OR REPLACE PACKAGE maintenance AS    PROCEDURE export_myschema;    PROCEDURE stop_job (job_name VARCHAR2, schema_name VARCHAR2);    PROCEDURE stop_all_jobs;    PROCEDURE import_schema (file_name VARCHAR2); END maintenance; /  CREATE OR REPLACE PACKAGE BODY maintenance AS    PROCEDURE export_myschema    AS       handle        NUMBER;       file_name     VARCHAR2 (200);       log_name      VARCHAR2 (200);       JOBNAME       VARCHAR2 (200);       file_prefix   VARCHAR2 (30);       dir_name      VARCHAR2 (4000);       l_fexists BOOLEAN;   ...

Data Pump, the unix command line

Image
Data Pump import as sysdba and several indexes, the unix way .... impdp "'sys/dba as sysdba'" schemas=SCOTT INCLUDE=INDEX:\"in \(\'PK_DEPT\',\'EMPIDX\'\)\" directory=TMP_DIR dumpfile=scott.dmp job_name=importing_scott.log

impdp appending data with query

Trying to retrieve lost records from a datapump backup directly to the production database using impdp syntax: impdp User/password directory=my_directory dumpfile=my_full_backup.dmp logfile=imp_lost_records.log QUERY=MY_TABLE:\"where code=1 and recid in \(2,5,8\) \" job_name=imp_lost_records INCLUDE=TABLE:\"=\'MY_TABLE\'\" CONTENT=DATA_ONLY TABLE_EXISTS_ACTION=APPEND

Importing just 1 view via impdp

Hi, Struggling the right syntax in Unix environment for importing a lost view, here is the proper way: impdp user/password@database directory=dir_dump dumpfile=dump.dmp logfile=imp_MY_VIEW.log INCLUDE=VIEW:\"= \'MY_VIEW\'\" job_name=imp_MY_VIEW

Datapump NOT RUNNING & master table

Monitoring  the progress of data pump jobs, we discovered some old jobs that is no longer relevant.   SQL > set lines 100 SQL > col OWNER_NAME for a10 SQL > col JOB_NAME  for a21 SQL > col  OPERATION for a10 SQL > col JOB_MODE for a10  SQL > SELECT   2       owner_name   3      ,job_name   4      ,operation   5      ,job_mode   6      ,state   7    FROM dba_datapump_jobs;   OWNER_NAME JOB_NAME              OPERATION  JOB_MODE   STATE ---------- --------------------- ---------- ---------- ----------- YOAV_B     SYS_EXPORT_FULL_01    EXPORT     FULL     ...