Oracle11g RAC enable and disable, set archiving summary, oracle11grac
Close
1. First shut down the database:
Copy codeThe Code is as follows:
[Oracle @ oeltan1 ~] $ Srvctl stop database-d tantest
2. Disable the crs service again.
[Copy codeThe Code is as follows:
Root @ oeltan1 ~] # Crsctl stop crs
Start:
Copy codeThe Code is as follows:
[Root @ oeltan1 ~] # Crsctl start crs
[Oracle @ oeltan1 ~] $ Srvctl start asm-n node_name
The above boot has generally started
Copy codeThe Code is as follows:
[Oracle @ oeltan1 ~] $ Srvctl start database-d tantest
Archive settings:
1. Create the ASM directories of the two instances respectively.
Any instance under the grid user:
Copy codeThe Code is as follows:
# Su-grid
[Grid @ oeltan1 ~] $ Sqlplus "/as sysasm"
SQL> select name from V $ asm_diskgroup;
NAME
--------------------------------------------------------------------------------
CRS
DATA1
FRI
SQL> alter diskgroup FRI add directory '+FRI/TANTEST';SQL> alter diskgroup FRI add directory '+FRI/TANTEST/ARCH1';
You can also create a directory through asmcmd:
ASMCMD> pwd+FRI/TANTESTASMCMD> mkdir ARCH2
2. Modify archiving Parameters
Any instance. For oracle users:
ALTER SYSTEM SET LOG_ARCHIVE_DEST_1='LOCATION=+FRI/TANTEST/ARCH1' SCOPE=both SID='tantest1'; ALTER SYSTEM SET LOG_ARCHIVE_DEST_1='LOCATION=+FRI/TANTEST/ARCH2' SCOPE=both SID='tantest2';
3. Run the following commands on both nodes:
SQL> SHUTDOWN IMMEDIATE;SQL> STARTUP MOUNT;SQL> ALTER DATABASE ARCHIVELOG;SQL> ALTER DATABASE OPEN;
-- When you modify an instance, the other instance cannot be in the open state, otherwise the ORA-01126: database must be mounted in this instance and not open in any
4. check:
SQL> archive log listDatabase log mode Archive ModeAutomatic archival EnabledArchive destination +FRI/tantest/arch1Oldest online log sequence 14Next log sequence to archive 15Current log sequence 15SQL> archive log listDatabase log mode Archive ModeAutomatic archival EnabledArchive destination +FRI/tantest/arch2Oldest online log sequence 6Next log sequence to archive 7Current log sequence 7SQL>
How to enable/disable oracle Archiving
If archiving is enabled, ensure log_archive_start = true to enable automatic archiving. Otherwise, only manual archiving is supported. If archiving is disabled, set this parameter to false. Note: in the OPS/RAC environment, you need to comment out parallel_server = true first, then perform the following steps, and then use this parameter to restart 1. Enable archive. shut down the database shutdown immediate B. startup mount c. alter database archivelog d. alter database opne 2. Archive prohibited. shut down the database shutdown immediate B. startup mount c. alter database noarchivelog d. you can use the following statement to view the alter database open archation information: SQL> archive log list Database log mode Archive Mode archic archival Enabled Archive destination E: \ oracle \ ora92 \ database \ archive Oldest online log sequence 131 Next log sequence to archive 133 Current log sequence 133
How to Set oracle11g to archive Mode
SQL> conn/as sysdba
SQL> shutdown immediate;
SQL> startup mount
SQL> alter database archivelog;
SQL> alter system set control_file_record_keep_time = 30 scope = spfile;
SQL> alter system set log_archive_dest_1 = 'location = E: \ Oracle \ oradata \ MYDB_ARCH 'scope = spfile;
SQL> alter database open;
SQL> archive log list;
SQL> alter system archive log start;
SQL> shutdown immediate
SQL> startup
SQL> alter database force logging;