Thanks for the question, Krzysztof.
Asked: December 02, 2020 - 11:32 am UTC
Last updated: December 09, 2020 - 7:05 am UTC
Version: oracle 12.2
Viewed 1000+ times
You Asked
hello,
I try duplicate databaes and i have a issue:
I use targret and auxiliary conenctions:
rman target / auxiliary sys/$DSTPWD@$DSTDB
connected to target database: prod (DBID=1119311471)
connected to auxiliary database: test(not mounted)
RMAN> run
{
allocate channel ch1 type disk;
allocate auxiliary channel aux1 type disk;
SET UNTIL TIME "TO_DATE('2020-12-01 10:00:00', 'YYYY-MM-DD HH24:MI:SS')";
DUPLICATE TARGET DATABASE TO "test";
}2> 3> 4> 5> 6> 7>
allocated channel: ch1
channel ch1: SID=630 device type=DISK
allocated channel: aux1
channel aux1: SID=316 device type=DISK
executing command: SET until clause
Starting Duplicate Db at 2020-12-02 12:17:40
released channel: ch1
released channel: aux1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 12/02/2020 12:17:40
RMAN-05501: aborting duplication of target database
ORA-00907: brak prawego nawiasu
I tried:
SET UNTIL TIME "TO_DATE('01/12/2020 10:00', 'dd/mm/yyyy hh24:mi')";
but is the same.
And I tried in run section set NLS_DATA_FORMAT:
sql 'alter session set NLS_DATE_FORMAT="YYYY-MM-DD HH24:MI:SS"';
but is the same problem.
What I do wrong?
If I use run statement without set until time is ok.
But If I used "set until time ... I have ora-00907.
I can't duplicate datebase to point of time with until time parmeter ...
thanks
Krzysztof
and Connor said...
RMAN has been known to have some troubles with language, so try this to change the session parameters directly in the RMAN command
run {
sql 'alter session set NLS_DATE_FORMAT="DD-MM-YYYY HH24:MI:SS"';
sql 'alter session set NLS_DATE_LANGUAGE = "AMERICAN"';
SET UNTIL TIME '12-05-2014 08:00:00';
..
..
}
Is this answer out of date? If it is, please let us know via a Comment