ArcgiveLog in Oracle 8i 9.01 9.2

xiaoxiao2021-03-06  58

ArcgiveLog in Oracle 8i 9.01 9.2 Method Li Shouliang 2003-06-16

First, implement step II, log parameters and meaning three, archive commands and meanings four, specific instances

1, a manager) environment oracle 8i:: First, to achieve step # su - oracle $ svrmgrlSVRMGR> connect internalSVRMGR> shutdown immediateSVRMGR> startup mount [dbname] SVRMGR> alter database [dbname] archivelog; - only use archive mode SVRMGR > Archive log start - After starting the automatic archiving mode, then restart the database, press the init.ra to configure SVRMGR> ALTER DATABASE [DBNAME] open; - Open Database SVRMGR> EXIT

2) Environment When Oracle8i or Oracle 9i: # su - Oracle $ SQLPLUS / NOLOG> Connect / as Sysdba> ALTER DATABASE [DBNAME] ArchiveLog; - Feed Archive Mode> Archive Log Start - Start automatic archiving mode, restart database Afterwards, press InIT.ora> ALTER DATABASE [DBNAME] open; - Open Database> EXIT

Note: Switch archive and non-invasive modes, please set up on Database Mount but without Open, once the ArchiveLog property is set, only ALTER DATABASE NOARCHIVELOG can be changed to non-archive attributes; vice versa. The default archive path is $ ORACLE_HOME / DBS / ARCH, if you need to temporarily modify the archive path, use the command: ALTER SYSTEM ARCHIVE LOG Start To '/ U02 / Archive'

2. Modify the database initialization parameter file, define the archive mode (automatic), archive log file save path, archive log file naming method

1) Environment is Oracle 8i or Oracle 9.01: Modify Database Parameter File $ ORACLE_HOME / Admin / [ORADB] / Pfile / Init [ORADB]. ORA, cancel the following statement # 注释_archive_start = truelog_archive_DEST_1 = "location = / u02 / archive "log_archive_format = %% Oracle_SID %% T% TS% S.ARC

Note: format parameter% T: thread number, left filled with 0, such as Arch00000000001% T: thread number, not filling 0, such as Arch1% S: log serial number, fill in the left, such as Arch0000000189% S: log serial number, not filling 0, such as Arch189

2) When the environment is Oracle 9.2: The archive log parameter is not in the init.ora file setting, and setting the method in the $ ORACLE_HOME / DBS / SPFILE [Oracle_SID]. ORA file, the setting method is also different. To ensure the change of changes, it is recommended to use SYS users to log in to DBASTUDIO as SYSDBA, change the "Node" -> Routine -> Database -> All Database Parameters -> SPFILE ARCHIVE LOG parameters

3. After restarting the database to restart the database, read the settings in init [oracle_sid]. OA or SPFILE [ORACLE_SID]. ORA, the archive log is permanently effective. Second, the meaning of log parameters:

The archive mode is automatic or manual, true is automatic, false is manual log_archive_start = true

Path saved by archive log file log_archive_dest_1 = "location = / u02 / archive"

Naming method of archive log file log_archive_format = %% Oracle_sid %% T% TS% S.ARC

Third, the archive command: Start the automatic archiving mode, after the system restarts, set the archive mode SVRMGR> Archive log start in the value of the parameter log_archive_start in init.ora

Start Handmade Archive Mode Svrmgr> Archive Log Stop

View Archive Information: Do not archive whether the log is archive, is the automatic archiving or manual archiving, archive path, the oldest online log cycle number ... SVRMGR> Archive log list

Archive a full, but not archived online redo log SVRMGR> Archive log next

Archive all full, but no archive online redo log SVRMGR> Archive log all

SVRMGR> ALTER SYSTEM SWITCH logfile; Forced system for log switching, you can immediately observe the generation of archived logs.

SVRMGR> ALTER SYSTEM ARCHIVE LOG Start to '/ u02 / archive'; change the archive log path to / u02 / archive, but if you need to take effect permanently, please modify the init *. Ota or spfile *. Mar file according to different versions.

Fourth, specific example:

A) Oracle8i and 9.01 Environment: #SU - Oralce $ SVRMGRL

Oracle Server Manager Release 3.1.7.0.0 - PRODUCTION

Copyright (c) 2000, Oracle Corporation. All Rights Reserved.

Oracle8i Enterprise Edition Release 8.1.7.3.0 - 64bit Productionwith The Partitioning OptionjServer Release 8.1.7.3.0 - 64bit Production

SVRMGR> Connect INTERNAL connection is successful. SVRMGR> Shutdown has turned off the database. The database has been removed. Oracle instance is closed. SVRMGR> Startup Mount has launched an Oracle instance. The system's global region has 57124108 bytes Fixed Size 70924 bytes Variable Size 40198144 bytes Database Buffers 1677721 bytes Redo Buffers 77824 Bytes The database is loaded. SVRMGR> ALTER DATABASE ArchiveLog; statement has been processed. The SVRMGR> Archive log start statement has been processed. SVRMGR> ALTER DATABASE OPEN; statement has been processed. SVRMGR> ALTER SYSTEM SWITCH LOGFILE; - Force system Log switch, you can immediately observe the generating statement of the archive log has been processed. The SVRMGR> EXIT server manager ends. Modify the database parameter file $ ORACLE_HOME / admin / oradb / pfile / init [oracle_sid] .ora, canceled the following statement # comment log_archive_start = truelog_archive_dest_1 = "location = / u07 / archive" log_archive_format = %% ORACLE_SID %% T% TS% S .Arc closes the database, restart

View / U07 / Archive directory, you can see files like ORADBT001S01201.ARC, indicating that the archive is successful

2) Oracle 9.2 Environment: $ SQLPLUS / NOLOG

SQL * Plus: Release 9.2.0.1.0 - Production on Monday, June 16 10:30:23 2003

CopyRight (C) 1982, 2002, Oracle Corporation. All Rights Reserved.

SQL> Connect / as SYSDBA is connected.

SQL> Startup Mountoracle routines have been launched.

Total System Global Area 320308312 Bytesfixed Size 730200 Bytesvariable size 285212672 bytesdatabase buffers 33554432 BYTESREDO BUFFERS 811008 BYTES Database is loaded. SQL> ALTER DATABASE ArchiveLog;

The database has been changed. SQL> Archive Log Start Procedures SQL> ALTER DATABASE OPEN;

The database has been changed. SQL> ALTER SYSTEM SWITCH LOGFILE;

The system has changed. SQL> Archive log list; database log mode archive mode Auto archive enable archive endpoint / opt / oracle / orahome1 / dbs / Arch The earliest summary log sequence 3 Next Archive log sequence 5 Current log sequence 5sql> EXIT

Use SYS users to log in to DBASTUDIO as SYSDBA, change the "Node" -> Routine -> Database -> All Database Parameters -> SPFILE Archive Log Related Parameters LOG_ARCHIVE_START = Truelog_archive_Dest_1 = "Location = / U02 / Archive" LOG_ARCHIVE_FORMAT = %% Oracle_sid %% T% TS% S.ARCLOG_ARCHIVE_STAT_1 = Enable Restart Database

转载请注明原文地址:https://www.9cbs.com/read-106520.html

New Post(0)