Hi,experts
When i solve Oracle DataGuard physical standby database about GAP's problem,due to most of archived logs have not existed in dynamic performance view 'v$archived_log' and also existed in OS,therefore i need to register these archived logs manually,such as 'alter database register logfile '/u01/oradata/archivelog/1_90384_850739945.dbf';' and registering archived logs one by one is so difficult that i decide to use an PL/SQL code to finish.
My PL/SQL code as follows,execute it on SQL*Plus and has some error,
SYS@standby> begin
2 for sequence in 90385 .. 90435
3 loop
4 execute immediate 'alter database register logfile '/u01/oradata/archivelog/1_' || sequence || '_850739945.dbf'';
5 end loop;
6 end;
7 /
execute immediate 'alter database register logfile '/u01/oradata/archivelog/1_' || sequence || '_850739945.dbf'';
*
ERROR at line 4:
ORA-06550: line 4, column 80:
PLS-00103: Encountered the symbol "_" when expecting one of the following:
* & = - + ; < / > at in is mod remainder not rem return
returning <an exponent (**)> <> or != or ~= >= <= <> and or
like like2 like4 likec between into using || bulk member
submultiset
Please give me some advices,thanks!
Best Regards
Quanwen Zhao