While running an AWS DMS task for migrating on-premise Oracle to AWS PostgreSQL RDS, some tables records are fully loaded into target database. From Table Statistics, it shows some tables validations are pending forever without progressing at all.
Check “Migration task logs”, it just says :
[TASK_MANAGER]I:All tables are loaded.waiting for validation to finish...
(replicationtask.c:1234)
RESOLUTION
Subscribe to get access
Read more of this content when you subscribe today.
SQL> exec dbms_scheduler.run_job(job_name=>'BATCH_JOB',
use_current_session=>false);
BEGIN dbms_scheduler.run_job(job_name=>'BATCH_JOB',
use_current_session=>false); END;
*
ERROR at line 1:
ORA-02800: Requests timed out
ORA-06512: at "SYS.DBMS_ISCHED", line 196
ORA-06512: at "SYS.DBMS_SCHEDULER", line 486
ORA-06512: at line 1
WORKAROUND
1)check parameter to make sure not zero.
SQL> show parameter job_queue_processes
NAME TYPE VALUE
-------------------------------- ------------ ------------------
job_queue_processes integer 100
-- Return value most recently obtained with nextval
select currval('serial') ;
-----
102
(1 row)
--Return value most recently obtained with nextval for any sequence
select lastval();
lastval
---------
102
(1 row)
-- Advance sequence and return new value
select nextval('serial') ;
-----
103
(1 row)
-- Set sequence's current value
select setval('serial', 1);
setval
--------
1
(1 row)
--setval
SELECT setval('serial', 42); Next nextval will return 43
SELECT setval('serial', 42, true); Same as above
SELECT setval('serial', 42, false); Next nextval will return 42
4) Sequence naming:
nextval('serial') operates on sequence serial
nextval('SERIAL') operates on sequence serial
nextval('"Serial"') operates on sequence Serial
5) Alter sequence:
ALTER SEQUENCE [ IF EXISTS ] name
[ AS data_type ]
[ INCREMENT [ BY ] increment ]
[ MINVALUE minvalue | NO MINVALUE ] [ MAXVALUE maxvalue | NO MAXVALUE ]
[ START [ WITH ] start ]
[ RESTART [ [ WITH ] restart ] ]
[ CACHE cache ] [ [ NO ] CYCLE ]
[ OWNED BY { table_name.column_name | NONE } ]
ALTER SEQUENCE [ IF EXISTS ] name OWNER TO { new_owner | CURRENT_USER
| SESSION_USER }
ALTER SEQUENCE [ IF EXISTS ] name RENAME TO new_name
ALTER SEQUENCE [ IF EXISTS ] name SET SCHEMA new_schema
6) Grant Privileges On Sequence:
GRANT { { USAGE | SELECT | UPDATE }
[, ...] | ALL [ PRIVILEGES ] }
ON { SEQUENCE sequence_name [, ...] | ALL SEQUENCES IN SCHEMA schema_name [, ...] }
TO role_specification [, ...] [ WITH GRANT OPTION ]
where role_specification can be:
[ GROUP ] role_name | PUBLIC | CURRENT_USER | SESSION_USER
7)Drop sequence:
DROP SEQUENCE [ IF EXISTS ] name [, ...] [ CASCADE | RESTRICT ]
DROP SEQUENCE serial;
The last sequence value written to disk. If caching is used, this value can be greater than the last value handed out from the sequence. Null if the sequence has not been read from yet. Also, if the current user does not have USAGE or SELECT privilege on the sequence, the value is null.
Connected to Oracle database through service name, then get errors by running the below sample code. There is no problem to run the sample code while connecting to database through IPC.
$sqlplus testuser/****@DBTEST
SQL>DECLARE
l_output utl_file.file_type;
BEGIN
l_output := utl_file.fopen( 'MY_DIR', 'test.txt', 'w' );
utl_file.fclose( l_output );
END;
/
*
ERROR at line 1:
ORA-29283: invalid file operation
ORA-06512: at "SYS.UTL_FILE", line 536
ORA-29283: invalid file operation
ORA-06512: at line 4
There are two ways to use Heterogeneous Services, one is via ODBC which does not require a licence, or you can use the licensed Gateways.
This article describes how to set up the Oracle configurations using ODBC , and then you can create database link between Oracle database and AWS PostgreSQL RDS.
Subscribe to get access
Read more of this content when you subscribe today.