How to change archive log destination:
ALTER SYSTEM SET log_archive_dest ='/flash2/arch/PMSDB/archivelog' scope=both;
or
ALTER SYSTEM ARCHIVE LOG ALL TO ‘/u04/oradata/PROD’;
How to change the database from noarchivelog to archivelog:
SQL> startup mount exclusive;
ORACLE instance started.
Total System Global Area 574619648 bytes
Fixed Size 780240 bytes
Variable Size 304879664 bytes
Database Buffers 268435456 bytes
Redo Buffers 524288 bytes
Database mounted.
SQL> ALTER DATABASE ARCHIVELOG;
Database altered.
SQL> ARCHIVE LOG START
Statement processed.
SQL> ALTER DATABASE OPEN;
Alternatively, add the above commands into your database's startup command script, and bounce the database.
The following parameters needs to be set for databases in ARCHIVELOG mode:
log_archive_start = TRUE
log_archive_dest_1 = 'LOCATION=/arch_dir_name'
log_archive_dest_state_1 = ENABLE
log_archive_format = %d_%t_%s.arc
ALTER SYSTEM SET log_archive_dest ='/flash2/arch/PMSDB/archivelog' scope=both;
or
ALTER SYSTEM ARCHIVE LOG ALL TO ‘/u04/oradata/PROD’;
How to change the database from noarchivelog to archivelog:
SQL> startup mount exclusive;
ORACLE instance started.
Total System Global Area 574619648 bytes
Fixed Size 780240 bytes
Variable Size 304879664 bytes
Database Buffers 268435456 bytes
Redo Buffers 524288 bytes
Database mounted.
SQL> ALTER DATABASE ARCHIVELOG;
Database altered.
SQL> ARCHIVE LOG START
Statement processed.
SQL> ALTER DATABASE OPEN;
Alternatively, add the above commands into your database's startup command script, and bounce the database.
The following parameters needs to be set for databases in ARCHIVELOG mode:
log_archive_start = TRUE
log_archive_dest_1 = 'LOCATION=/arch_dir_name'
log_archive_dest_state_1 = ENABLE
log_archive_format = %d_%t_%s.arc
No comments:
Post a Comment