Thursday, 24 July 2008

10g hangs because of Archiver is unable to archive a redo log because the output device

the most probable option is that there is no place for your archive logs.
If you use flash_recovery_area, increase the size there:
$ sqlplus /nolog

SQL> connect sys as sysdba;
Enter password:
Connected.
SQL> select * from v$recovery_file_dest;


if SPACE_USED is the same or close to SPACE_LIMIT it's definitely this reason (no place to store archive logs)

increase the size of flash_recovery area:

SQL> alter system set db_recovery_file_dest_size = 50g scope=BOTH;


this will set the size of the flash_recovery_area to 50g immediately, and after restart as well (setting the parameter to SPFILE)

If your database is not opened, try to shut it down first.
SQL> shutdown immediate

if that takes long time then
SQL> shutdown abort
SQL> startup nomount


do the stuff written above
SQL> alter database open;

Wednesday, 16 July 2008

sqlplus enabling arrow keys for command history

It is very annoying when you in sqlplus under Linux cannot use ARROW keys to choose between executed commands.
there is a workaround for that, it's name is rlwrap:
sudo apt-get install rlwrap

then you can execute:
rlwrap sqlplus /nolog
or create an alias on sqlplus to be executed as rlwrap sqlplus.

thanks,
chris