Tuesday, July 29, 2014

Basic commands for oracle DBAs

Basic commands for oracle DBAs


To check database mode
            > archive log list
To bring database in archive log mode
            > startup mount
            > alter database archivelog;
To  start ARCN process
            log_archive_start=true
            log_archive-max_process=2(max 10)
            > ALTER SYSTEM SET LOG_ARCHIVE_MAX_PROCESSES=3;
            > ALTER SYSTEM ARCHIVE LOG START | STOP
To define archive format
            log_archive_format=TS%S.ARC
Data Dictionary Format
            V$ARCHIVED_LOG                       V$ARCHIVE_DEST
            V$LOG_HISTORY                           V$ARCHIVE_PROCESSES
To define archive destination  : Up to 4 destination can be defined
log_archive_dest=’/clover/archive’
log_archive_duplex_dest=’/clover/archive’
                        OR
log_archive_dest_1=”LOCATION=/clover/arch”    
                                                                        Mandatory Reopen=500(Default 300)                                                                                   Optional
log_archive_min_succeed_dest=2
log_archive_dest_state_3=DEFER / ENABLE
            > ALTER SYSTEM SET log_archive_dest_state_3=ENABLE;
log_archive_dest_state_2=”SERVICE=standby”
To defining archive destination in open database
            > ALTER SYSTEM ARCHIVE LOG START TO ’/clover/arch’;
Selectively Archiving
            > ALTER SYSTEM ARCHIVE LOG SEQUENCE 052;

No comments:

Post a Comment