flash recovery area is not enabled

Masasomi
Masasomi used Ask the Experts™
on
Have reviewed similar messages under  ID: 23391432. Have followed all steps in the Oracle user guide but still get message flash recovery area is not available.
Using Oracle XE 10 and Centos 5.3.
Cannot back up the database and the
Using username "root".
root@192.168.100.98's password:
Last login: Tue Oct 20 17:03:49 2009
[root@africaretail ~]# $ORACLE_HOME
-bash: /usr/lib/oracle/xe/app/oracle/product/10.2.0/server: is a directory
[root@africaretail ~]# sqlplus /nolog
 
SQL*Plus: Release 10.2.0.1.0 - Production on Wed Oct 21 18:04:32 2009
 
Copyright (c) 1982, 2005, Oracle.  All rights reserved.
 
SQL> CONNECT SYSxxxx AS SYSDBA;
Connected.
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup mount;
ORACLE instance started.
 
Total System Global Area  314572800 bytes
Fixed Size                  1258656 bytes
Variable Size             205523808 bytes
Database Buffers          104857600 bytes
Redo Buffers                2932736 bytes
Database mounted.
SQL> alter database archivelog;
 
Database altered.
 
SQL> select LOG_MODE FROM SYS.V$DATABASE;
 
LOG_MODE
------------
ARCHIVELOG
 
SQL>
SQL> alter system set db_recovery_file_dest_size=20G;
 
System altered.
 
SQL> alter system set db_recovery_file_dest='/usr/lib/oracle/xe/app/oracle/flash_recovery_area';
 
System altered.
 
SQL> @?/sqlplus/admin/movelogs;
 
SQL>exit
[root@africaretail ~]# $ORACLE_HOME/config/scripts/backup.sh
==================== ERROR =========================
             Backup of the database failed
==================== ERROR =========================
flash recovery area is not enabled.
Log file is at /root/oxe_backup_current.log.
Press ENTER key to exit
[root@africaretail ~]# 
SQL> CONNECT SYS/xxxx AS SYSDBA;
Connected.
SQL> @?/sqlplus/admin/movelogs;
SQL> SET FEEDBACK 1
SQL> SET NUMWIDTH 10
SQL> SET LINESIZE 80
SQL> SET TRIMSPOOL ON
SQL> SET TAB OFF
SQL> SET PAGESIZE 100
SQL> declare
  2     cursor rlc is
  3        select group# grp, thread# thr, bytes/1024 bytes_k
  4          from v$log
  5        order by 1;
  6     stmt     varchar2(2048);
  7     swtstmt  varchar2(1024) := 'alter system switch logfile';
  8     ckpstmt  varchar2(1024) := 'alter system checkpoint global';
  9  begin
 10     for rlcRec in rlc loop
 11    stmt := 'alter database add logfile thread ' ||
 12                 rlcRec.thr || ' size ' ||
 13                 rlcRec.bytes_k || 'K';
 14        execute immediate stmt;
 15        begin
 16           stmt := 'alter database drop logfile group ' || rlcRec.grp;
 17           execute immediate stmt;
 18        exception
 19           when others then
 20              execute immediate swtstmt;
 21              execute immediate ckpstmt;
 22              execute immediate stmt;
 23        end;
 24        execute immediate swtstmt;
 25     end loop;
 26  end;
 27  /
 
PL/SQL procedure successfully completed.
SQL> select * from V$RECOVERY_FILE_DEST;
 
NAME
--------------------------------------------------------------------------------
SPACE_LIMIT SPACE_USED SPACE_RECLAIMABLE NUMBER_OF_FILES
----------- ---------- ----------------- ---------------
/usr/lib/oracle/xe/app/oracle/flash_recovery_area
 2.1475E+10  178426368                 0               8
 
 
SQL> select * from V$FLASH_RECOVERY_AREA_USAGE;
 
FILE_TYPE    PERCENT_SPACE_USED PERCENT_SPACE_RECLAIMABLE NUMBER_OF_FILES
------------ ------------------ ------------------------- ---------------
CONTROLFILE                   0                         0               0
ONLINELOG                   .73                         0               3
ARCHIVELOG                   .1                         0               5
BACKUPPIECE                   0                         0               0
IMAGECOPY                     0                         0               0
FLASHBACKLOG                  0                         0               0
 
6 rows selected.
 
SQL>

Open in new window

Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Top Expert 2009

Commented:
Would have to see your backup.sh

You appear to have enabled it correctly, so I suspect the script itself is being fooled.
Top Expert 2009

Commented:
Try this to test manually:

rman target /
RMAN> backup database;

Author

Commented:
Having run the rman target command i now find i have insufficient privileges.  I was logged in as root.  I have added root to the dba group.  Still have insufficient privileges.  Do I need to log in as the dbowner or as the schema owner.

[root@africaretail ~]# rman target/

Recovery Manager: Release 10.2.0.1.0 - Production on Thu Oct 22 14:50:52 2009

Copyright (c) 1982, 2005, Oracle.  All rights reserved.

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00554: initialization of internal recovery manager package failed
RMAN-04005: error from target database:
ORA-01031: insufficient privileges
[root@africaretail ~]# RMAN>backup database;
-bash: RMAN: command not found
[root@africaretail ~]# egrep -i "^dba" /etc/group
dba:x:501:oracle,root
[root@africaretail ~]# usermod -a -G dba root
[root@africaretail ~]# rman target/

Recovery Manager: Release 10.2.0.1.0 - Production on Thu Oct 22 15:24:54 2009

Copyright (c) 1982, 2005, Oracle.  All rights reserved.

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00554: initialization of internal recovery manager package failed
RMAN-04005: error from target database:
ORA-01031: insufficient privileges
[root@africaretail ~]#
Top Expert 2009
Commented:
You should not run Oracle as root.

You must run from the oracle user. When you installed XE an "oracle" user was created. su to that user to run any Oracle or RMAN commands.

Top Expert 2009

Commented:
Also maybe read my article on XE on Linux, it has some tips for setting up the environment.

http://www.experts-exchange.com/articles/Database/Oracle/Quickstart-Oracle-Express-Edition-10g-Install-and-Configuration-on-Linux.html

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial