

Her midt på måneden, sad undertegnede ved dagens gennemgang af log filer og fik øje på ORA-1123 og ORA-1142. Vi havde i forbindelse med test af RMAN kloning af databaser leget lidt med en, og det var herefter disse fejl opstod.
Fri Aug 15 01:32:09 2008
ORA-1123 signalled during: alter tablespace TABLESPACE_NAVN begin backup...
Fri Aug 15 01:35:51 2008
alter tablespace TABLESPACE_NAVN end backup
WARNING: datafile #5 was not in online backup mode
ORA-1142 signalled during: alter tablespace TABLESPACE_NAVN end backup...
Søger man lidt på hvad disse 2 fejl betyder, finder man disse fejlbeskeder:
ORA-01142: cannot end online backup - none of the files are in backup
Cause: None of the files were found to be in the online backup when attempting to end the online backup.
ORA-01123: cannot start online backup; media recovery not enabled
Cause: An attempt to start backup of an online tablespace failed because archiving was not enabled.
Action: Enable archiving and retry the operation.
Så det lader til det har noget med archiving at gøre, og det skal man jo køre, når man som i ovenstående kører med online backup. Lad os se på det!
[workday:ORACLE_SID:/opt/oracle/admin/ORACLE_SID/bdump] sqlplus / as sysdba
SQL*Plus: Release 10.2.0.3.0 - Production on Tue Aug 19 08:29:06 2008
Copyright (c) 1982, 2006, Oracle. All Rights Reserved.
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bit Production
With the Partitioning, Oracle Label Security, OLAP and Data Mining Scoring Engine options
SQL> SELECT log_mode FROM gv$database;
LOG_MODE
------------
NOARCHIVELOG
Den er altså god nok, databasen kører ikke i Archive log mode, så det må vi hellere arrangere.
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup mount
ORACLE instance started.
Total System Global Area 671088640 bytes
Fixed Size 2769760 bytes
Variable Size 186924192 bytes
Database Buffers 478150656 bytes
Redo Buffers 3244032 bytes
Database mounted.
SQL> alter database archivelog;
Database altered.
SQL> alter database open;
Database altered.
SQL> SELECT log_mode FROM gv$database;
LOG_MODE
------------
ARCHIVELOG
Det var det, databasen kører nu i archivelog mode, og vores online backup kører igen.
PS: ovenstående kræver du har sat log_archive_dest og log_archive_format i din initORACLE_SID.ora.