Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Supports to DBMS_DATAPUMP #167

Open
jeterson opened this issue Jul 26, 2023 · 0 comments
Open

Supports to DBMS_DATAPUMP #167

jeterson opened this issue Jul 26, 2023 · 0 comments

Comments

@jeterson
Copy link

I want to use import dump using DBMS_DATAPUMP but it looks like doesn't support for this.

Error in container when try execute docker-entrypoint-initdb.d

ERROR at line 2:

ORA-06550: line 2, column 3:

PLS-00221: 'OPEN' is not a procedure or is undefined

ORA-06550: line 2, column 3:

PL/SQL: Statement ignored

ORA-06550: line 4, column 3:

PLS-00307: too many declarations of 'METADATA_FILTER' match this call

ORA-06550: line 4, column 3:

PL/SQL: Statement ignored

ORA-06550: line 5, column 3:

PLS-00307: too many declarations of 'SET_PARAMETER' match this call

ORA-06550: line 5, column 3:

PL/SQL: Statement ignored

ORA-06550: line 6, column 3:

PLS-00307: too many declarations of 'SET_PARAMETER' match this call

ORA-06550: line 6, column 3:

PL/SQL: Statement ignored

ORA-06550: line 8, column 60:

PLS-00363: expression 'COMPLETED' cannot be used as an assignment target

ORA-06550: line 8, column 3:

PL/SQL: Statement ignored

ORA-06550: line 9, column 17:

PLS-00302: component 'CLOSE' must be declared

ORA-06550: line 9, column 3:

PL/SQL: Statement ignored

And Here is the code for datapump

-- Comandos SQL de inicialização do banco de dados (se necessário)

-- Importar o dump usando o impdp
CREATE OR REPLACE DIRECTORY DATA_PUMP_DIR AS '/import';

-- Executar o impdp
BEGIN
  DBMS_DATAPUMP.OPEN (operation => 'IMPORT', job_mode => 'FULL', job_name => 'data_import_job', version => 'COMPATIBLE');
  DBMS_DATAPUMP.ADD_FILE (handle => 'data_import_file', filename => 'data.dmp', directory => 'DATA_PUMP_DIR', filetype => DBMS_DATAPUMP.KU$_FILE_TYPE_DUMP_FILE);
  DBMS_DATAPUMP.METADATA_FILTER (handle => 'data_import_filter', name => 'SCHEMA_EXPR', value => 'IN (''DEVELOPMENT'')');
  DBMS_DATAPUMP.SET_PARAMETER (handle => 'data_import_job', name => 'INCLUDE_METADATA', value => 1);
  DBMS_DATAPUMP.SET_PARAMETER (handle => 'data_import_job', name => 'DATA_ACCESS_METHOD', value => 'AUTOMATIC');
  DBMS_DATAPUMP.START_JOB (handle => 'data_import_job', skip_current => 0, abort_step => 0);
  DBMS_DATAPUMP.WAIT_FOR_JOB (handle => 'data_import_job', job_state => 'COMPLETED');
  DBMS_DATAPUMP.CLOSE (handle => 'data_import_job');
END;
/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant