Wednesday, June 29, 2011

Clear Transaction Logs

This is how to disable archiving: C:> sqlplus sys/@dbalias as sysdba SQL> shutdown immediate SQL> startup mount SQL> alter database noarchivelog; SQL> alter database open; SQL> archive log list SQL> alter system switch logfile; Run this about 10 times, delete all archived log files and then proceed. This is how to enable archiving: SQL> archive log list At this point the numbers should have incremented as many as the number of switches. SQL> shutdown immediate SQL> startup mount SQL> alter database archivelog; Database altered. SQL> alter database open; SQL> archive log list SQL> alter system switch logfile; Run this a couple of times and you should see new archived log files. SQL> archive log list At this point the numbers should have incremented as many as the number of switches. Exit SQLPlus and do an immediate full backup of the system.

No comments:

Post a Comment