Sqlcl - Datapump Operations
Ola pessoal, nesse post vamos cobrir mais uma funcionalidade do Sqlcli, vamos realizar operações de export e import de objeto usando o Sqlcl.
1 - Preparação:
- Vamos criar o usuário TESTUSER
- Vamos criar uma tabela DEPT e realizar alguns inserts nela
- Vamos criar um directory para abrigar os arquivos exportados
- Vamos dar privilegio de leitura/escrita para o usuario TESTUSER no diretorio criado
C:\Users\pedro\Downloads\tmp>sql /nolog
conn sys/oracle@//192.168.56.22:1521/orclpdb as sysdba
SYS@orclpdb> create user testuser identified by testuser account unlock; User TESTUSER criado. SYS@orclpdb> grant create session to testuser; Grant bem-sucedido. SYS@orclpdb>
Criando a tabela DEPT no TESTUSER:
C:\Users\pedro\Downloads\tmp>sql /nolog
conn testuser/testuser@//192.168.56.22:1521/orclpdb
create table dept (
deptno number(2) constraint pk_dept primary key,
dname varchar2(14),
loc varchar2(13)
) ;
insert into dept values (10,'ACCOUNTING','NEW YORK');
insert into dept values (20,'RESEARCH','DALLAS');
insert into dept values (30,'SALES','CHICAGO');
insert into dept values (40,'OPERATIONS','BOSTON');
commit;C:\Users\pedro\Downloads\tmp>sql /nolog
SQLcl: Release 25.3 Production em dom. abr. 26 20:04:49 2026
Copyright (c) 1982, 2026, Oracle. Todos os direitos reservados.
SQL>
SQL> conn testuser/testuser@//192.168.56.22:1521/orclpdb
Conectado.
SQL>
SQL> create table dept (
2 deptno number(2) constraint pk_dept primary key,
3 dname varchar2(14),
4 loc varchar2(13)
5* ) ;
Table DEPT criado.
SQL>
SQL> insert into dept values (10,'ACCOUNTING','NEW YORK');
1 linha inserido.
SQL> insert into dept values (20,'RESEARCH','DALLAS');
1 linha inserido.
SQL> insert into dept values (30,'SALES','CHICAGO');
1 linha inserido.
SQL> insert into dept values (40,'OPERATIONS','BOSTON');
1 linha inserido.
SQL> commit;
Commit concluido.
SQL> select * from dept;
DEPTNO DNAME LOC
_________ _____________ ___________
10 ACCOUNTING NEW YORK
20 RESEARCH DALLAS
30 SALES CHICAGO
40 OPERATIONS BOSTON
SQL>
Criando diretório temp_dir referenciando o local no servidor do banco de dados, nesse exemplo vamos usar /u02/tmp :
[oracle@ol8-vm1 tmp]$ pwd /u02/tmp [oracle@ol8-vm1 tmp]$ ls -altr total 0 drwxrwxr-x. 4 oracle oinstall 32 Apr 26 18:38 .. drwxr-xr-x. 2 oracle oinstall 6 Apr 26 19:00 . [oracle@ol8-vm1 tmp]$
conn sys/oracle@//192.168.56.22:1521/orclpdb as sysdba create or replace directory tmp_dir as '/u02/tmp/';
SYS@//192.168.56.22:1521/orclpdb> create or replace directory tmp_dir as '/u02/tmp/'; Directory TMP_DIR criado.
Agora vamos dar permissão de leitura e escrita para o user TESTUSER no tmp_dir que acabamos de criar:
SYS@//192.168.56.22:1521/orclpdb> grant read, write on directory tmp_dir to testuser; Grant bem-sucedido. SYS@//192.168.56.22:1521/orclpdb>
2- Realizando o EXPORT
Agora que já configuramos o nosso usuário, a tabela que vamos exportar, o diretório de destino do dump/logs e os grants necessários, vamos nos conectar com o usuário TESTUSER e realizar o export:
Abaixo o comando do export :
datapump export
-schemas TESTUSER
-directory tmp_dir
-dumpfile testuser_dept_table.dmp
-logfile testuser_dept_table.log
Alternativamente podemos usar a versão dos comandos reduzida ou abreviada :
dp export
-s TESTUSER
-d tmp_dir
-f testuser_dept_table.dmp
-lf testuser_dept_table.logOutput do export:
C:\Users\pedro\Downloads\tmp>sql /nolog SQLcl: Release 25.3 Production em dom. abr. 26 20:19:27 2026 Copyright (c) 1982, 2026, Oracle. Todos os direitos reservados. SQL> conn testuser/testuser@//192.168.56.22:1521/orclpdb Conectado. SQL> datapump export -schemas TESTUSER -directory tmp_dir -dumpfile testuser_dept_table.dmp -logfile testuser_dept_table.log Iniciando DATA PUMP Fuso Horario do Banco de Dados: VERSION:35 CON_ID:0 Localizacao do Log: TMP_DIR:testuser_dept_table.log Iniciando "TESTUSER"."ESQL_162": Processando o tipo de objeto SCHEMA_EXPORT/TABLE/TABLE_DATA Processando o tipo de objeto SCHEMA_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS Processando o tipo de objeto SCHEMA_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS Processando o tipo de objeto SCHEMA_EXPORT/STATISTICS/MARKER Processando o tipo de objeto SCHEMA_EXPORT/USER Processando o tipo de objeto SCHEMA_EXPORT/SYSTEM_GRANT Processando o tipo de objeto SCHEMA_EXPORT/ROLE_GRANT Processando o tipo de objeto SCHEMA_EXPORT/DEFAULT_ROLE Processando o tipo de objeto SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA Processando o tipo de objeto SCHEMA_EXPORT/TABLE/TABLE Processando o tipo de objeto SCHEMA_EXPORT/TABLE/COMMENT Processando o tipo de objeto SCHEMA_EXPORT/TABLE/INDEX/INDEX Processando o tipo de objeto SCHEMA_EXPORT/TABLE/CONSTRAINT/CONSTRAINT . . exportou "TESTUSER"."DEPT" 6.031 KB 4 linhas Tabela-mestre "TESTUSER"."ESQL_162" carregada/descarregada com sucesso ****************************************************************************** Conjunto de arquivos de dump para TESTUSER.ESQL_162 ├®: /u02/tmp/testuser_dept_table.dmp O job "TESTUSER"."ESQL_162" foi concluido com sucesso em Dom Abr 26 19:20:43 2026 elapsed 0 00:00:51 Status da Operacao de DataPump 'COMPLETED' Jobname = ESQL_162 SQL>
A partir da versão 22.1, podemos incluir e excluir objetos, e usar listas de nomes para exportar objetos específicos.
No exemplo a seguir, usamos a opção -namelist para realizar uma exportação no nível da tabela.
datapump export
-schemas TESTUSER
-namelist TABLE=dept
-directory tmp_dir
-dumpfile testuser_dept_table1.dmp
-logfile testuser_dept_table1.log
SQL> datapump export -schemas TESTUSER -namelist TABLE=dept -directory tmp_dir -dumpfile testuser_dept_table1.dmp -logfile testuser_dept_table1.log Iniciando DATA PUMP Fuso Horario do Banco de Dados: VERSION:35 CON_ID:0 Localizacao do Log: TMP_DIR:testuser_dept_table1.log Iniciando "TESTUSER"."ESQL_202": Processando o tipo de objeto SCHEMA_EXPORT/TABLE/TABLE_DATA Processando o tipo de objeto SCHEMA_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS Processando o tipo de objeto SCHEMA_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS Processando o tipo de objeto SCHEMA_EXPORT/STATISTICS/MARKER Processando o tipo de objeto SCHEMA_EXPORT/USER Processando o tipo de objeto SCHEMA_EXPORT/SYSTEM_GRANT Processando o tipo de objeto SCHEMA_EXPORT/ROLE_GRANT Processando o tipo de objeto SCHEMA_EXPORT/DEFAULT_ROLE Processando o tipo de objeto SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA Processando o tipo de objeto SCHEMA_EXPORT/TABLE/TABLE Processando o tipo de objeto SCHEMA_EXPORT/TABLE/CONSTRAINT/CONSTRAINT . . exportou "TESTUSER"."DEPT" 6.031 KB 4 linhas Tabela-mestre "TESTUSER"."ESQL_202" carregada/descarregada com sucesso ****************************************************************************** Conjunto de arquivos de dump para TESTUSER.ESQL_202 ├®: /u02/tmp/testuser_dept_table1.dmp O job "TESTUSER"."ESQL_202" foi concluido com sucesso em Dom Abr 26 19:31:40 2026 elapsed 0 00:00:35 Status da Operacao de DataPump 'COMPLETED' Jobname = ESQL_202 SQL>
3 - Realizando o IMPORT
Agora vamos dropar a nossa tabela DEPT para realizar um import.
SQL> drop table dept purge;
SQL> drop table dept purge;
Table DEPT eliminado.
Agora vamos usar os mesmos argumentos do último export para realizar a importação:
datapump import
-schemas TESTUSER
-namelist TABLE=dept
-directory tmp_dir
-dumpfile testuser_dept_table1.dmp
-logfile testuser_dept_table1_imp.logC:\Users\pedro\Downloads\tmp>sql /nolog SQLcl: Release 25.3 Production em dom. abr. 26 20:39:39 2026 Copyright (c) 1982, 2026, Oracle. Todos os direitos reservados. SQL> conn testuser/testuser@//192.168.56.22:1521/orclpdb Conectado.
SQL> datapump import -schemas TESTUSER -namelist TABLE=dept -directory tmp_dir -dumpfile testuser_dept_table1.dmp -logfile testuser_dept_table1_imp.log Iniciando DATA PUMP Fuso Horario do Banco de Dados: VERSION:35 CON_ID:0 Localizacao do Log: TMP_DIR:testuser_dept_table1_imp.log Tabela-mestre "TESTUSER"."ISQL_322" carregada/descarregada com sucesso Iniciando "TESTUSER"."ISQL_322": Processando o tipo de objeto SCHEMA_EXPORT/USER ORA-31684: O tipo de objeto USER:"TESTUSER" ja existe Processando o tipo de objeto SCHEMA_EXPORT/SYSTEM_GRANT Processando o tipo de objeto SCHEMA_EXPORT/ROLE_GRANT Processando o tipo de objeto SCHEMA_EXPORT/DEFAULT_ROLE Processando o tipo de objeto SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA Processando o tipo de objeto SCHEMA_EXPORT/TABLE/TABLE Processando o tipo de objeto SCHEMA_EXPORT/TABLE/TABLE_DATA . . importou "TESTUSER"."DEPT" 6.031 KB 4 linhas Processando o tipo de objeto SCHEMA_EXPORT/TABLE/CONSTRAINT/CONSTRAINT Processando o tipo de objeto SCHEMA_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS Processando o tipo de objeto SCHEMA_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS Processando o tipo de objeto SCHEMA_EXPORT/STATISTICS/MARKER O job "TESTUSER"."ISQL_322" foi concluido com 1 erro(s) em Dom Abr 26 19:43:55 2026 elapsed 0 00:00:27 Status da Operacao de DataPump 'COMPLETED' Jobname = ISQL_322 SQL>
Agora vamos validar a nossa tabela importada:
SQL> select * from dept;
DEPTNO DNAME LOC
_________ _____________ ___________
10 ACCOUNTING NEW YORK
20 RESEARCH DALLAS
30 SALES CHICAGO
40 OPERATIONS BOSTON
SQL>
4- Usando a opção NOEXEC
Neste exemplo, repetimos o comando de exportação original, mas incluímos o argumento NOEXEC. Isso exibe o código PL/SQL que teria sido executado para este comando. São principalmente chamadas ao pacote DBMS_DATAPUMP.
datapump export
-schemas TESTEUSER
-directory tmp_dir
-dumpfile emp.dmp
-logfile emp.log
-noexec TRUESQL> datapump export -schemas TESTUSER -directory tmp_dir -dumpfile testuser_dept_table1.dmp -logfile testuser_dept_table2.log -noexec TRUE
DECLARE
errorlog varchar2(8000):='';
getStatusOutput boolean:=false;
backtrace varchar2(8000):='';
BEGIN
DECLARE
h1 number;
s varchar2(1000):=NULL;
errorvarchar varchar2(100):= 'ERROR';
tryGetStatus number := 0;
success_with_info EXCEPTION;
PRAGMA EXCEPTION_INIT(success_with_info, -31627);
jobname varchar2(500):='ESQL_402';
schema varchar2(8000):='';
job_status VARCHAR2(30):='Not set';
cloud_service varchar2(1000);
success_with_info_warning_text varchar2(1000):=':DPEXEC_SUCCESS_WITH_INFO:';
new_line varchar2(10):='
';
get_status varchar2(1000):='dbms_datapump.get_status(';
wait_for_job_status varchar2(1000):=':DPEXEC_DATAPUMP_OPERATION_STATUS:';
begin
success_with_info_warning_text:=success_with_info_warning_text||new_line;
BEGIN
h1 := dbms_datapump.open (operation => :OPERATION, job_mode => :JOB_MODE, job_name => jobname, version => :VERSION);
EXCEPTION when success_with_info THEN errorlog:=errorlog||success_with_info_warning_text;
END;
tryGetStatus := 1;
BEGIN
dbms_datapump.add_file(handle => h1, filename => :FILENAME_DMP1, directory => :DIRECTORY_DMP1, filesize => :FILESIZE1, filetype => 1, reusefile => 1);
EXCEPTION when success_with_info THEN errorlog:=errorlog||success_with_info_warning_text; END;
BEGIN
dbms_datapump.add_file(handle => h1, filename => :FILENAME_LOG, directory => :DIRECTORY_LOG, filetype => 3);
EXCEPTION when success_with_info THEN errorlog:=errorlog||success_with_info_warning_text; END;
BEGIN
dbms_datapump.metadata_filter(handle => h1, name => 'SCHEMA_EXPR', value => 'IN ('''||:SCHEMA1||''')');
EXCEPTION when success_with_info THEN errorlog:=errorlog||success_with_info_warning_text;
END;
BEGIN
dbms_datapump.set_parameter(handle => h1, name => 'KEEP_MASTER', value => 1);
EXCEPTION when success_with_info THEN errorlog:=errorlog||success_with_info_warning_text;
END;
BEGIN
dbms_datapump.start_job(handle => h1, skip_current => 0, abort_step => 0);
EXCEPTION when success_with_info THEN errorlog:=errorlog||success_with_info_warning_text;
END;
BEGIN
dbms_datapump.wait_for_job (handle => h1, job_state => job_status);
EXCEPTION when success_with_info THEN errorlog:=errorlog||success_with_info_warning_text; END;
errorlog:=errorlog||(wait_for_job_status||job_status||''''||new_line);
h1:=null;
BEGIN
IF (h1 IS NOT NULL)
THEN
dbms_datapump.detach(handle => h1);
END IF;
EXCEPTION when success_with_info THEN errorlog:=errorlog||success_with_info_warning_text; END;
errorvarchar := 'NO_ERROR';
:jobnameout:=jobname;
EXCEPTION
When Others then
backtrace:=backtrace||(SQLERRM)||new_line;
backtrace:=backtrace|| dbms_utility.format_error_backtrace || new_line;
IF ((S IS NOT NULL) AND (S!='COMPLETED')) THEN
errorlog:=errorlog||'WAIT_FOR_JOB JOB_STATE STATE='||s|| new_line;
END IF;
DECLARE
ind NUMBER;
percent_done NUMBER;
job_state VARCHAR2(30);
le ku$_LogEntry;
js ku$_JobStatus;
jd ku$_JobDesc;
sts ku$_Status;
BEGIN
if ((errorvarchar = 'ERROR')AND(tryGetStatus=1)) then
dbms_datapump.get_status(h1,
dbms_datapump.ku$_status_job_error +
dbms_datapump.ku$_status_job_status +
dbms_datapump.ku$_status_wip,-1,job_state,sts);
js := sts.job_status;
if (bitand(sts.mask,dbms_datapump.ku$_status_wip) != 0)
then
le := sts.wip;
else
if (bitand(sts.mask,dbms_datapump.ku$_status_job_error) != 0)
then
le := sts.error;
else
le := null;
end if;
end if;
if le is not null
then
ind := le.FIRST;
if ind is not null
then
errorlog:=errorlog||(get_status||h1||'...)')||new_line;
getStatusOutput:=true;
end if;
while ind is not null loop
errorlog:=errorlog||(le(ind).LogText)||new_line;
ind := le.NEXT(ind);
end loop;
end if;
END IF;
EXCEPTION
when others then null;
END;
BEGIN
IF ((errorvarchar = 'ERROR')AND(tryGetStatus=1)AND(h1 IS NOT NULL)) THEN
DBMS_DATAPUMP.DETACH(h1);
END IF;
EXCEPTION
WHEN OTHERS THEN
NULL;
END;
END;
IF (getStatusOutput=false)
THEN
errorlog:=errorlog||backtrace;
END IF;
:errorlogout:=errorlog;
END;
GEN DIRECTORY_DMP1: TMP_DIR
GEN DIRECTORY_LOG: TMP_DIR
GEN FILENAME_DMP1: testuser_dept_table1.dmp
GEN FILENAME_LOG: testuser_dept_table2.log
GEN FILESIZE1: 500MB
GEN JOB_MODE: SCHEMA
GEN OPERATION: EXPORT
GEN SCHEMA1: TESTUSER
GEN VERSION: COMPATIBLE
A execucao esta desativada pela operacao -noexec
SQL>
OBS: Por padrão o -NOEXEC é FALSE.
5- HELP
O comando DATAPUMP HELP exibe os detalhes completos de uso. Como mencionado anteriormente, esta versão suporta apenas um subconjunto da funcionalidade possível usando o pacote DBMS_DATAPUMP. Verifique sempre a versão do Sqlcl a qual está usando para se manter atualizado.
SQL> datapump help
DP | DATAPUMP
----------------
Usage: dp help [examples|syntax] |
export [,...] |
import [,...] |
:
File Arguments
--------------
-credential,-c Default: as specified on CLOUDSTORAGE command
CREDENTIAL for dump file access in ORACLE OBJECT STORE.
-directory,-d : Default: DATA_PUMP_DIR
Default database DIRECTORY for reading and writing dump and log files.
-dumpdirectory,-dd : Default: -directory if specified or DATA_PUMP_DIR
Database DIRECTORY for dump file.
-dumpfile,-f [,...] : Default .DMP
Dump file name(s) when using database DIRECTORY.
Multiple files can be specified whether parallelism is enabled or not.
The number of files specified should be at least as large as the degree of parallelism.
-dumpuri,-u [[,...] | [,...]] Default: object name is .DMP
: complete uri for the ORACLE OBJECT STORE file if a default is not set on CLOUDSTORAGE command
: name of the object, optionally qualified by the namespace and the bucket.
The qualified name concatenated to the uri specified on CLOUDSTORAGE command must fully identify the object uri.
Specify the option without a value when the full url is specified on CLOUDSTORAGE command.
CREDENTIAL must be set for direct read/write access to ORACLE OBJECT STORE from autonomous database.
For -copycloud between database DIRECTORY and ORACLE OBJECT STORE, OCI PROFILE must be set.
Multiple uris can be specified whether parallelism is enabled or not.
The number of files specified should be at least as large as the degree of parallelism.
-logdirectory,-ld Default: -directory if specified or DATA_PUMP_DIR
Database DIRECTORY for log file.
-logfile,-lf Default: .LOG
Log file name in the database DIRECTORY.
Command Arguments
-----------------
-noexec,-ne [TRUE|FALSE] Default: FALSE
TRUE : Validate and generate the PL/SQL, but do not execute it.
-verbose,-ve [TRUE|FALSE] Default: FALSE
TRUE : Show additional diagnostic output.
Common Arguments
----------------
-copycloud,-cc [TRUE|FALSE] Default: FALSE
[TRUE] : Copy the dumpfile between database directory and ORACLE OBJECT STORE
On EXPORT, copy the dumpfile from the database directory to ORACLE OBJECT STORE after the datapump job completes.
On IMPORT, copy the dumpfile from ORACLE OBJECT STORE to the database directory before the datapump job starts
OCI PROFILE must be set using OCI command or CLOUDSTORAGE command.
Cloud storage uri must be set using the CLOUDSTORAGE command, SET DATAPUMP command or DATAPUMP command.
-encryptionpassword,-enp Default: None
If password is not specified, a prompt for one will be given.
On export, encrypts the dump files using the password.
On import, the same password that was used for export must be provided.
-excludeexpr,-ex Default: None
Specify an expression identifying an object type or set of object types to exclude from the job.
Example: -excludeexpr "IN ('GRANT','INDEX','TRIGGER')"
-excludelist,-el [,...] Default: None
Specify a comma separated value list of object types to exclude from the job.
Example: -excludelist GRANT,INDEX,TRIGGER
-includeexpr,-ix Default: None
Specify an expression identifying an object type or set of object types to include in the job.
Only matching object types and their dependents will be included in the job.
Use -excludelist or -excludeexpr to exclude dependent objects.
Example: -includeexpr "IN ('TABLE','VIEW')"
-includelist,-il [,...] Default: None
Specify a comma separated value list of object types to include in the job.
Only matching object types and their dependents will be included in the job.
Use -excludelist or -excludeexpr to exclude dependent objects.
Example: -includelist TABLE,VIEW
-includemetadata,-im [TRUE|FALSE] Default: TRUE
TRUE : Include metadata in the job. Default: TRUE
-includerows,-ir [TRUE|FALSE] Default: TRUE
TRUE: Include data in the job. Default: TRUE
-jobname,-j Name for the datapump job. (default: ESQL_ | ISQL_) where n is a datapump generated number
Job Name is appended with a datapump generated number, unless it ends with a number.
Job Name is used when submitting the datapump job and as default name for dump and log filenames/objectnames.
-nameexpr,-nx {=}[;...] Default: None
For specified object type, provide an expression identifying a set of object names to include in the job.
Example: -nameexpr TABLE="IN ('EMPLOYEES', 'DEPARTMENTS')";PROCEDURE="IN ('ADD_JOB_HISTORY','SECURE_DML')"
-namelist,nl {=[,...]}[;...] Default: None
For specified object type, provide a comma separated value list of objects to include in the job.
Example: -namelist TABLE=employees,departments;PROCEDURE=add_job_history,secure_dml
-parallel,-p Default 1
Adjusts the degree of parallelism within a job allowing multiple processes simultaneously.
Specify the same number of files as the degree or some processes may remain idle.
-schemas,-s [,...] Default: On export, schema for the current connection.
Default: On import, full import.
The schema or comma separated value list of schemas to process.
Example: schema1,schema2.
-version,-v {|COMPATIBLE|LATEST} Default: COMPATIBLE
: A specific database version, for example, '11.0.0'.
When exporting from Oracle Database 11g release 2 (11.2.0.3) or later into an Oracle Database 12 c Release 1 (12.1):
Specify a value of 12 to allow all existing database features, components, and options to be exported.
This applies to either a multitenant container database (CDB) or a non-CDB.
COMPATIBLE : Uses metadata version from database compatibility level and the compatibility release level for feature.
LATEST : The version of the metadata corresponds to the database version.
-wait,-w [TRUE|FALSE] Default: TRUE
TRUE : Wait for the datapump job to finish and show summary results.
FALSE : Submit the datapump job without waiting and showing results.
Export Only Arguments
---------------------
-compression,-cm {ALL|DATA_ONLY|METADATA_ONLY|NONE} Default: METADATA_ONLY
Indicates if compression should be done on user data and metadata.
ALL : Compress user data and metadata.
DATA_ONLY : Compress only user data.
METADATA_ONLY : Compress only metadata.
NONE : Do not compress user data or metadata.
-encryption,-en {ALL | DATA_ONLY | ENCRYPTED_COLUMNS_ONLY | METADATA_ONLY | NONE}
Default: NONE, or ALL if any other encryption option is specified.
Specifying any encryption option will turn encryption on if you do not specify -encryption NONE.
-encryptionalgorithm,-ena {AES128 | AES192 | AES256} Default: AES128
Identifies the cryptographic algorithm to be used.
-encryptionmode,-enm {DUAL | PASSWORD | TRANSPARENT}
Default(if encryption is on): TRANSPARENT, or PASSWORD if -encryptionpassword is specified.
Identifies the types of security used for encryption and decryption.
PASSWORD encrypts the dumpfiles using the provided password.
TRANSPARENT allows encryption if the Oracle Encryption Wallet is available.
DUAL allows import using the Oracle Encryption Wallet or the password.
When using DUAL, -encryptionpassword must be specified.
-estimate,-e {BLOCKS|STATISTICS}
Specifies the estimate method for the size of the tables should be performed before starting the job.
BLOCKS : Estimate is calculated using the count of blocks allocated to the user tables.
STATISTICS : Estimate is calculated using the statistics for each table.
If no statistics are available for a table, BLOCKS is used.
-filesize,-fs {{B|KB|MB|GB|TB}} Default: 500MB
Limit for the size of files.
-flashbackscn,-fb [TRUE|FALSE] Default: FALSE
TRUE : Use consistent database content based on scn at start time of execution.
-reusefile,-r [TRUE|FALSE] Default: TRUE
TRUE : Replace existing dump file(s) with new file.
Import Only Arguments
---------------------
-columnencryption,-ce [TRUE|FALSE] Default: TRUE if supported by database
TRUE : Include column encryption clause on table metadata.
FALSE : Omit column encryption clause.
-objectid,-oid [TRUE|FALSE] Default: TRUE
TRUE : Assign the exported OID.
FALSE : Assign a new OID.
-remapschemas,-rs {=[,...]}
objects in the job will be moved to .
Example: oldschema1=newschema1,oldschema2=newschema2.
-remaptablespaces,-rt {=[,...]}
storage segment in the job will be relocated to .
Example: oldtablespace1=newtablespace1,oldtablespace2=newtablespace2
-segmentattributes,-sa [TRUE|FALSE] Default TRUE
TRUE : Include segment attributes clauses (physical attributes, storage attributes, tablespace, logging).
-skipunusableindexes,-sui [TRUE|FALSE] Default: TRUE
TRUE : Tables or partitions with an index in the UNUSABLE state are loaded, as if the unusable index did not exist.
FALSE : Tables or partitions with an index in the UNUSABLE state are not loaded.
-storage,-st [TRUE|FALSE] Default TRUE
TRUE : Include storage clauses.
-tableexists,-te {APPEND|REPLACE|SKIP|TRUNCATE} Default: SKIP when -includemetadata=true, otherwise APPEND
Action to be taken if table exists on import.
APPEND : New rows are added to the existing rows in the table.
REPLACE : Before creating the new table, the old table is dropped.
SKIP : The preexisting table is left unchanged.
TRUNCATE : Rows are removed from a preexisting table before inserting rows from the IMPORT.
-tablecompression,-tc [TRUE|FALSE] Default: TRUE
TRUE : The table compression clause will be included if supported.
FALSE : The table will have the default compression for the tablespace.
SQL> Conclusão:
- Como configurar o Sqlcl no Windows
- Como usar o datapump para exportar schemas e tabelas no sqlcl
- Como usar o datapump para importar schemas e tabelas no sqlcl
- Como usar o datapump no Sqlcl
- Como criar diretórios em um banco de dados Oracle
- Como dar permissão para um usuário
Material de Apoio:
Por hoje é isso pessoal, espero que esse conteúdo ajude de alguma forma e caso tenham alguma dúvida podem deixar aqui nos comentários ou me mandar via E-mail com Título da postagem, meu E-mail para envio de dúvidas e sugestões de novas postagens: pedrohvido@gmail.com.
excelente !
ResponderExcluir