Oracle如何实现B树索引

实现B树索引
这里将介绍使用B树索引时会遇到的典型任务。典型的任务包括。
.创建索引
.报告索引
.显示重新创建索引需要的代码
.删除索引

1 创建B树索引
下面给出的是一个示例脚本,它创建一个表,并在单独的表空间创建与之相关的索引。表和索引从表空间继承存储属性,这是因为在create table或create index语句中没有指定存储参数。此外,你希望主键和唯一键约束自动创建B树索引。

SQL> create table cust1(
  2  cust_id number,
  3  last_name varchar2(30),
  4  first_name varchar2(30)
  5  )
  6  tablespace reporting_data;

Table created.

SQL> alter table cust1 add constraint cust_pk primary key(cust_id) using index tablespace reporting_index;

Table altered.

SQL> alter table cust1 add constraint cust_uk1 unique(last_name,first_name) using index tablespace reporting_index;

Table altered.

SQL> create table address(
  2  address_id number,
  3  cust_id number,
  4  street varchar2(30),
  5  city varchar2(30),
  6  state varchar2(30)
  7  )
  8  tablespace reporting_data;

Table created.

SQL> alter table address add constraint addr_fk1 foreign key(cust_id) references cust1(cust_id);

Table altered.

SQL> create index addr_fk1 on address(cust_id) tablespace reporting_index;

Index created.

此脚本创建了两个表。父表是cust1,它的主键是cust_id。子表是address,它的主键是address_id。在address表中,cust_id列作为外键存在,它映射到cust1表的cust_id列。

此脚本也创建了三个B树索引。其中第一个是创建主键约束时自动创建的。第二个索引是创建唯一约束时自动创建的。第三个索引是明确创建在address表中的cust_id外键列上的。所有这三个索引都是在reporting_index表空间中创建的,而表是在reporting_data表空间中创建的。

2 报告索引
上面的例子中创建的索引的详细信息可以通过查询数据字典来验证。

SQL> select index_name,index_type,table_name,tablespace_name,status from user_indexes where table_name in('CUST1','ADDRESS');

INDEX_NAME                                         INDEX_TYPE                  TABLE_NAME                                         TABLESPACE_NAME                                    STATUS
-------------------------------------------------- --------------------------- -------------------------------------------------- -------------------------------------------------- --------
ADDR_FK1                                           NORMAL                      ADDRESS                                            REPORTING_INDEX                                    VALID
CUST_PK                                            NORMAL                      CUST1                                              REPORTING_INDEX                                    VALID
CUST_UK1                                           NORMAL                      CUST1                                              REPORTING_INDEX                                    VALID

运行以下查询来验证创建了索引的列:

SQL> select index_name,column_name,column_position from user_ind_columns where table_name in('CUST1','ADDRESS') order by index_name,column_position;

INDEX_NAME                                         COLUMN_NAME                    COLUMN_POSITION
-------------------------------------------------- ------------------------------ ---------------
ADDR_FK1                                           CUST_ID                                      1
CUST_PK                                            CUST_ID                                      1
CUST_UK1                                           LAST_NAME                                    1
CUST_UK1                                           FIRST_NAME                                   2

要显示区的数目和已使用的空间,可以运行以下查询:

SQL> select a.segment_name,a.segment_type,a.extents,a.bytes from user_segments a,user_indexes b where a.segment_name=b.index_name and b.table_name in('CUST1','ADDRESS');

no rows selected

请注意,这个例子的输出结果显示,没有为索引分配段,区或空间。

从Oracle 11g第2版开始,在创建表时,如果还没有往表中插入数据,相关的段(和区)将会初步推迟创建。这意味着直到数据行被插入到相关的表之后,才会为相关的索引创建段。为了说明这一点,给CUST1表插入一行,也给ADDRESS表插入一行,如下所示:

SQL> insert into cust1 values(1,'STARK','JIM');

1 row created.

SQL> insert into address values(100,1,'Vacuum Ave','Portland','OR');

1 row created.

SQL> commit;

Commit complete.

重新运行这个查询(段的使用报告)产生的输出如下:

SQL> select a.segment_name,a.segment_type,a.extents,a.bytes from user_segments a,user_indexes b where a.segment_name=b.index_name and b.table_name in('CUST1','ADDRESS');

SEGMENT_NAME                                                                                                                     SEGMENT_TYPE          EXTENTS      BYTES
-------------------------------------------------------------------------------------------------------------------------------- ------------------ ---------- ----------
ADDR_FK1                                                                                                                         INDEX                       1     131072
CUST_PK                                                                                                                          INDEX                       1     131072
CUST_UK1                                                                                                                         INDEX                       1     131072

3 显示创建索引的代码
有时候可能需要删除一些索引。这些索引可能是由过时的应用程序建立的,也可能是你自己以前建立的,但已经用不到了。在删除索引之前,建议你首先生成重新创建索引所需的数据定义语言(DDL)。如果删除索引对性能有不利影响而需要重新创建它,就可以重新创建索引(就像没有删除它一样)。

可以使用dbms_metadata.get_ddl函数来显示对象的DDL。确保为LONG变量设置适当的值,使用返回的CLOB值能全部显示出来。例如:

SQL> set long 1000000
SQL> select dbms_metadata.get_ddl('INDEX','ADDR_FK1') from dual;

下面是输出结果:

DBMS_METADATA.GET_DDL('INDEX','ADDR_FK1')
--------------------------------------------------------------------------------

  CREATE INDEX "JY"."ADDR_FK1" ON "JY"."ADDRESS" ("CUST_ID")
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS NOLOGGING
  STORAGE(INITIAL 131072 NEXT 131072 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "REPORTING_INDEX"

这段代码显示了重新创建索引需要的所有内容。这些代码中的许多值反映了从索引表空间继承的默认设置或存储参数。

如果想要显示当前连接的用户的所有索引元数据,可以运行下面的代码:

SQL> select dbms_metadata.get_ddl('INDEX',index_name) from user_indexes;

DBMS_METADATA.GET_DDL('INDEX',INDEX_NAME)
--------------------------------------------------------------------------------

  CREATE INDEX "JY"."CUST_IDX1" ON "JY"."CUST" ("LAST_NAME")
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS"


  CREATE INDEX "JY"."CUST_IDX2" ON "JY"."CUST" ("FIRST_NAME")
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS"


  CREATE UNIQUE INDEX "JY"."CUST_PK" ON "JY"."CUST1" ("CUST_ID")
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS NOLOGGING
  STORAGE(INITIAL 131072 NEXT 131072 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)


  CREATE UNIQUE INDEX "JY"."CUST_UK1" ON "JY"."CUST1" ("LAST_NAME", "FIRST_NAME")
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS NOLOGGING
  STORAGE(INITIAL 131072 NEXT 131072 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "REPORTING_INDEX"


  CREATE INDEX "JY"."ADDR_FK1" ON "JY"."ADDRESS" ("CUST_ID")
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS NOLOGGING
  STORAGE(INITIAL 131072 NEXT 131072 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "REPORTING_INDEX"

如果当前连接的用户有很多索引,这个查询将会产生大量的输出。

4 删除B树索引
如果确定不再使用某个索引了,那么应该删除它。在删除索引之前,应采取必要的预防措施,以确保不会对性能产生不利影响。如果可能的话,最好的办法是在与生产环境同等条件(在硬件,数据,负载等方面)的测试环境中删除索引,确定对性能的不利影响。如果不可能进行彻底的测试,那么在删除前考虑先做以下工作。
.启用对索引的监测。
.使用索引不可见。
.使用索引不可用。

这样做是为了在实际删除之前,先确定该索引没有用于任何目的。监控索引会让你了解应用程序的select语句是否使用了它。但索引监控不会告诉你该索引是否被用于其他内部用途,如用来强制执行某个约束或防止锁定问题。

使用一个索引不可见需要Oracle 11g及以上版本。不可见索引仍然由Oracle维护,但查询优化器确定执行计划时不考虑它。请注意,不可见的索引仍然可以由Oracle在内部使用,用来避免锁定问题或强制执行约束。所以,使用索引不可见并不是用来确定该索引是否被使用的完全可靠的方法。

下面是使用索引 不可见的一个例子:

SQL> alter index addr_fk1 invisible;

Index altered.

此代码使用索引对查询优化器不可见,因此,它不能在查询中用来检索行。然而,当修改表中的记录时,该索引结构仍然由Oracle维护。如果确定该索引对性能非常关键,那么可以通过如下命令很容易地使用它再次对优化器可见。

SQL> alter index addr_fk1 visible;

Index altered.

删除索引之前的另一种选择是使其不可用。

SQL> alter index addr_fk1 unusable;

Index altered.

此代码使得索引不可用,但不会删除它。不可用表示,不但优化器不会使用索引,而且当DML语句操作它的表时,Oracle也不会维护该索引。此外,不可用的索引不能在内部使用,用于强制执行约束或避免锁定问题。

如果需要重新启用不可用的索引,那么就必须重建它。而重建一个大型的索引,会消耗大量的时间和资源。

SQL> alter index addr_fk1 rebuild;

Index altered.

当确信不需要某个索引后,就可以使用drop index语句来删除它。这个语句将永久删除该索引,找回该索引的唯一办法是重新创建它。

SQL> drop index addr_fk1;

Index dropped.

Oracle如何创建B树索引

创建B树索引之前,为了慎重起起见,有必要从架构层面考虑一些将影响可维护性和可用性的问题。以下是建立索引之前,应该考虑的架构性问题。
.在创建索引之前,首先对它的大小进行估计。
.考虑指定表索引的表空间(与表分离)。这使得分开管理表和索引变得更轻松,如备份和恢复任务。
.允许对象从它闪的表空间继承存储参数。
.定义创建索引时要使用的命令标准。

1 在创建索引前估计索引的大小
一张大表上创建索引之前,可能需要估计它将会占用的空间大小。预测索引大小最好的方法是在测试环境中创建它,测试环境中有生产环境的典型数据集。如果不能建立生产数据的完整副本,那么经常可以用数据的一个子集来推断在生产中所需索引空间的大小。如果你没有使用削减的生产数据的奢侈条件,还可以使用dbms_space.create_index_cost存储过程来估算索引的大小。例如,如下代码估算了在cust表的first_name列上创建索引的大小:

SQL> set serverout on
SQL> exec dbms_stats.gather_table_stats(user,'CUST');

PL/SQL procedure successfully completed.

SQL> variable used_bytes number
SQL> variable alloc_bytes number
SQL> exec dbms_space.create_index_cost('create index cust_idx2 on cust(first_name)',:used_bytes,:alloc_bytes);

PL/SQL procedure successfully completed.

下面是这个例子的一些示例输出:

SQL> print :used_bytes

USED_BYTES
----------
      7490

SQL> print :alloc_bytes

ALLOC_BYTES
-----------
      65536

used_bytes变量给出了索引数据需要多少空间的估计。alloc_bytes变量提供了将在表空间内分配多大空间的估计。

下一步,创建索引。

SQL> create index cust_idx2 on cust(first_name);

Index created.

用如下查询显示所占用的空间的实际数额:

SQL> select bytes from user_segments where segment_name='CUST_IDX2';

     BYTES
----------
     65536

输出显示空间分配字节数的估计量等于实际使用量。

根据记录数,列数,数据类型和统计数据的准确性,输出的结果可能会有所不同。除初始大小之外,还要牢记随着记录插入到表中,该索引将增大。必须对索引占用的空间进行监控,并确保有足够的磁盘空间,以适应未来的增长需求。

2 为索引创建单独的表空间
对于关键的应用程序,必须提前考虑表和索引会消耗多少空间,以及它们增长的速度有多快。空间消耗和对象的增长对数据库可用性有直接影响。如果空间用尽了,那么数据库将变得不可用。最好的管理办法是,针对空间要求创建表空间,并在创建对象时明确指定表空间名。考虑到这一点,我们建议将表和索引分别保存到单独的表空间。考虑以下原因。
.支持采用不同的备份和恢复要求。你可能希望灵活地用与备份表不同的频率来备份索引。或者可以选择不备份索引,因为你知道可以重新创建它们。
.如果让表或索引从表空间继承它的存储特性,使用单独的表空间可以为表空间内创建的对象量身定制存储属性。表和索引往往有不同的存储要求(如区的大小,记录等)。
.运行维护报告时,如果报告针对不同的表空间具有不同的节(section),有时管理表和索引会更容易。

如果这些原因出现在你的环境中,那么可能值得付出额外的努力,对表和索引采用不同的表空间。如果你没有前面提到的任何需要,那么把表和索引保存在相同的表空间是不错的选择。

DBA经常出于性能的原因,考虑把索引放置在单独的表空间。如果你有从头开始建立存储系统的奢侈条件,可以把挂载点(mount point)设置为有自己的磁盘和控制器,那么可能会看到把表和索引存储在不同表空间的一些IO上的好处。如今,存储管理员往往会分配给你的SAN中的一大片存储,并且无法保证数据和索引将存储在单独的磁盘和控制器上。因此,把表和索引存储在不同表空间的做法,通常对提高性能没什么帮助。换句话说,性能获得提高不是通过将表和索引存储到不同的表空间实现的,而是由于在所有可用的设备上均匀地分布IO实现的。

下面的代码显示的是为表和索引单独建立表空间的例子。它使用固定大小的区和自动段空间管理(ASSM)创建了本地管理的表空间。

SQL> create tablespace reporting_data datafile '+DATA/JYCS/reporting_data01.dbf' size 1G extent management local uniform size 1M
  2  segment space management auto;

Tablespace created.


SQL> create tablespace reporting_index datafile '+DATA/JYCS/reporting_index01.dbf' size 500M extent management local uniform size 128K
  2  segment space management auto nologging;

Tablespace created.

我们更倾向于使用统一大小的区,因为这确保了表空间内存的所有区大小相同,从而减少了对象创建和删除时的碎片。ASSM的功能允许Oracle自动管理存储属性,而以前这需要手动监测和由DBA维护。

3 从表空间继承存储参数
创建表或索引时,有几个与表空间相关的技术细节需要注意。例如,如果创建表和索引时不指定存储参数,则表和索引会继承表空间的存储参数。这是在大多数情况下所需的行为。这样就可以不必手动指定这些参数。如果需要创建一个具有与表空间不同的存储参数的对象,那么用create table/index语句来实现。

此外,请记住,如果不明确指定表侬间,默认情况下,表和索引创建在用户的默认表空间中。在开发和测试环境中,这是可以接受的。对于生产环境,则应该考虑在create table/index语句中明确命令表空间。

4 命令标准
在创建和管理索引时,制定一些命名标准是非常可取的。考虑以下因素.
.当错误消息中包含表示表,索引类型等的信息时,简化了对问题的诊断。
.显示索引信息的报告更容易被分组,因此更具可读性并更容易地发现其中的规律和问题。鉴于这些需求,这里有一些示例索引命名指南。
.主键索引名称应该包含表名和一个后缀,如_UKN,其中N是一个数字。
.外键列上的索引应包含外键表和一个后缀,如_FKN,其中N是一个数字。
.对于不用于约束的索引,使用表名和一个后缀,如_IDXN,其中N是一个数字。
.基于函数的索引的名称应包含表名和一个后缀,如_FCN,其中N是一个数字。

一些厂商在命名索引时使用前缀。例如,主键索引将被命名为PK_CUST(而不是CUST_PK)。所有这些不同的命名标准都是有效的。

Oracle中的B树索引

B树索引是Oracle的默认的索引类型。因为表中的行标识符(rowid)和相关的列值存储在一个平衡的树状结构的索引块中,所以该索引类型被称为B树索引。使用Oracle的B树索引有以下几个原因.
.提高SQL语句的性能
.强制执行主键和唯一键约束的唯一性
.减少通过主键和外键约束关联的父表和子表间潜在的锁定问题

Oracle如何使用B树索引
为了充分理解B树索引的内部实现,以便在建立数据库应用程序时能做出明智的索引决定。将举例说明,首先创建测试表cust

SQL> create table cust(
  2  cust_id number,
  3  last_name varchar2(30),
  4  first_name varchar2(30));

Table created.

在last_name列上创建B树索引

SQL> create index cust_idx1 on cust(last_name);

Index created.

向表cust中插入数据

SQL> insert into cust(cust_id,last_name,first_name)
  2  select rownum rn ,a.last_name,a.first_name from hr.employees a
  3  union
  4  select rownum+(107*1) rn ,a.last_name,a.first_name from hr.employees a
  5  union
  6  select rownum+(107*2) rn ,a.last_name,a.first_name from hr.employees a
  7  union
  8  select rownum+(107*4) rn ,a.last_name,a.first_name from hr.employees a
  9  union
 10  select rownum+(107*5) rn ,a.last_name,a.first_name from hr.employees a
 11  union
 12  select rownum+(107*6) rn ,a.last_name,a.first_name from hr.employees a
 13  union
 14  select rownum+(107*7) rn ,a.last_name,a.first_name from hr.employees a
 15  union
 16  select rownum+(107*8) rn ,a.last_name,a.first_name from hr.employees a
 17  union
 18  select rownum+(107*9) rn ,a.last_name,a.first_name from hr.employees a
 19  union
 20  select rownum+(107*10) rn ,a.last_name,a.first_name from hr.employees a;

1070 rows created.

SQL> commit;

Commit complete.

SQL> select distinct last_name,first_name from cust where rownum<11;

LAST_NAME                      FIRST_NAME
------------------------------ ------------------------------
Austin                         David
Banda                          Amit
Atkinson                       Mozhe
Bissot                         Laura
Ande                           Sundar
Bates                          Elizabeth
Bell                           Sarah
Bernstein                      David
Baer                           Hermann
Baida                          Shelli

10 rows selected.

插入数据后,确保该表的统计信息是最新的,以便为查询优化器提供足够的信息,从而做出如何检索数据的更好决定,执行如下命令收集表的统计信息:

SQL> exec dbms_stats.gather_table_stats(ownname=>'JY',tabname=>'CUST',cascade=>true);

PL/SQL procedure successfully completed.

不建议使用analyze语句(带compute和estimate子句)来收集统计信息。提供此功能只是为了向后兼容。

当向表中插入数据时,Oracle将分配由物理数据库块组成的区。Oracle还将为索引分配数据块。对于每个插入到表中的记录,Oracle还将创建一个包含rowid和列值的索引条目(本例中是rowid和last_name列的值)。每个索引项的rowid指向存储该表的列值的数据文件和数据块号。

当从一个表及其对应的索引选择数据时,存在三种情况。
.SQL查询所需的所有表的数据都在索引结构中。因此,只需要访问索引块。不需要从表中读取数据块。
.查询所需的所有信息没有都包含在索引块中。因此,查询优化器选择既访问索引块也要访问表块来检索需要的数据,以满足查询条件。
.查询优化器选择不访问索引。因此只访问表块。

场景1.所有的数据位于索引块中
这里将介绍两种情况。在每种情况下,执行查询需要的所有数据,包括返回给用户的数据,以及在where子句中被评估的数据,都位于该索引中。
.索引范围扫描(index range scan):如果优化器确定它使用索引结构检索查询所需的多个行时是有效的,那么就使用这种扫描。索引范围扫描被广泛用于各种各样的情况。

.索引快速全扫描(index fast full scan):如果优化器确定表中的大部分行需要进行检索,那么就使用这种扫描。但所有需要的信息都存储在索引中。由于索引结构通常比表结构小,优化器确定全索引扫描(比全表扫描)更高效。这种情况对统计(count)值的查询是很常见的。

首先演示的是索引范围扫描。在这种情况下,运行下面的查询:

select last_name from cust where last_name='Austin';

为了在该查询中返回数据,Oracle最小需要读取多少块,也就是说为了满足此查询,访问物理块最有效的方式是什么,优化器可以选择读取表结构的每个块。然而,这会导致很大的IO开销,因此,它不是检索数据的最优化方法。

对于这个例子,检索数据最有效的方法是使用索引结构。要返回包含last_name列中值为Austin的行,Oracle将需要读取3个索引块。通过使用Oracle的autotrace(自动跟踪)实用程序,可以确认。

SQL> set autotrace on
SQL> select last_name from cust where last_name='Austin';

LAST_NAME
------------------------------
Austin
Austin
Austin
Austin
Austin
Austin
Austin
Austin
Austin
Austin

10 rows selected.


Execution Plan
----------------------------------------------------------
Plan hash value: 3472749082

------------------------------------------------------------------------------
| Id  | Operation        | Name      | Rows  | Bytes | Cost (%CPU)| Time     |
------------------------------------------------------------------------------
|   0 | SELECT STATEMENT |           |    10 |    80 |     1   (0)| 00:00:01 |
|*  1 |  INDEX RANGE SCAN| CUST_IDX1 |    10 |    80 |     1   (0)| 00:00:01 |
------------------------------------------------------------------------------


Predicate Information (identified by operation id):
---------------------------------------------------

   1 - access("LAST_NAME"='Austin')

此输出显示,Oracle只需要使用cust_idx1索引来检索数据,以满足查询的结果集。不需要访问表中的数据块,只需要访问索引块。这对于给定的查询,这是特别高效的索引策略。当索引包含查询所需的所有列值时,它被称为覆盖索引。

下面列出为这个例子使用自动跟踪所显示的统计信息:

Statistics
----------------------------------------------------------
          1  recursive calls
          0  db block gets
          3  consistent gets
          0  physical reads
          0  redo size
        653  bytes sent via SQL*Net to client
        624  bytes received via SQL*Net from client
          2  SQL*Net roundtrips to/from client
          0  sorts (memory)
          0  sorts (disk)
         10  rows processed

一致获取(consistent gets)的值表示有三个读内存操作。数据库块获取(db block gets)加一致获取等于总的内存读取操作。由于索引块已经在内存中,因此返回此查询的结果集不需要物理读取。此外,有10行进行了处理,这与cust表中last_name为Austin的记录数相符。

下面显示导致执行索引快速全扫描的一个例子。

select count(last_name) from cust;

使用set autotrace on生成执行计划。下面是相应的输出:

SQL> select count(last_name) from cust;

COUNT(LAST_NAME)
----------------
            1070


Execution Plan
----------------------------------------------------------
Plan hash value: 2246355899

-----------------------------------------------------------------------------------
| Id  | Operation             | Name      | Rows  | Bytes | Cost (%CPU)| Time     |
-----------------------------------------------------------------------------------
|   0 | SELECT STATEMENT      |           |     1 |     8 |     3   (0)| 00:00:01 |
|   1 |  SORT AGGREGATE       |           |     1 |     8 |            |          |
|   2 |   INDEX FAST FULL SCAN| CUST_IDX1 |  1070 |  8560 |     3   (0)| 00:00:01 |
-----------------------------------------------------------------------------------

此输出显示,确定表内的计数只用到了索引结构。在这种情况下,优化器确定采取索引快速全扫描比全表扫描更高效。

Statistics
----------------------------------------------------------
         48  recursive calls
          0  db block gets
         91  consistent gets
          0  physical reads
          0  redo size
        559  bytes sent via SQL*Net to client
        624  bytes received via SQL*Net from client
          2  SQL*Net roundtrips to/from client
          3  sorts (memory)
          0  sorts (disk)
          1  rows processed


场景2.索引中不包含所有信息
考虑这样一种情况:假设需要从cust表获得更多信息。首先,回顾一下前面的查询语句,并且还要在查询结果中返回first_name列。现在,要获得新增的数据元素,就需要访问表本身。下面是新的查询语句:

select last_name,first_name from cust where last_name='Austin';

使用set autotrace on,并执行前面的查询语句:

SQL> alter system flush buffer_cache;

System altered.

SQL> select last_name,first_name from cust where last_name='Austin';

LAST_NAME                      FIRST_NAME
------------------------------ ------------------------------
Austin                         David
Austin                         David
Austin                         David
Austin                         David
Austin                         David
Austin                         David
Austin                         David
Austin                         David
Austin                         David
Austin                         David

10 rows selected.


Execution Plan
----------------------------------------------------------
Plan hash value: 2100940648

-------------------------------------------------------------------------------------------------
| Id  | Operation                           | Name      | Rows  | Bytes | Cost (%CPU)| Time     |
-------------------------------------------------------------------------------------------------
|   0 | SELECT STATEMENT                    |           |    10 |   150 |     1   (0)| 00:00:01 |
|   1 |  TABLE ACCESS BY INDEX ROWID BATCHED| CUST      |    10 |   150 |     1   (0)| 00:00:01 |
|*  2 |   INDEX RANGE SCAN                  | CUST_IDX1 |    10 |       |     1   (0)| 00:00:01 |
-------------------------------------------------------------------------------------------------

Predicate Information (identified by operation id):
---------------------------------------------------

   2 - access("LAST_NAME"='Austin')

此输出信息指示,cust_idx1索引是通过一次索引范围扫描(index range scan)访问的。索引范围扫描标识出满足此查询结果所需的索引块。此外,表是过table access by index rowid batched来读取的。通过索引的rowid访问表,表示Oracle利用存储在索引中的rowid找到表块包含的相应行。把rowid映射到相应的表块,这些块中含有last_name值为Austin的数据。由于我们清空了buffer cache了,这样查询共执行了6次物理读取,9次内存读取。

Statistics
----------------------------------------------------------
          0  recursive calls
          0  db block gets
          9  consistent gets
          6  physical reads
          0  redo size
        896  bytes sent via SQL*Net to client
        624  bytes received via SQL*Net from client
          2  SQL*Net roundtrips to/from client
          0  sorts (memory)
          0  sorts (disk)
         10  rows processed

场景3.只有表块被访问
在某些情况下,即使有索引存在,Oracle也会确定只使用表块比通过索引访问更为有效。当Oracle检查表内的每一行时,这被称为全表扫描。
例如,执行此查询:

SQL> select * from cust;

下面是相应的执行计划和统计信息:

Execution Plan
----------------------------------------------------------
Plan hash value: 260468903

--------------------------------------------------------------------------
| Id  | Operation         | Name | Rows  | Bytes | Cost (%CPU)| Time     |
--------------------------------------------------------------------------
|   0 | SELECT STATEMENT  |      |  1070 | 19260 |     3   (0)| 00:00:01 |
|   1 |  TABLE ACCESS FULL| CUST |  1070 | 19260 |     3   (0)| 00:00:01 |
--------------------------------------------------------------------------


Statistics
----------------------------------------------------------
        204  recursive calls
          9  db block gets
        389  consistent gets
         20  physical reads
       1080  redo size
      38869  bytes sent via SQL*Net to client
       1405  bytes received via SQL*Net from client
         73  SQL*Net roundtrips to/from client
         33  sorts (memory)
          0  sorts (disk)
       1070  rows processed

此输出显示,需要一致读取(consistent gets)389个块以及数据库块获取(db block gets)9个块和物理读取20个块。Oracle检索表中的每一行以返回满足查询所需的结果。在这种情况下,必须读取表中已使用的所有块,Oracle无法使用索引来加快数据检索。

Oracle DG备库发现Oracle Home目录使用空间巨增的问题处理

同事巡检查发现Oracle RAC DG备库的Oracle Home目录使用空间巨增,执行命令发现oracle目录占用了87G,这肯定不正常。

[root@dgdb1 app]# du -sh *
11G     11.2.0
8.0K    asmpfile.ora
3.1G    grid
87G     oracle
4.0M    oraInventory

进一步检查发现ORACLE_HOME目录下的dbs目录占用了61G。

[root@dgdb1 db_1]# du -sh *
177M    apex
303M    assistants
459M    bin
58M     ccr
8.0K    cdata
2.9M    cfgtoollogs
68K     clone
4.0K    config
5.9M    crs
24K     csmig
236K    css
296M    ctx
3.3M    cv
61G     dbs
12K     dc_ocm
396K    deinstall
1.1M    demo
16K     diagnostics
6.9M    dv
40K     emcli
8.0K    EMStage
1.9M    has
40K     hs
11M     ide
7.4M    install
1.5M    instantclient
215M    inventory
60M     j2ee
118M    javavm
26M     jdbc
520K    jdev
186M    jdk
43M     jlib
2.7M    ldap
768M    lib
64K     log
33M     md
96K     mesg
908K    mgw
8.3M    network
33M     nls
326M    oc4j
1.7M    odbc
13M     olap
5.5M    OPatch
528K    opmn
40M     oracore
4.0K    oraInst.loc
7.4M    ord
29M     oui
545M    owb
1.7M    owm
60M     perl
1.6M    plsql
5.1M    precomp
316K    racg
127M    rdbms
124K    relnotes
4.0K    root.sh
12K     scheduler
20K     slax
82M     sqldeveloper
4.8M    sqlj
484K    sqlplus
9.6M    srvm
21M     suptools
220M    sysman
112K    timingframework
512K    ucp
3.7M    uix
800K    usm
8.0K    utl
556K    wwg
19M     xdk

检查dbs目录发现多了很多broken*这样的文件,并且在是三月2号8:36分到9:49分之间生成的

[root@dgdb1 dbs]# ls -lrt
total 63341528
-rw-r--r-- 1 oracle oinstall       2851 May 15  2009 init.ora
-rw-rw---- 1 oracle asmadmin       1544 Nov  9  2016 hc_rlzy1.dat
-rw-r----- 1 oracle oinstall       1536 Nov 11  2016 orapwRLZY1
-rw-r--r-- 1 oracle oinstall         60 Nov 20  2016 initRLZY1.ora
-rw-r--r-- 1 oracle oinstall         60 Nov 24  2016 initRLZY1.ora.bk
-rw-r--r-- 1 oracle oinstall       1922 Nov 24  2016 initCAIWU1.ora.bk
-rw-r--r-- 1 oracle oinstall         60 Nov 24  2016 initCAIWU1.ora
-rw-r----- 1 oracle oinstall       1536 Nov 24  2016 orapwCAIWU1
-rw-rw---- 1 oracle asmadmin       1544 Nov 24  2016 hc_chdyldg.dat
-rw-r--r-- 1 oracle oinstall       1979 Nov 24  2016 initchdyl1.ora.bk
-rw-r--r-- 1 oracle oinstall         61 Nov 24  2016 initchdyl1.ora
-rw-r----- 1 oracle oinstall       1536 Nov 24  2016 orapwchdyl1
-rw-r--r-- 1 oracle oinstall       2019 Nov 28  2016 initsjjh1.ora.bk
-rw-r--r-- 1 oracle oinstall         60 Nov 28  2016 initsjjh1.ora.bak.dgdb1
-rw-r----- 1 oracle oinstall       1536 Nov 28  2016 orapwsjjh1.bk
-rw-r--r-- 1 oracle oinstall         83 Nov 29  2016 initsjjh1.ora
-rw-rw---- 1 oracle asmadmin       1544 Apr  1  2017 hc_dbdb1.dat
-rw-r--r-- 1 oracle oinstall       1783 Apr  1  2017 initdadb1.ora.bk
-rw-r--r-- 1 oracle oinstall         53 Apr  1  2017 initdadb1.ora.bak.dgdb1
-rw-r----- 1 oracle oinstall       1536 Apr  1  2017 orapwdadb1
-rw-r--r-- 1 oracle oinstall         76 Apr  5  2017 initdadb1.ora
-rw-rw---- 1 oracle asmadmin       1544 Apr 22  2019 hc_chdyl1.dat
-rw-rw---- 1 oracle asmadmin       1544 Apr 22  2019 hc_dadb1.dat
-rw-rw---- 1 oracle asmadmin       1544 Apr 22  2019 hc_CAIWU1.dat
-rw-rw---- 1 oracle asmadmin       1544 Jul 29  2019 hc_RLZY1.dat
-rw-r----- 1 oracle oinstall       1536 Aug  6  2019 orapwsjjh
-rw-rw---- 1 oracle asmadmin       1544 Aug  6  2019 hc_sjjh.dat
-rw-r----- 1 oracle asmadmin   10797056 Oct 14  2019 snapcf_sjjh1.f
-rw-r----- 1 oracle oinstall       1536 Mar  1 18:31 orapwsjjh1
-rw-r----- 1 oracle asmadmin 1262486016 Mar  2 08:36 broken0
-rw-r----- 1 oracle asmadmin 1073742336 Mar  2 08:36 broken1
-rw-r----- 1 oracle asmadmin 1073742336 Mar  2 08:36 broken2
-rw-r----- 1 oracle asmadmin 1073742336 Mar  2 08:36 broken3
-rw-r----- 1 oracle asmadmin 1073742336 Mar  2 08:36 broken4
-rw-r----- 1 oracle asmadmin 1073742336 Mar  2 08:36 broken5
-rw-r----- 1 oracle asmadmin 1073742336 Mar  2 08:37 broken6
-rw-r----- 1 oracle asmadmin 1073742336 Mar  2 08:37 broken7
-rw-r----- 1 oracle asmadmin 1073742336 Mar  2 08:37 broken8
-rw-r----- 1 oracle asmadmin 1073742336 Mar  2 08:37 broken9
-rw-r----- 1 oracle asmadmin 1073742336 Mar  2 08:37 broken10
-rw-r----- 1 oracle asmadmin 1073742336 Mar  2 08:37 broken11
-rw-r----- 1 oracle asmadmin 1073742336 Mar  2 08:38 broken12
-rw-r----- 1 oracle asmadmin 1073742336 Mar  2 08:38 broken13
-rw-r----- 1 oracle asmadmin 1073742336 Mar  2 08:38 broken14
-rw-r----- 1 oracle asmadmin 1073742336 Mar  2 08:38 broken15
-rw-r----- 1 oracle asmadmin 1073742336 Mar  2 08:38 broken16
-rw-r----- 1 oracle asmadmin 1073742336 Mar  2 08:38 broken17
-rw-r----- 1 oracle asmadmin 1073742336 Mar  2 08:38 broken18
-rw-r----- 1 oracle asmadmin 1073742336 Mar  2 08:39 broken19
-rw-r----- 1 oracle asmadmin 1073742336 Mar  2 08:39 broken20
-rw-r----- 1 oracle asmadmin 1073742336 Mar  2 08:39 broken21
-rw-r----- 1 oracle asmadmin 1073742336 Mar  2 08:39 broken22
-rw-r----- 1 oracle asmadmin 1073742336 Mar  2 08:39 broken23
-rw-r----- 1 oracle asmadmin 1073742336 Mar  2 08:39 broken24
-rw-r----- 1 oracle asmadmin 1073742336 Mar  2 08:40 broken25
-rw-r----- 1 oracle asmadmin 1073742336 Mar  2 08:40 broken26
-rw-r----- 1 oracle asmadmin 1073742336 Mar  2 08:40 broken27
-rw-r----- 1 oracle asmadmin 1073742336 Mar  2 08:40 broken28
-rw-r----- 1 oracle asmadmin 1073742336 Mar  2 08:40 broken29
-rw-r----- 1 oracle asmadmin 1073742336 Mar  2 08:48 broken59
-rw-r----- 1 oracle asmadmin 1073742336 Mar  2 08:48 broken33
-rw-r----- 1 oracle asmadmin 1073742336 Mar  2 08:48 broken35
-rw-r----- 1 oracle asmadmin 1073742336 Mar  2 08:48 broken34
-rw-r----- 1 oracle asmadmin 1073742336 Mar  2 08:48 broken36
-rw-r----- 1 oracle asmadmin 1073742336 Mar  2 08:49 broken37
-rw-r----- 1 oracle asmadmin 1073742336 Mar  2 08:49 broken39
-rw-r----- 1 oracle asmadmin 1073742336 Mar  2 08:49 broken38
-rw-r----- 1 oracle asmadmin 1073742336 Mar  2 08:49 broken40
-rw-r----- 1 oracle asmadmin 1073742336 Mar  2 08:49 broken41
-rw-r----- 1 oracle asmadmin 1073742336 Mar  2 08:49 broken42
-rw-r----- 1 oracle asmadmin 1073742336 Mar  2 08:49 broken43
-rw-r----- 1 oracle asmadmin 1073742336 Mar  2 08:50 broken44
-rw-r----- 1 oracle asmadmin 1073742336 Mar  2 08:50 broken45
-rw-r----- 1 oracle asmadmin 1073742336 Mar  2 08:50 broken46
-rw-r----- 1 oracle asmadmin 1073742336 Mar  2 08:50 broken47
-rw-r----- 1 oracle asmadmin 1073742336 Mar  2 08:50 broken48
-rw-r----- 1 oracle asmadmin 1073742336 Mar  2 08:50 broken49
-rw-r----- 1 oracle asmadmin 1073742336 Mar  2 08:51 broken51
-rw-r----- 1 oracle asmadmin 1073742336 Mar  2 08:51 broken50
-rw-r----- 1 oracle asmadmin 1073742336 Mar  2 08:51 broken52
-rw-r----- 1 oracle asmadmin 1073742336 Mar  2 08:51 broken53
-rw-r----- 1 oracle asmadmin 1073742336 Mar  2 08:51 broken54
-rw-r----- 1 oracle asmadmin 1073742336 Mar  2 08:51 broken55
-rw-r----- 1 oracle asmadmin 1073742336 Mar  2 08:52 broken57
-rw-r----- 1 oracle asmadmin 1073742336 Mar  2 08:52 broken56
-rw-r----- 1 oracle asmadmin 1073742336 Mar  2 08:52 broken58
-rw-r----- 1 oracle asmadmin 1073742336 Mar  2 09:17 broken32
-rw-r----- 1 oracle asmadmin 1073742336 Mar  2 09:33 broken31
-rw-r----- 1 oracle asmadmin 1262486016 Mar  2 09:49 broken30
-rw-rw---- 1 oracle asmadmin       1544 Mar  2 10:02 hc_sjjh1.dat
-rw-r----- 1 oracle asmadmin   48316416 Jul 21 03:00 snapcf_RLZY1.f

查看文件broken0发现是sjjh数据库与日志文件相关的错误

查看实例的alert.log文件的内容,果然是在写日志文件时出现了错误:

Successful mount of redo thread 1, with mount id 4246975374
Physical Standby Database mounted.
Lost write protection disabled
Errors in file /u01/app/oracle/diag/rdbms/sjjhdg/sjjh1/trace/sjjh1_lgwr_54343.trc:
ORA-00313: open failed for members of log group 1 of thread 1
ORA-00312: online log 1 thread 1: '/u01/app/oracle/product/11.2.0/db_1/dbs/broken0'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/sjjhdg/sjjh1/trace/sjjh1_lgwr_54343.trc:
ORA-00313: open failed for members of log group 1 of thread 1
ORA-00312: online log 1 thread 1: '/u01/app/oracle/product/11.2.0/db_1/dbs/broken0'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/sjjhdg/sjjh1/trace/sjjh1_lgwr_54343.trc:
ORA-00313: open failed for members of log group 2 of thread 1
ORA-00312: online log 2 thread 1: '/u01/app/oracle/product/11.2.0/db_1/dbs/broken1'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/sjjhdg/sjjh1/trace/sjjh1_lgwr_54343.trc:
ORA-00313: open failed for members of log group 2 of thread 1
ORA-00312: online log 2 thread 1: '/u01/app/oracle/product/11.2.0/db_1/dbs/broken1'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/sjjhdg/sjjh1/trace/sjjh1_lgwr_54343.trc:
ORA-00313: open failed for members of log group 3 of thread 1
ORA-00312: online log 3 thread 1: '/u01/app/oracle/product/11.2.0/db_1/dbs/broken2'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/sjjhdg/sjjh1/trace/sjjh1_lgwr_54343.trc:
ORA-00313: open failed for members of log group 3 of thread 1
ORA-00312: online log 3 thread 1: '/u01/app/oracle/product/11.2.0/db_1/dbs/broken2'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/sjjhdg/sjjh1/trace/sjjh1_lgwr_54343.trc:
ORA-00313: open failed for members of log group 4 of thread 1
ORA-00312: online log 4 thread 1: '/u01/app/oracle/product/11.2.0/db_1/dbs/broken3'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/sjjhdg/sjjh1/trace/sjjh1_lgwr_54343.trc:
ORA-00313: open failed for members of log group 4 of thread 1
ORA-00312: online log 4 thread 1: '/u01/app/oracle/product/11.2.0/db_1/dbs/broken3'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/sjjhdg/sjjh1/trace/sjjh1_lgwr_54343.trc:
ORA-00313: open failed for members of log group 5 of thread 1
ORA-00312: online log 5 thread 1: '/u01/app/oracle/product/11.2.0/db_1/dbs/broken4'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/sjjhdg/sjjh1/trace/sjjh1_lgwr_54343.trc:
ORA-00313: open failed for members of log group 5 of thread 1
ORA-00312: online log 5 thread 1: '/u01/app/oracle/product/11.2.0/db_1/dbs/broken4'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/sjjhdg/sjjh1/trace/sjjh1_lgwr_54343.trc:
ORA-00313: open failed for members of log group 6 of thread 1
ORA-00312: online log 6 thread 1: '/u01/app/oracle/product/11.2.0/db_1/dbs/broken5'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/sjjhdg/sjjh1/trace/sjjh1_lgwr_54343.trc:
ORA-00313: open failed for members of log group 6 of thread 1
ORA-00312: online log 6 thread 1: '/u01/app/oracle/product/11.2.0/db_1/dbs/broken5'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/sjjhdg/sjjh1/trace/sjjh1_lgwr_54343.trc:
ORA-00313: open failed for members of log group 7 of thread 1
ORA-00312: online log 7 thread 1: '/u01/app/oracle/product/11.2.0/db_1/dbs/broken6'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/sjjhdg/sjjh1/trace/sjjh1_lgwr_54343.trc:
ORA-00313: open failed for members of log group 7 of thread 1
ORA-00312: online log 7 thread 1: '/u01/app/oracle/product/11.2.0/db_1/dbs/broken6'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/sjjhdg/sjjh1/trace/sjjh1_lgwr_54343.trc:
ORA-00313: open failed for members of log group 8 of thread 1
ORA-00312: online log 8 thread 1: '/u01/app/oracle/product/11.2.0/db_1/dbs/broken7'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/sjjhdg/sjjh1/trace/sjjh1_lgwr_54343.trc:
ORA-00313: open failed for members of log group 8 of thread 1
ORA-00312: online log 8 thread 1: '/u01/app/oracle/product/11.2.0/db_1/dbs/broken7'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/sjjhdg/sjjh1/trace/sjjh1_lgwr_54343.trc:
ORA-00313: open failed for members of log group 9 of thread 1
ORA-00312: online log 9 thread 1: '/u01/app/oracle/product/11.2.0/db_1/dbs/broken8'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/sjjhdg/sjjh1/trace/sjjh1_lgwr_54343.trc:
ORA-00313: open failed for members of log group 9 of thread 1
ORA-00312: online log 9 thread 1: '/u01/app/oracle/product/11.2.0/db_1/dbs/broken8'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/sjjhdg/sjjh1/trace/sjjh1_lgwr_54343.trc:
ORA-00313: open failed for members of log group 10 of thread 1
ORA-00312: online log 10 thread 1: '/u01/app/oracle/product/11.2.0/db_1/dbs/broken9'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/sjjhdg/sjjh1/trace/sjjh1_lgwr_54343.trc:
ORA-00313: open failed for members of log group 10 of thread 1
ORA-00312: online log 10 thread 1: '/u01/app/oracle/product/11.2.0/db_1/dbs/broken9'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/sjjhdg/sjjh1/trace/sjjh1_lgwr_54343.trc:
ORA-00313: open failed for members of log group 11 of thread 1
ORA-00312: online log 11 thread 1: '/u01/app/oracle/product/11.2.0/db_1/dbs/broken10'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/sjjhdg/sjjh1/trace/sjjh1_lgwr_54343.trc:
ORA-00313: open failed for members of log group 11 of thread 1
ORA-00312: online log 11 thread 1: '/u01/app/oracle/product/11.2.0/db_1/dbs/broken10'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/sjjhdg/sjjh1/trace/sjjh1_lgwr_54343.trc:
ORA-00313: open failed for members of log group 12 of thread 1
ORA-00312: online log 12 thread 1: '/u01/app/oracle/product/11.2.0/db_1/dbs/broken11'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/sjjhdg/sjjh1/trace/sjjh1_lgwr_54343.trc:
ORA-00313: open failed for members of log group 12 of thread 1
ORA-00312: online log 12 thread 1: '/u01/app/oracle/product/11.2.0/db_1/dbs/broken11'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/sjjhdg/sjjh1/trace/sjjh1_lgwr_54343.trc:
ORA-00313: open failed for members of log group 13 of thread 1
ORA-00312: online log 13 thread 1: '/u01/app/oracle/product/11.2.0/db_1/dbs/broken12'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/sjjhdg/sjjh1/trace/sjjh1_lgwr_54343.trc:
ORA-00313: open failed for members of log group 13 of thread 1
ORA-00312: online log 13 thread 1: '/u01/app/oracle/product/11.2.0/db_1/dbs/broken12'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/sjjhdg/sjjh1/trace/sjjh1_lgwr_54343.trc:
ORA-00313: open failed for members of log group 14 of thread 1
ORA-00312: online log 14 thread 1: '/u01/app/oracle/product/11.2.0/db_1/dbs/broken13'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/sjjhdg/sjjh1/trace/sjjh1_lgwr_54343.trc:
ORA-00313: open failed for members of log group 14 of thread 1
ORA-00312: online log 14 thread 1: '/u01/app/oracle/product/11.2.0/db_1/dbs/broken13'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/sjjhdg/sjjh1/trace/sjjh1_lgwr_54343.trc:
ORA-00313: open failed for members of log group 15 of thread 1
ORA-00312: online log 15 thread 1: '/u01/app/oracle/product/11.2.0/db_1/dbs/broken14'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/sjjhdg/sjjh1/trace/sjjh1_lgwr_54343.trc:
ORA-00313: open failed for members of log group 15 of thread 1
ORA-00312: online log 15 thread 1: '/u01/app/oracle/product/11.2.0/db_1/dbs/broken14'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/sjjhdg/sjjh1/trace/sjjh1_lgwr_54343.trc:
ORA-00313: open failed for members of log group 16 of thread 1
ORA-00312: online log 16 thread 1: '/u01/app/oracle/product/11.2.0/db_1/dbs/broken15'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/sjjhdg/sjjh1/trace/sjjh1_lgwr_54343.trc:
ORA-00313: open failed for members of log group 16 of thread 1
ORA-00312: online log 16 thread 1: '/u01/app/oracle/product/11.2.0/db_1/dbs/broken15'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/sjjhdg/sjjh1/trace/sjjh1_lgwr_54343.trc:
ORA-00313: open failed for members of log group 17 of thread 1
ORA-00312: online log 17 thread 1: '/u01/app/oracle/product/11.2.0/db_1/dbs/broken16'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/sjjhdg/sjjh1/trace/sjjh1_lgwr_54343.trc:
ORA-00313: open failed for members of log group 17 of thread 1
ORA-00312: online log 17 thread 1: '/u01/app/oracle/product/11.2.0/db_1/dbs/broken16'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/sjjhdg/sjjh1/trace/sjjh1_lgwr_54343.trc:
ORA-00313: open failed for members of log group 18 of thread 1
ORA-00312: online log 18 thread 1: '/u01/app/oracle/product/11.2.0/db_1/dbs/broken17'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/sjjhdg/sjjh1/trace/sjjh1_lgwr_54343.trc:
ORA-00313: open failed for members of log group 18 of thread 1
ORA-00312: online log 18 thread 1: '/u01/app/oracle/product/11.2.0/db_1/dbs/broken17'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/sjjhdg/sjjh1/trace/sjjh1_lgwr_54343.trc:
ORA-00313: open failed for members of log group 19 of thread 1
ORA-00312: online log 19 thread 1: '/u01/app/oracle/product/11.2.0/db_1/dbs/broken18'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/sjjhdg/sjjh1/trace/sjjh1_lgwr_54343.trc:
ORA-00313: open failed for members of log group 19 of thread 1
ORA-00312: online log 19 thread 1: '/u01/app/oracle/product/11.2.0/db_1/dbs/broken18'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/sjjhdg/sjjh1/trace/sjjh1_lgwr_54343.trc:
ORA-00313: open failed for members of log group 20 of thread 1
ORA-00312: online log 20 thread 1: '/u01/app/oracle/product/11.2.0/db_1/dbs/broken19'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/sjjhdg/sjjh1/trace/sjjh1_lgwr_54343.trc:
ORA-00313: open failed for members of log group 20 of thread 1
ORA-00312: online log 20 thread 1: '/u01/app/oracle/product/11.2.0/db_1/dbs/broken19'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/sjjhdg/sjjh1/trace/sjjh1_lgwr_54343.trc:
ORA-00313: open failed for members of log group 21 of thread 1
ORA-00312: online log 21 thread 1: '/u01/app/oracle/product/11.2.0/db_1/dbs/broken20'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/sjjhdg/sjjh1/trace/sjjh1_lgwr_54343.trc:
ORA-00313: open failed for members of log group 21 of thread 1
ORA-00312: online log 21 thread 1: '/u01/app/oracle/product/11.2.0/db_1/dbs/broken20'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/sjjhdg/sjjh1/trace/sjjh1_lgwr_54343.trc:
ORA-00313: open failed for members of log group 22 of thread 1
ORA-00312: online log 22 thread 1: '/u01/app/oracle/product/11.2.0/db_1/dbs/broken21'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/sjjhdg/sjjh1/trace/sjjh1_lgwr_54343.trc:
ORA-00313: open failed for members of log group 22 of thread 1
ORA-00312: online log 22 thread 1: '/u01/app/oracle/product/11.2.0/db_1/dbs/broken21'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/sjjhdg/sjjh1/trace/sjjh1_lgwr_54343.trc:
ORA-00313: open failed for members of log group 23 of thread 1
ORA-00312: online log 23 thread 1: '/u01/app/oracle/product/11.2.0/db_1/dbs/broken22'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/sjjhdg/sjjh1/trace/sjjh1_lgwr_54343.trc:
ORA-00313: open failed for members of log group 23 of thread 1
ORA-00312: online log 23 thread 1: '/u01/app/oracle/product/11.2.0/db_1/dbs/broken22'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/sjjhdg/sjjh1/trace/sjjh1_lgwr_54343.trc:
ORA-00313: open failed for members of log group 24 of thread 1
ORA-00312: online log 24 thread 1: '/u01/app/oracle/product/11.2.0/db_1/dbs/broken23'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/sjjhdg/sjjh1/trace/sjjh1_lgwr_54343.trc:
ORA-00313: open failed for members of log group 24 of thread 1
ORA-00312: online log 24 thread 1: '/u01/app/oracle/product/11.2.0/db_1/dbs/broken23'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/sjjhdg/sjjh1/trace/sjjh1_lgwr_54343.trc:
ORA-00313: open failed for members of log group 25 of thread 1
ORA-00312: online log 25 thread 1: '/u01/app/oracle/product/11.2.0/db_1/dbs/broken24'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/sjjhdg/sjjh1/trace/sjjh1_lgwr_54343.trc:
ORA-00313: open failed for members of log group 25 of thread 1
ORA-00312: online log 25 thread 1: '/u01/app/oracle/product/11.2.0/db_1/dbs/broken24'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/sjjhdg/sjjh1/trace/sjjh1_lgwr_54343.trc:
ORA-00313: open failed for members of log group 26 of thread 1
ORA-00312: online log 26 thread 1: '/u01/app/oracle/product/11.2.0/db_1/dbs/broken25'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/sjjhdg/sjjh1/trace/sjjh1_lgwr_54343.trc:
ORA-00313: open failed for members of log group 26 of thread 1
ORA-00312: online log 26 thread 1: '/u01/app/oracle/product/11.2.0/db_1/dbs/broken25'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/sjjhdg/sjjh1/trace/sjjh1_lgwr_54343.trc:
ORA-00313: open failed for members of log group 27 of thread 1
ORA-00312: online log 27 thread 1: '/u01/app/oracle/product/11.2.0/db_1/dbs/broken26'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/sjjhdg/sjjh1/trace/sjjh1_lgwr_54343.trc:
ORA-00313: open failed for members of log group 27 of thread 1
ORA-00312: online log 27 thread 1: '/u01/app/oracle/product/11.2.0/db_1/dbs/broken26'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/sjjhdg/sjjh1/trace/sjjh1_lgwr_54343.trc:
ORA-00313: open failed for members of log group 28 of thread 1
ORA-00312: online log 28 thread 1: '/u01/app/oracle/product/11.2.0/db_1/dbs/broken27'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/sjjhdg/sjjh1/trace/sjjh1_lgwr_54343.trc:
ORA-00313: open failed for members of log group 28 of thread 1
ORA-00312: online log 28 thread 1: '/u01/app/oracle/product/11.2.0/db_1/dbs/broken27'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/sjjhdg/sjjh1/trace/sjjh1_lgwr_54343.trc:
ORA-00313: open failed for members of log group 29 of thread 1
ORA-00312: online log 29 thread 1: '/u01/app/oracle/product/11.2.0/db_1/dbs/broken28'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/sjjhdg/sjjh1/trace/sjjh1_lgwr_54343.trc:
ORA-00313: open failed for members of log group 29 of thread 1
ORA-00312: online log 29 thread 1: '/u01/app/oracle/product/11.2.0/db_1/dbs/broken28'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/sjjhdg/sjjh1/trace/sjjh1_lgwr_54343.trc:
ORA-00313: open failed for members of log group 30 of thread 1
ORA-00312: online log 30 thread 1: '/u01/app/oracle/product/11.2.0/db_1/dbs/broken29'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/sjjhdg/sjjh1/trace/sjjh1_lgwr_54343.trc:
ORA-00313: open failed for members of log group 30 of thread 1
ORA-00312: online log 30 thread 1: '/u01/app/oracle/product/11.2.0/db_1/dbs/broken29'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/sjjhdg/sjjh1/trace/sjjh1_lgwr_54343.trc:
ORA-00313: open failed for members of log group 31 of thread 1
ORA-00312: online log 31 thread 1: '/u01/app/oracle/product/11.2.0/db_1/dbs/broken30'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/sjjhdg/sjjh1/trace/sjjh1_lgwr_54343.trc:
ORA-00313: open failed for members of log group 31 of thread 1
ORA-00312: online log 31 thread 1: '/u01/app/oracle/product/11.2.0/db_1/dbs/broken30'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/sjjhdg/sjjh1/trace/sjjh1_lgwr_54343.trc:
ORA-00313: open failed for members of log group 32 of thread 1
ORA-00312: online log 32 thread 1: '/u01/app/oracle/product/11.2.0/db_1/dbs/broken31'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/sjjhdg/sjjh1/trace/sjjh1_lgwr_54343.trc:
ORA-00313: open failed for members of log group 32 of thread 1
ORA-00312: online log 32 thread 1: '/u01/app/oracle/product/11.2.0/db_1/dbs/broken31'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/sjjhdg/sjjh1/trace/sjjh1_lgwr_54343.trc:
ORA-00313: open failed for members of log group 33 of thread 1
ORA-00312: online log 33 thread 1: '/u01/app/oracle/product/11.2.0/db_1/dbs/broken32'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/sjjhdg/sjjh1/trace/sjjh1_lgwr_54343.trc:
ORA-00313: open failed for members of log group 33 of thread 1
ORA-00312: online log 33 thread 1: '/u01/app/oracle/product/11.2.0/db_1/dbs/broken32'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/sjjhdg/sjjh1/trace/sjjh1_lgwr_54343.trc:
ORA-00313: open failed for members of log group 34 of thread 1
ORA-00312: online log 34 thread 1: '/u01/app/oracle/product/11.2.0/db_1/dbs/broken33'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/sjjhdg/sjjh1/trace/sjjh1_lgwr_54343.trc:
ORA-00313: open failed for members of log group 34 of thread 1
ORA-00312: online log 34 thread 1: '/u01/app/oracle/product/11.2.0/db_1/dbs/broken33'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/sjjhdg/sjjh1/trace/sjjh1_lgwr_54343.trc:
ORA-00313: open failed for members of log group 35 of thread 1
ORA-00312: online log 35 thread 1: '/u01/app/oracle/product/11.2.0/db_1/dbs/broken34'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/sjjhdg/sjjh1/trace/sjjh1_lgwr_54343.trc:
ORA-00313: open failed for members of log group 35 of thread 1
ORA-00312: online log 35 thread 1: '/u01/app/oracle/product/11.2.0/db_1/dbs/broken34'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/sjjhdg/sjjh1/trace/sjjh1_lgwr_54343.trc:
ORA-00313: open failed for members of log group 36 of thread 1
ORA-00312: online log 36 thread 1: '/u01/app/oracle/product/11.2.0/db_1/dbs/broken35'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/sjjhdg/sjjh1/trace/sjjh1_lgwr_54343.trc:
ORA-00313: open failed for members of log group 36 of thread 1
ORA-00312: online log 36 thread 1: '/u01/app/oracle/product/11.2.0/db_1/dbs/broken35'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/sjjhdg/sjjh1/trace/sjjh1_lgwr_54343.trc:
ORA-00313: open failed for members of log group 37 of thread 1
ORA-00312: online log 37 thread 1: '/u01/app/oracle/product/11.2.0/db_1/dbs/broken36'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/sjjhdg/sjjh1/trace/sjjh1_lgwr_54343.trc:
ORA-00313: open failed for members of log group 37 of thread 1
ORA-00312: online log 37 thread 1: '/u01/app/oracle/product/11.2.0/db_1/dbs/broken36'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/sjjhdg/sjjh1/trace/sjjh1_lgwr_54343.trc:
ORA-00313: open failed for members of log group 38 of thread 1
ORA-00312: online log 38 thread 1: '/u01/app/oracle/product/11.2.0/db_1/dbs/broken37'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/sjjhdg/sjjh1/trace/sjjh1_lgwr_54343.trc:
ORA-00313: open failed for members of log group 38 of thread 1
ORA-00312: online log 38 thread 1: '/u01/app/oracle/product/11.2.0/db_1/dbs/broken37'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/sjjhdg/sjjh1/trace/sjjh1_lgwr_54343.trc:
ORA-00313: open failed for members of log group 39 of thread 1
ORA-00312: online log 39 thread 1: '/u01/app/oracle/product/11.2.0/db_1/dbs/broken38'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/sjjhdg/sjjh1/trace/sjjh1_lgwr_54343.trc:
ORA-00313: open failed for members of log group 39 of thread 1
ORA-00312: online log 39 thread 1: '/u01/app/oracle/product/11.2.0/db_1/dbs/broken38'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/sjjhdg/sjjh1/trace/sjjh1_lgwr_54343.trc:
ORA-00313: open failed for members of log group 40 of thread 1
ORA-00312: online log 40 thread 1: '/u01/app/oracle/product/11.2.0/db_1/dbs/broken39'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/sjjhdg/sjjh1/trace/sjjh1_lgwr_54343.trc:
ORA-00313: open failed for members of log group 40 of thread 1
ORA-00312: online log 40 thread 1: '/u01/app/oracle/product/11.2.0/db_1/dbs/broken39'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/sjjhdg/sjjh1/trace/sjjh1_lgwr_54343.trc:
ORA-00313: open failed for members of log group 41 of thread 1
ORA-00312: online log 41 thread 1: '/u01/app/oracle/product/11.2.0/db_1/dbs/broken40'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/sjjhdg/sjjh1/trace/sjjh1_lgwr_54343.trc:
ORA-00313: open failed for members of log group 41 of thread 1
ORA-00312: online log 41 thread 1: '/u01/app/oracle/product/11.2.0/db_1/dbs/broken40'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/sjjhdg/sjjh1/trace/sjjh1_lgwr_54343.trc:
ORA-00313: open failed for members of log group 42 of thread 1
ORA-00312: online log 42 thread 1: '/u01/app/oracle/product/11.2.0/db_1/dbs/broken41'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/sjjhdg/sjjh1/trace/sjjh1_lgwr_54343.trc:
ORA-00313: open failed for members of log group 42 of thread 1
ORA-00312: online log 42 thread 1: '/u01/app/oracle/product/11.2.0/db_1/dbs/broken41'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/sjjhdg/sjjh1/trace/sjjh1_lgwr_54343.trc:
ORA-00313: open failed for members of log group 43 of thread 1
ORA-00312: online log 43 thread 1: '/u01/app/oracle/product/11.2.0/db_1/dbs/broken42'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/sjjhdg/sjjh1/trace/sjjh1_lgwr_54343.trc:
ORA-00313: open failed for members of log group 43 of thread 1
ORA-00312: online log 43 thread 1: '/u01/app/oracle/product/11.2.0/db_1/dbs/broken42'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/sjjhdg/sjjh1/trace/sjjh1_lgwr_54343.trc:
ORA-00313: open failed for members of log group 44 of thread 1
ORA-00312: online log 44 thread 1: '/u01/app/oracle/product/11.2.0/db_1/dbs/broken43'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/sjjhdg/sjjh1/trace/sjjh1_lgwr_54343.trc:
ORA-00313: open failed for members of log group 44 of thread 1
ORA-00312: online log 44 thread 1: '/u01/app/oracle/product/11.2.0/db_1/dbs/broken43'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/sjjhdg/sjjh1/trace/sjjh1_lgwr_54343.trc:
ORA-00313: open failed for members of log group 45 of thread 1
ORA-00312: online log 45 thread 1: '/u01/app/oracle/product/11.2.0/db_1/dbs/broken44'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/sjjhdg/sjjh1/trace/sjjh1_lgwr_54343.trc:
ORA-00313: open failed for members of log group 45 of thread 1
ORA-00312: online log 45 thread 1: '/u01/app/oracle/product/11.2.0/db_1/dbs/broken44'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/sjjhdg/sjjh1/trace/sjjh1_lgwr_54343.trc:
ORA-00313: open failed for members of log group 46 of thread 1
ORA-00312: online log 46 thread 1: '/u01/app/oracle/product/11.2.0/db_1/dbs/broken45'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/sjjhdg/sjjh1/trace/sjjh1_lgwr_54343.trc:
ORA-00313: open failed for members of log group 46 of thread 1
ORA-00312: online log 46 thread 1: '/u01/app/oracle/product/11.2.0/db_1/dbs/broken45'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/sjjhdg/sjjh1/trace/sjjh1_lgwr_54343.trc:
ORA-00313: open failed for members of log group 47 of thread 1
ORA-00312: online log 47 thread 1: '/u01/app/oracle/product/11.2.0/db_1/dbs/broken46'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/sjjhdg/sjjh1/trace/sjjh1_lgwr_54343.trc:
ORA-00313: open failed for members of log group 47 of thread 1
ORA-00312: online log 47 thread 1: '/u01/app/oracle/product/11.2.0/db_1/dbs/broken46'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/sjjhdg/sjjh1/trace/sjjh1_lgwr_54343.trc:
ORA-00313: open failed for members of log group 48 of thread 1
ORA-00312: online log 48 thread 1: '/u01/app/oracle/product/11.2.0/db_1/dbs/broken47'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/sjjhdg/sjjh1/trace/sjjh1_lgwr_54343.trc:
ORA-00313: open failed for members of log group 48 of thread 1
ORA-00312: online log 48 thread 1: '/u01/app/oracle/product/11.2.0/db_1/dbs/broken47'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/sjjhdg/sjjh1/trace/sjjh1_lgwr_54343.trc:
ORA-00313: open failed for members of log group 49 of thread 1
ORA-00312: online log 49 thread 1: '/u01/app/oracle/product/11.2.0/db_1/dbs/broken48'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/sjjhdg/sjjh1/trace/sjjh1_lgwr_54343.trc:
ORA-00313: open failed for members of log group 49 of thread 1
ORA-00312: online log 49 thread 1: '/u01/app/oracle/product/11.2.0/db_1/dbs/broken48'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/sjjhdg/sjjh1/trace/sjjh1_lgwr_54343.trc:
ORA-00313: open failed for members of log group 50 of thread 1
ORA-00312: online log 50 thread 1: '/u01/app/oracle/product/11.2.0/db_1/dbs/broken49'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/sjjhdg/sjjh1/trace/sjjh1_lgwr_54343.trc:
ORA-00313: open failed for members of log group 50 of thread 1
ORA-00312: online log 50 thread 1: '/u01/app/oracle/product/11.2.0/db_1/dbs/broken49'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/sjjhdg/sjjh1/trace/sjjh1_lgwr_54343.trc:
ORA-00313: open failed for members of log group 51 of thread 1
ORA-00312: online log 51 thread 1: '/u01/app/oracle/product/11.2.0/db_1/dbs/broken50'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/sjjhdg/sjjh1/trace/sjjh1_lgwr_54343.trc:
ORA-00313: open failed for members of log group 51 of thread 1
ORA-00312: online log 51 thread 1: '/u01/app/oracle/product/11.2.0/db_1/dbs/broken50'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/sjjhdg/sjjh1/trace/sjjh1_lgwr_54343.trc:
ORA-00313: open failed for members of log group 52 of thread 1
ORA-00312: online log 52 thread 1: '/u01/app/oracle/product/11.2.0/db_1/dbs/broken51'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/sjjhdg/sjjh1/trace/sjjh1_lgwr_54343.trc:
ORA-00313: open failed for members of log group 52 of thread 1
ORA-00312: online log 52 thread 1: '/u01/app/oracle/product/11.2.0/db_1/dbs/broken51'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/sjjhdg/sjjh1/trace/sjjh1_lgwr_54343.trc:
ORA-00313: open failed for members of log group 53 of thread 1
ORA-00312: online log 53 thread 1: '/u01/app/oracle/product/11.2.0/db_1/dbs/broken52'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/sjjhdg/sjjh1/trace/sjjh1_lgwr_54343.trc:
ORA-00313: open failed for members of log group 53 of thread 1
ORA-00312: online log 53 thread 1: '/u01/app/oracle/product/11.2.0/db_1/dbs/broken52'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/sjjhdg/sjjh1/trace/sjjh1_lgwr_54343.trc:
ORA-00313: open failed for members of log group 54 of thread 1
ORA-00312: online log 54 thread 1: '/u01/app/oracle/product/11.2.0/db_1/dbs/broken53'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/sjjhdg/sjjh1/trace/sjjh1_lgwr_54343.trc:
ORA-00313: open failed for members of log group 54 of thread 1
ORA-00312: online log 54 thread 1: '/u01/app/oracle/product/11.2.0/db_1/dbs/broken53'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/sjjhdg/sjjh1/trace/sjjh1_lgwr_54343.trc:
ORA-00313: open failed for members of log group 55 of thread 1
ORA-00312: online log 55 thread 1: '/u01/app/oracle/product/11.2.0/db_1/dbs/broken54'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/sjjhdg/sjjh1/trace/sjjh1_lgwr_54343.trc:
ORA-00313: open failed for members of log group 55 of thread 1
ORA-00312: online log 55 thread 1: '/u01/app/oracle/product/11.2.0/db_1/dbs/broken54'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/sjjhdg/sjjh1/trace/sjjh1_lgwr_54343.trc:
ORA-00313: open failed for members of log group 56 of thread 1
ORA-00312: online log 56 thread 1: '/u01/app/oracle/product/11.2.0/db_1/dbs/broken55'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/sjjhdg/sjjh1/trace/sjjh1_lgwr_54343.trc:
ORA-00313: open failed for members of log group 56 of thread 1
ORA-00312: online log 56 thread 1: '/u01/app/oracle/product/11.2.0/db_1/dbs/broken55'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/sjjhdg/sjjh1/trace/sjjh1_lgwr_54343.trc:
ORA-00313: open failed for members of log group 57 of thread 1
ORA-00312: online log 57 thread 1: '/u01/app/oracle/product/11.2.0/db_1/dbs/broken56'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/sjjhdg/sjjh1/trace/sjjh1_lgwr_54343.trc:
ORA-00313: open failed for members of log group 57 of thread 1
ORA-00312: online log 57 thread 1: '/u01/app/oracle/product/11.2.0/db_1/dbs/broken56'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/sjjhdg/sjjh1/trace/sjjh1_lgwr_54343.trc:
ORA-00313: open failed for members of log group 58 of thread 1
ORA-00312: online log 58 thread 1: '/u01/app/oracle/product/11.2.0/db_1/dbs/broken57'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/sjjhdg/sjjh1/trace/sjjh1_lgwr_54343.trc:
ORA-00313: open failed for members of log group 58 of thread 1
ORA-00312: online log 58 thread 1: '/u01/app/oracle/product/11.2.0/db_1/dbs/broken57'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/sjjhdg/sjjh1/trace/sjjh1_lgwr_54343.trc:
ORA-00313: open failed for members of log group 59 of thread 1
ORA-00312: online log 59 thread 1: '/u01/app/oracle/product/11.2.0/db_1/dbs/broken58'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/sjjhdg/sjjh1/trace/sjjh1_lgwr_54343.trc:
ORA-00313: open failed for members of log group 59 of thread 1
ORA-00312: online log 59 thread 1: '/u01/app/oracle/product/11.2.0/db_1/dbs/broken58'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/sjjhdg/sjjh1/trace/sjjh1_lgwr_54343.trc:
ORA-00313: open failed for members of log group 60 of thread 1
ORA-00312: online log 60 thread 1: '/u01/app/oracle/product/11.2.0/db_1/dbs/broken59'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/sjjhdg/sjjh1/trace/sjjh1_lgwr_54343.trc:
ORA-00313: open failed for members of log group 60 of thread 1
ORA-00312: online log 60 thread 1: '/u01/app/oracle/product/11.2.0/db_1/dbs/broken59'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
Completed: ALTER DATABASE MOUNT
ARC3: Archival started
ARC0: STARTING ARCH PROCESSES COMPLETE
Mon Mar 02 08:35:50 2020
alter database open
AUDIT_TRAIL initialization parameter is changed to OS, as DB is NOT compatible for database opened with read-only access
查看主库的alert.log文件发现主库不能将日志同步到备库,原因是因为主备库之间网络故障
Mon Mar 02 01:17:22 2020
Thread 1 cannot allocate new log, sequence 3357
Private strand flush not complete
Current log# 11 seq# 3356 mem# 0: /oradata/sjjh/redo11.log
LGWR: Standby redo logfile selected for thread 1 sequence 3357 for destination LOG_ARCHIVE_DEST_2
Thread 1 advanced to log sequence 3357 (LGWR switch)
Current log# 12 seq# 3357 mem# 0: /oradata/sjjh/redo12.log
Mon Mar 02 01:17:29 2020
Archived Log entry 6342 added for thread 1 sequence 3356 ID 0xfc687662 dest 1:
Mon Mar 02 02:00:00 2020
Closing scheduler window
Closing Resource Manager plan via scheduler window
Clearing Resource Manager plan via parameter
Mon Mar 02 02:33:30 2020
Thread 1 cannot allocate new log, sequence 3358
Private strand flush not complete
Current log# 12 seq# 3357 mem# 0: /oradata/sjjh/redo12.log
LGWR: Standby redo logfile selected for thread 1 sequence 3358 for destination LOG_ARCHIVE_DEST_2
Thread 1 advanced to log sequence 3358 (LGWR switch)
Current log# 13 seq# 3358 mem# 0: /oradata/sjjh/redo13.log
Mon Mar 02 02:33:38 2020
Archived Log entry 6344 added for thread 1 sequence 3357 ID 0xfc687662 dest 1:
Mon Mar 02 03:45:12 2020
Thread 1 cannot allocate new log, sequence 3359
Private strand flush not complete
Current log# 13 seq# 3358 mem# 0: /oradata/sjjh/redo13.log
LGWR: Standby redo logfile selected for thread 1 sequence 3359 for destination LOG_ARCHIVE_DEST_2
Thread 1 advanced to log sequence 3359 (LGWR switch)
Current log# 14 seq# 3359 mem# 0: /oradata/sjjh/redo14.log
Mon Mar 02 03:45:19 2020
Archived Log entry 6346 added for thread 1 sequence 3358 ID 0xfc687662 dest 1:
Mon Mar 02 08:24:54 2020
LGWR: Attempting destination LOG_ARCHIVE_DEST_2 network reconnect (3113)
LGWR: Destination LOG_ARCHIVE_DEST_2 network reconnect abandoned
Error 3113 for archive log file 14 to 'jhk_st'
LGWR: Error 1041 disconnecting from destination LOG_ARCHIVE_DEST_2 standby host 'jhk_st'
Destination LOG_ARCHIVE_DEST_2 is UNSYNCHRONIZED
Thread 1 cannot allocate new log, sequence 3360
Private strand flush not complete
Current log# 14 seq# 3359 mem# 0: /oradata/sjjh/redo14.log
LGWR: Failed to archive log 14 thread 1 sequence 3359 (3113)
Thread 1 advanced to log sequence 3360 (LGWR switch)
Current log# 15 seq# 3360 mem# 0: /oradata/sjjh/redo15.log
Mon Mar 02 08:25:01 2020
Archived Log entry 6347 added for thread 1 sequence 3359 ID 0xfc687662 dest 1:
Mon Mar 02 08:30:31 2020
Thread 1 cannot allocate new log, sequence 3361
Private strand flush not complete
Current log# 15 seq# 3360 mem# 0: /oradata/sjjh/redo15.log
Mon Mar 02 08:30:52 2020
LGWR: Standby redo logfile selected for thread 1 sequence 3361 for destination LOG_ARCHIVE_DEST_2
Thread 1 advanced to log sequence 3361 (LGWR switch)
Current log# 16 seq# 3361 mem# 0: /oradata/sjjh/redo16.log
Mon Mar 02 08:30:52 2020
Archived Log entry 6349 added for thread 1 sequence 3360 ID 0xfc687662 dest 1:
Mon Mar 02 08:30:52 2020
ARC0: Standby redo logfile selected for thread 1 sequence 3360 for destination LOG_ARCHIVE_DEST_2
Mon Mar 02 08:54:23 2020
LGWR: Attempting destination LOG_ARCHIVE_DEST_2 network reconnect (272)
LGWR: Destination LOG_ARCHIVE_DEST_2 network reconnect abandoned
Error 272 for archive log file 16 to 'jhk_st'
Mon Mar 02 08:55:04 2020
Thread 1 cannot allocate new log, sequence 3362
Private strand flush not complete
Current log# 16 seq# 3361 mem# 0: /oradata/sjjh/redo16.log
LGWR: Failed to archive log 16 thread 1 sequence 3361 (272)
Thread 1 advanced to log sequence 3362 (LGWR switch)
Current log# 17 seq# 3362 mem# 0: /oradata/sjjh/redo17.log
Mon Mar 02 08:55:07 2020
Archived Log entry 6351 added for thread 1 sequence 3361 ID 0xfc687662 dest 1:
Mon Mar 02 09:00:04 2020
ARC3: Standby redo logfile selected for thread 1 sequence 3361 for destination LOG_ARCHIVE_DEST_2
Mon Mar 02 09:00:04 2020
Thread 1 cannot allocate new log, sequence 3363
Private strand flush not complete
Current log# 17 seq# 3362 mem# 0: /oradata/sjjh/redo17.log
Destination LOG_ARCHIVE_DEST_2 is SYNCHRONIZED
LGWR: Standby redo logfile selected for thread 1 sequence 3363 for destination LOG_ARCHIVE_DEST_2
Thread 1 advanced to log sequence 3363 (LGWR switch)
Current log# 18 seq# 3363 mem# 0: /oradata/sjjh/redo18.log
Mon Mar 02 09:00:08 2020
Archived Log entry 6353 added for thread 1 sequence 3362 ID 0xfc687662 dest 1:
ARC3: Standby redo logfile selected for thread 1 sequence 3362 for destination LOG_ARCHIVE_DEST_2
Mon Mar 02 09:13:31 2020
LGWR: Attempting destination LOG_ARCHIVE_DEST_2 network reconnect (3113)
LGWR: Destination LOG_ARCHIVE_DEST_2 network reconnect abandoned
Error 3113 for archive log file 18 to 'jhk_st'
LGWR: Error 1041 disconnecting from destination LOG_ARCHIVE_DEST_2 standby host 'jhk_st'
Destination LOG_ARCHIVE_DEST_2 is UNSYNCHRONIZED
Thread 1 cannot allocate new log, sequence 3364
Private strand flush not complete
Current log# 18 seq# 3363 mem# 0: /oradata/sjjh/redo18.log
LGWR: Failed to archive log 18 thread 1 sequence 3363 (3113)
Thread 1 advanced to log sequence 3364 (LGWR switch)
Current log# 19 seq# 3364 mem# 0: /oradata/sjjh/redo19.log
Mon Mar 02 09:13:36 2020
Archived Log entry 6355 added for thread 1 sequence 3363 ID 0xfc687662 dest 1:
Mon Mar 02 09:14:42 2020
ALTER SYSTEM SET log_archive_dest_state_2='ENABLE' SCOPE=MEMORY SID='*';
Mon Mar 02 09:14:43 2020
ARC3: Standby redo logfile selected for thread 1 sequence 3363 for destination LOG_ARCHIVE_DEST_2
Mon Mar 02 09:14:45 2020
Thread 1 cannot allocate new log, sequence 3365
Private strand flush not complete
Current log# 19 seq# 3364 mem# 0: /oradata/sjjh/redo19.log
Destination LOG_ARCHIVE_DEST_2 is SYNCHRONIZED
LGWR: Standby redo logfile selected for thread 1 sequence 3365 for destination LOG_ARCHIVE_DEST_2
Thread 1 advanced to log sequence 3365 (LGWR switch)
Current log# 20 seq# 3365 mem# 0: /oradata/sjjh/redo20.log
Mon Mar 02 09:14:48 2020
Archived Log entry 6357 added for thread 1 sequence 3364 ID 0xfc687662 dest 1:
Mon Mar 02 09:16:14 2020
LGWR: Attempting destination LOG_ARCHIVE_DEST_2 network reconnect (272)
LGWR: Destination LOG_ARCHIVE_DEST_2 network reconnect abandoned
Error 272 for archive log file 20 to 'jhk_st'
Destination LOG_ARCHIVE_DEST_2 is UNSYNCHRONIZED
Thread 1 cannot allocate new log, sequence 3366
Private strand flush not complete
Current log# 20 seq# 3365 mem# 0: /oradata/sjjh/redo20.log
LGWR: Failed to archive log 20 thread 1 sequence 3365 (272)
Thread 1 advanced to log sequence 3366 (LGWR switch)
Current log# 21 seq# 3366 mem# 0: /oradata/sjjh/redo21.log
Mon Mar 02 09:16:19 2020
Archived Log entry 6359 added for thread 1 sequence 3365 ID 0xfc687662 dest 1:
Mon Mar 02 09:22:07 2020
Thread 1 cannot allocate new log, sequence 3367
Private strand flush not complete
Current log# 21 seq# 3366 mem# 0: /oradata/sjjh/redo21.log
Destination LOG_ARCHIVE_DEST_2 is SYNCHRONIZED
LGWR: Standby redo logfile selected for thread 1 sequence 3367 for destination LOG_ARCHIVE_DEST_2
Thread 1 advanced to log sequence 3367 (LGWR switch)
Current log# 22 seq# 3367 mem# 0: /oradata/sjjh/redo22.log
Mon Mar 02 09:22:10 2020
Archived Log entry 6361 added for thread 1 sequence 3366 ID 0xfc687662 dest 1:
Mon Mar 02 09:29:22 2020
LGWR: Attempting destination LOG_ARCHIVE_DEST_2 network reconnect (3113)
LGWR: Destination LOG_ARCHIVE_DEST_2 network reconnect abandoned
Error 3113 for archive log file 22 to 'jhk_st'
LGWR: Error 1041 disconnecting from destination LOG_ARCHIVE_DEST_2 standby host 'jhk_st'
Destination LOG_ARCHIVE_DEST_2 is UNSYNCHRONIZED
Thread 1 cannot allocate new log, sequence 3368
Private strand flush not complete
Current log# 22 seq# 3367 mem# 0: /oradata/sjjh/redo22.log
LGWR: Failed to archive log 22 thread 1 sequence 3367 (3113)
Thread 1 advanced to log sequence 3368 (LGWR switch)
Current log# 23 seq# 3368 mem# 0: /oradata/sjjh/redo23.log
Mon Mar 02 09:29:26 2020
Archived Log entry 6363 added for thread 1 sequence 3367 ID 0xfc687662 dest 1:
Mon Mar 02 09:30:04 2020
ALTER SYSTEM SET log_archive_dest_state_2='ENABLE' SCOPE=MEMORY SID='*';
Mon Mar 02 09:30:05 2020
ARC3: Standby redo logfile selected for thread 1 sequence 3367 for destination LOG_ARCHIVE_DEST_2
Mon Mar 02 09:30:05 2020
Thread 1 cannot allocate new log, sequence 3369
Private strand flush not complete
Current log# 23 seq# 3368 mem# 0: /oradata/sjjh/redo23.log
Suppressing further error logging of LOG_ARCHIVE_DEST_2.
FAL[server, ARC3]: FAL archive failed, see trace file.
ARCH: FAL archive failed. Archiver continuing
ORACLE Instance sjjh - Archival Error. Archiver continuing.
Destination LOG_ARCHIVE_DEST_2 is SYNCHRONIZED
LGWR: Standby redo logfile selected for thread 1 sequence 3369 for destination LOG_ARCHIVE_DEST_2
Thread 1 advanced to log sequence 3369 (LGWR switch)
Current log# 24 seq# 3369 mem# 0: /oradata/sjjh/redo24.log
Mon Mar 02 09:30:08 2020
Archived Log entry 6365 added for thread 1 sequence 3368 ID 0xfc687662 dest 1:
ARC3: Standby redo logfile selected for thread 1 sequence 3368 for destination LOG_ARCHIVE_DEST_2
Mon Mar 02 09:31:27 2020
Suppressing further error logging of LOG_ARCHIVE_DEST_2.
Suppressing further error logging of LOG_ARCHIVE_DEST_2.
Suppressing further error logging of LOG_ARCHIVE_DEST_2.
Destination LOG_ARCHIVE_DEST_2 is UNSYNCHRONIZED
Thread 1 cannot allocate new log, sequence 3370
Private strand flush not complete
Current log# 24 seq# 3369 mem# 0: /oradata/sjjh/redo24.log
LGWR: Failed to archive log 24 thread 1 sequence 3369 (272)
Thread 1 advanced to log sequence 3370 (LGWR switch)
Current log# 25 seq# 3370 mem# 0: /oradata/sjjh/redo25.log
Mon Mar 02 09:31:33 2020
Archived Log entry 6367 added for thread 1 sequence 3369 ID 0xfc687662 dest 1:
Mon Mar 02 09:37:09 2020
Thread 1 cannot allocate new log, sequence 3371
Private strand flush not complete
Current log# 25 seq# 3370 mem# 0: /oradata/sjjh/redo25.log
Destination LOG_ARCHIVE_DEST_2 is SYNCHRONIZED
LGWR: Standby redo logfile selected for thread 1 sequence 3371 for destination LOG_ARCHIVE_DEST_2
Thread 1 advanced to log sequence 3371 (LGWR switch)
Current log# 26 seq# 3371 mem# 0: /oradata/sjjh/redo26.log
Mon Mar 02 09:37:12 2020
Archived Log entry 6369 added for thread 1 sequence 3370 ID 0xfc687662 dest 1:
Mon Mar 02 09:37:12 2020
ARC3: Standby redo logfile selected for thread 1 sequence 3370 for destination LOG_ARCHIVE_DEST_2
Mon Mar 02 09:42:26 2020
Destination LOG_ARCHIVE_DEST_2 is UNSYNCHRONIZED
Thread 1 cannot allocate new log, sequence 3372
Private strand flush not complete
Current log# 26 seq# 3371 mem# 0: /oradata/sjjh/redo26.log
LGWR: Failed to archive log 26 thread 1 sequence 3371 (3113)
Thread 1 advanced to log sequence 3372 (LGWR switch)
Current log# 27 seq# 3372 mem# 0: /oradata/sjjh/redo27.log
Mon Mar 02 09:42:31 2020
Archived Log entry 6371 added for thread 1 sequence 3371 ID 0xfc687662 dest 1:
Mon Mar 02 09:44:23 2020
ALTER SYSTEM SET log_archive_dest_state_2='ENABLE' SCOPE=MEMORY SID='*';
Mon Mar 02 09:44:23 2020
ARC0: Standby redo logfile selected for thread 1 sequence 3371 for destination LOG_ARCHIVE_DEST_2
Mon Mar 02 09:44:25 2020
Thread 1 cannot allocate new log, sequence 3373
Private strand flush not complete
Current log# 27 seq# 3372 mem# 0: /oradata/sjjh/redo27.log
Destination LOG_ARCHIVE_DEST_2 is SYNCHRONIZED
LGWR: Standby redo logfile selected for thread 1 sequence 3373 for destination LOG_ARCHIVE_DEST_2
Thread 1 advanced to log sequence 3373 (LGWR switch)
Current log# 28 seq# 3373 mem# 0: /oradata/sjjh/redo28.log
Mon Mar 02 09:44:28 2020
Archived Log entry 6373 added for thread 1 sequence 3372 ID 0xfc687662 dest 1:
Mon Mar 02 09:44:28 2020
ARC3: Standby redo logfile selected for thread 1 sequence 3372 for destination LOG_ARCHIVE_DEST_2
Mon Mar 02 09:45:34 2020
Thread 1 cannot allocate new log, sequence 3374
Private strand flush not complete
Current log# 28 seq# 3373 mem# 0: /oradata/sjjh/redo28.log
LGWR: Standby redo logfile selected for thread 1 sequence 3374 for destination LOG_ARCHIVE_DEST_2
Thread 1 advanced to log sequence 3374 (LGWR switch)
Current log# 29 seq# 3374 mem# 0: /oradata/sjjh/redo29.log
Mon Mar 02 09:45:35 2020
Archived Log entry 6376 added for thread 1 sequence 3373 ID 0xfc687662 dest 1:
Mon Mar 02 13:45:51 2020
LGWR: Standby redo logfile selected for thread 1 sequence 3375 for destination LOG_ARCHIVE_DEST_2
Thread 1 advanced to log sequence 3375 (LGWR switch)
Current log# 30 seq# 3375 mem# 0: /oradata/sjjh/redo30.log
Mon Mar 02 13:45:55 2020
Archived Log entry 6378 added for thread 1 sequence 3374 ID 0xfc687662 dest 1:
Mon Mar 02 13:47:12 2020
Thread 1 cannot allocate new log, sequence 3376
Private strand flush not complete
Current log# 30 seq# 3375 mem# 0: /oradata/sjjh/redo30.log
Destination LOG_ARCHIVE_DEST_2 no longer supports SYNCHRONIZATION
Thread 1 advanced to log sequence 3376 (LGWR switch)
Current log# 1 seq# 3376 mem# 0: /oradata/sjjh/redo01.log
Mon Mar 02 13:47:19 2020
Archived Log entry 6380 added for thread 1 sequence 3375 ID 0xfc687662 dest 1:
Mon Mar 02 22:00:00 2020
Setting Resource Manager plan SCHEDULER[0x32D9]:DEFAULT_MAINTENANCE_PLAN via scheduler window
Setting Resource Manager plan DEFAULT_MAINTENANCE_PLAN via parameter
Mon Mar 02 22:00:00 2020
Starting background process VKRM
Mon Mar 02 22:00:00 2020
VKRM started with pid=47, OS id=81983
Mon Mar 02 22:00:02 2020
Begin automatic SQL Tuning Advisor run for special tuning task "SYS_AUTO_SQL_TUNING_TASK"
Mon Mar 02 22:01:00 2020
End automatic SQL Tuning Advisor run for special tuning task "SYS_AUTO_SQL_TUNING_TASK"
Tue Mar 03 00:38:04 2020
Thread 1 cannot allocate new log, sequence 3377
Private strand flush not complete
Current log# 1 seq# 3376 mem# 0: /oradata/sjjh/redo01.log
Destination LOG_ARCHIVE_DEST_2 is SYNCHRONIZED
LGWR: Standby redo logfile selected for thread 1 sequence 3377 for destination LOG_ARCHIVE_DEST_2
Thread 1 advanced to log sequence 3377 (LGWR switch)
Current log# 2 seq# 3377 mem# 0: /oradata/sjjh/redo02.log
Tue Mar 03 00:38:12 2020
Archived Log entry 6382 added for thread 1 sequence 3376 ID 0xfc687662 dest 1:
Tue Mar 03 00:40:10 2020
LGWR: Standby redo logfile selected for thread 1 sequence 3378 for destination LOG_ARCHIVE_DEST_2
Thread 1 advanced to log sequence 3378 (LGWR switch)
Current log# 3 seq# 3378 mem# 0: /oradata/sjjh/redo03.log

明白原因之后现在可以删除dbs目录中的broker*文件来释放空间

Oracle Linux 7.1 silent install 19C RAC

一·系统环境规则
1.1网络架构

                                    节点1                    节点2
主机名                               19c1                     19c2 
Private IP                          10.10.10.141             10.10.10.142 
Public IP                           10.13.13.141             10.13.13.142
VIP                                 10.13.13.143             10.13.13.144
SCANIP                              10.13.13.145/146/147 
SCAN_NAME                           scan-19c

1.2 存储

共享磁盘         ASM磁盘                ASM磁盘组              大小              冗余
/dev/sdb        /dev/asmdisk1          OCR                   50G               外部
/dev/sdc       /dev/asmdisk2           DATA                  60G               外部

1.3 软件版本

操作系统:Oracle Linux 7.1
集群软件: Oracle Clusterware 19.3.0
数据库软件:Oracle Database Enterprise 19.3.0

二·安装环境准备
2.1修改主机名和IP地址
修改主机名

[root@localhost ~]# hostnamectl set-hostname 19c1
[root@localhost ~]# hostnamectl set-hostname 19c2

2.2修改Private IP地址

[root@19c1 ~]# cat /etc/sysconfig/network-scripts/ifcfg-ens192
HWADDR=00:50:56:A3:10:82
TYPE=Ethernet
BOOTPROTO=none
IPADDR=10.10.10.141
PREFIX=24
GATEWAY=10.10.10.1
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=no
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
NAME=ens192
UUID=7d9faf7c-d74c-41da-b02e-8703dfb8ef20
DEVICE=ens192
ONBOOT=no

[root@19c2 ~]# cat /etc/sysconfig/network-scripts/ifcfg-ens192
TYPE=Ethernet
BOOTPROTO=none
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
NAME=ens192
UUID=752d38b2-aa25-4f94-9232-df2edb36ed79
ONBOOT=yes
DEVICE=ens192
IPADDR=10.10.10.142
PREFIX=24
GATEWAY=10.10.10.1
IPV6_PEERDNS=yes
IPV6_PEERROUTES=yes

2.3 修改Public IP地址

[root@19c1 ~]# cat /etc/sysconfig/network-scripts/ifcfg-ens160
TYPE=Ethernet
BOOTPROTO=none
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=no
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
NAME=ens160
UUID=073349c5-40bc-4a0d-b1e6-44a935689d41
DEVICE=ens160
ONBOOT=yes
IPV6_PEERDNS=yes
IPV6_PEERROUTES=yes
IPV6_PRIVACY=no
IPADDR=10.13.13.141
PREFIX=24
GATEWAY=10.13.13.254

[root@19c2 ~]# cat /etc/sysconfig/network-scripts/ifcfg-ens160
TYPE=Ethernet
BOOTPROTO=none
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=no
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
NAME=ens160
UUID=073349c5-40bc-4a0d-b1e6-44a935689d41
DEVICE=ens160
ONBOOT=yes
IPV6_PEERDNS=yes
IPV6_PEERROUTES=yes
IPV6_PRIVACY=no
IPADDR=10.13.13.142
PREFIX=24
GATEWAY=10.13.13.254

2.4 关闭时间同步服务

[root@19c1 ~]# systemctl stop chronyd
[root@19c1 ~]# systemctl disable chronyd
rm '/etc/systemd/system/multi-user.target.wants/chronyd.service'
[root@19c1 ~]# mv /etc/chrony.conf /etc/chrony.conf.bak

[root@19c2 ~]# systemctl stop chronyd
[root@19c2 ~]# systemctl disable chronyd
rm '/etc/systemd/system/multi-user.target.wants/chronyd.service'
[root@19c2 ~]# mv /etc/chrony.conf /etc/chrony.conf.bak

2.5关闭防火墙和SELinux

[root@19c1 ~]# systemctl stop firewalld
[root@19c1 ~]# systemctl disable firewalld
rm '/etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service'
rm '/etc/systemd/system/basic.target.wants/firewalld.service'
[root@19c1 ~]# setenforce 0
[root@19c1 ~]# sed -i "/^SELINUX=/s#enforcing#disabled#" /etc/selinux/config
[root@19c1 ~]# cat /etc/selinux/config

# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - No SELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE= can take one of three two values:
# targeted - Targeted processes are protected,
# minimum - Modification of targeted policy. Only selected processes are protected. 
# mls - Multi Level Security protection.
SELINUXTYPE=targeted


[root@19c2 ~]# systemctl stop chronyd
[root@19c2 ~]# systemctl disable chronyd
rm '/etc/systemd/system/multi-user.target.wants/chronyd.service'
[root@19c2 ~]# mv /etc/chrony.conf /etc/chrony.conf.bak
[root@19c2 ~]# setenforce 0
[root@19c2 ~]# sed -i "/^SELINUX=/s#enforcing#disabled#" /etc/selinux/config
[root@19c2 ~]# cat /etc/selinux/config

# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - No SELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE= can take one of three two values:
# targeted - Targeted processes are protected,
# minimum - Modification of targeted policy. Only selected processes are protected. 
# mls - Multi Level Security protection.
SELINUXTYPE=targeted

2.6 配置本地YUM

[root@19c1 ~]# ls -lrt /etc/yum.repos.d/
total 4
-rw-r--r--. 1 root root 2323 Feb 16 2015 public-yum-ol7.repo

[root@19c1 ~]# mv /etc/yum.repos.d/public-yum-ol7.repo /etc/yum.repos.d/public-yum-ol7.repo.bak
[root@19c1 ~]# mount /dev/sr0 /mnt/
mount: /dev/sr0 is write-protected, mounting read-only
[root@19c1 ~]# cat >> /etc/yum.repos.d/jy.repo < [base]
> name=jy
> baseurl=file:///mnt
> enabled=1
> gpgcheck=0
> multilib_policy=all
> EOF
[root@19c1 ~]# cat /etc/yum.repos.d/jy.repo
[base]
name=jy
baseurl=file:///mnt
enabled=1
gpgcheck=0
multilib_policy=all
[root@19c1 ~]# yum clean all
Loaded plugins: langpacks
Cleaning repos: base ol7_UEKR3 ol7_latest
Cleaning up everything
[root@19c1 ~]# yum makecache
Loaded plugins: langpacks
base | 3.6 kB 00:00:00 
(1/4): base/group_gz | 134 kB 00:00:00 
(2/4): base/filelists_db | 3.4 MB 00:00:00 
(3/4): base/primary_db | 4.0 MB 00:00:00 
(4/4): base/other_db | 1.3 MB 00:00:00 
Metadata Cache Created

[root@19c2 ~]# ls -lrt /etc/yum.repos.d/
total 4
-rw-r--r--. 1 root root 2323 Feb 16 2015 public-yum-ol7.repo
[root@19c2 ~]# mv /etc/yum.repos.d/public-yum-ol7.repo /etc/yum.repos.d/public-yum-ol7.repo.bak
[root@19c2 ~]# mount /dev/sr0 /mnt/
mount: /dev/sr0 is write-protected, mounting read-only
[root@19c2 ~]# cat >> /etc/yum.repos.d/jy.repo < [base]
> name=jy
> baseurl=file:///mnt
> enabled=1
> gpgcheck=0
> multilib_policy=all
> EOF
[root@19c2 ~]# cat /etc/yum.repos.d/jy.repo
[base]
name=jy
baseurl=file:///mnt
enabled=1
gpgcheck=0
multilib_policy=all
[root@19c2 ~]# yum clean all
Loaded plugins: langpacks
Cleaning repos: base
Cleaning up everything

[root@19c2 ~]# yum makecache
Loaded plugins: langpacks
base | 3.6 kB 00:00:00 
(1/4): base/group_gz | 134 kB 00:00:00 
(2/4): base/filelists_db | 3.4 MB 00:00:00 
(3/4): base/primary_db | 4.0 MB 00:00:00 
(4/4): base/other_db | 1.3 MB 00:00:00 
Metadata Cache Created

2.7 禁用NTP

[root@19c1 ~]# systemctl stop ntpd.service
[root@19c1 ~]# systemctl disable ntpd.service

[root@19c2 ~]# systemctl stop ntpd.service
[root@19c2 ~]# systemctl disable ntpd.service

2.8创建用户和组
创建用户组

[root@19c1 ~]# systemctl stop ntpd.service
[root@19c1 ~]# systemctl disable ntpd.service
[root@19c1 ~]# groupadd -g 54321 oinstall
[root@19c1 ~]# groupadd -g 54322 dba
[root@19c1 ~]# groupadd -g 54323 oper
[root@19c1 ~]# groupadd -g 54324 backupdba
[root@19c1 ~]# groupadd -g 54325 dgdba
[root@19c1 ~]# groupadd -g 54326 kmdba
[root@19c1 ~]# groupadd -g 54327 asmdba
[root@19c1 ~]# groupadd -g 54328 asmoper
[root@19c1 ~]# groupadd -g 54329 asmadmin
[root@19c1 ~]# groupadd -g 54330 racdba

[root@19c1 ~]# grep 543 /etc/group
dba:x:54322:
oper:x:54323:
backupdba:x:54324:
dgdba:x:54325:
kmdba:x:54326:
asmdba:x:54327:
asmoper:x:54328:
asmadmin:x:54329:
racdba:x:54330:
oinstall:x:54321:

[root@19c2 ~]# groupadd -g 54321 oinstall
[root@19c2 ~]# groupadd -g 54322 dba
[root@19c2 ~]# groupadd -g 54323 oper
[root@19c2 ~]# groupadd -g 54324 backupdba
[root@19c2 ~]# groupadd -g 54325 dgdba
[root@19c2 ~]# groupadd -g 54326 kmdba
[root@19c2 ~]# groupadd -g 54327 asmdba
[root@19c2 ~]# groupadd -g 54328 asmoper
[root@19c2 ~]# groupadd -g 54329 asmadmin
[root@19c2 ~]# groupadd -g 54330 racdba

[root@19c2 ~]# grep 543 /etc/group
dba:x:54322:
oper:x:54323:
backupdba:x:54324:
dgdba:x:54325:
kmdba:x:54326:
asmdba:x:54327:
asmoper:x:54328:
asmadmin:x:54329:
racdba:x:54330:
oinstall:x:54321:

创建用户

[root@19c1 ~]# useradd -u 54322 -g oinstall -G asmadmin,asmdba,asmoper,racdba grid
[root@19c1 ~]# useradd -g oinstall -G dba,asmdba,backupdba,dgdba,kmdba,racdba,oper oracle
[root@19c1 ~]# passwd grid
Changing password for user grid.
New password: 
Retype new password: 
passwd: all authentication tokens updated successfully.
[root@19c1 ~]# passwd oracle
Changing password for user oracle.
New password: 
Retype new password: 
passwd: all authentication tokens updated successfully.

[root@19c2 ~]# useradd -u 54322 -g oinstall -G asmadmin,asmdba,asmoper,racdba grid
[root@19c2 ~]# useradd -g oinstall -G dba,asmdba,backupdba,dgdba,kmdba,racdba,oper oracle
[root@19c2 ~]# passwd grid
Changing password for user grid.
New password: 
Retype new password: 
passwd: all authentication tokens updated successfully.
[root@19c2 ~]# passwd oracle
Changing password for user oracle.
New password: 
Retype new password: 
passwd: all authentication tokens updated successfully.
[root@19c2 ~]#

2.9创建相关目录

[root@19c1 ~]# mkdir -p /u01/tmp
[root@19c1 ~]# mkdir -p /u01/app/19.3/grid
[root@19c1 ~]# mkdir -p /u01/app/grid
[root@19c1 ~]# mkdir -p /u01/app/oracle/product/19.3/db
[root@19c1 ~]# mkdir -p /u01/app/oraInventory
[root@19c1 ~]# chown -R grid:oinstall /u01
[root@19c1 ~]# chown oracle:oinstall /u01/app/oracle
[root@19c1 ~]# chmod -R 775 /u01/

[root@19c2 ~]# mkdir -p /u01/tmp
[root@19c2 ~]# mkdir -p /u01/app/19.3/grid
[root@19c2 ~]# mkdir -p /u01/app/grid
[root@19c2 ~]# mkdir -p /u01/app/oracle/product/19.3/db
[root@19c2 ~]# mkdir -p /u01/app/oraInventory
[root@19c2 ~]# chown -R grid:oinstall /u01
[root@19c2 ~]# chown oracle:oinstall /u01/app/oracle
[root@19c2 ~]# chmod -R 775 /u01/

2.10 安装软件包

[root@19c1 ~]# yum install -y bc binutils compat-libcap1 compat-libstdc++ elfutils-libelf elfutils-libelf-devel fontconfig-devel glibc glibc-devel ksh libaio libaio-devel libX11 libXau libXi libXtst libXrender libXrender-devel libgcc libstdc++ libstdc++-devel libxcb make net-tools nfs-utils python python-configshell python-rtslib python-six targetcli smartmontools sysstat gcc c-c++ gcc-info gcc-locale gcc48 gcc48-info gcc48-locale gcc48-c++
Loaded plugins: langpacks
Package bc-1.06.95-13.el7.x86_64 already installed and latest version
Package binutils-2.23.52.0.1-30.el7.x86_64 already installed and latest version
Package compat-libcap1-1.10-7.el7.x86_64 already installed and latest version
No package compat-libstdc++ available. --后面要单独安装这个包
Package elfutils-libelf-0.160-1.el7.x86_64 already installed and latest version
Package glibc-2.17-78.0.1.el7.x86_64 already installed and latest version
Package glibc-devel-2.17-78.0.1.el7.x86_64 already installed and latest version
Package libaio-0.3.109-12.el7.x86_64 already installed and latest version
Package libX11-1.6.0-2.1.el7.x86_64 already installed and latest version
Package libXau-1.0.8-2.1.el7.x86_64 already installed and latest version
Package libXi-1.7.2-2.1.el7.x86_64 already installed and latest version
Package libXtst-1.2.2-2.1.el7.x86_64 already installed and latest version
Package libXrender-0.9.8-2.1.el7.x86_64 already installed and latest version
Package libgcc-4.8.3-9.el7.x86_64 already installed and latest version
Package libstdc++-4.8.3-9.el7.x86_64 already installed and latest version
Package libstdc++-devel-4.8.3-9.el7.x86_64 already installed and latest version
Package libxcb-1.9-5.el7.x86_64 already installed and latest version
Package 1:make-3.82-21.el7.x86_64 already installed and latest version
Package net-tools-2.0-0.17.20131004git.el7.x86_64 already installed and latest version
Package 1:nfs-utils-1.3.0-0.8.el7.x86_64 already installed and latest version
Package python-2.7.5-16.el7.x86_64 already installed and latest version
Package 1:python-configshell-1.1.fb14-1.el7.noarch already installed and latest version
Package python-rtslib-2.1.fb50-1.el7.noarch already installed and latest version
Package python-six-1.3.0-4.el7.noarch already installed and latest version
Package targetcli-2.1.fb37-3.el7.noarch already installed and latest version
Package 1:smartmontools-6.2-4.el7.x86_64 already installed and latest version
Package sysstat-10.1.5-7.el7.x86_64 already installed and latest version
Package gcc-4.8.3-9.el7.x86_64 already installed and latest version
No package c-c++ available.
No package gcc-info available.
No package gcc-locale available.
No package gcc48 available.
No package gcc48-info available.
No package gcc48-locale available.
No package gcc48-c++ available.
Resolving Dependencies
--> Running transaction check
---> Package elfutils-libelf-devel.x86_64 0:0.160-1.el7 will be installed
---> Package fontconfig-devel.x86_64 0:2.10.95-7.el7 will be installed
--> Processing Dependency: freetype-devel >= 2.1.4 for package: fontconfig-devel-2.10.95-7.el7.x86_64
--> Processing Dependency: pkgconfig(freetype2) for package: fontconfig-devel-2.10.95-7.el7.x86_64
--> Processing Dependency: pkgconfig(expat) for package: fontconfig-devel-2.10.95-7.el7.x86_64
---> Package ksh.x86_64 0:20120801-22.el7 will be installed
---> Package libXrender-devel.x86_64 0:0.9.8-2.1.el7 will be installed
--> Processing Dependency: pkgconfig(renderproto) >= 0.9 for package: libXrender-devel-0.9.8-2.1.el7.x86_64
--> Processing Dependency: pkgconfig(xproto) for package: libXrender-devel-0.9.8-2.1.el7.x86_64
--> Processing Dependency: pkgconfig(x11) for package: libXrender-devel-0.9.8-2.1.el7.x86_64
---> Package libaio-devel.x86_64 0:0.3.109-12.el7 will be installed
--> Running transaction check
---> Package expat-devel.x86_64 0:2.1.0-8.el7 will be installed
---> Package freetype-devel.x86_64 0:2.4.11-9.el7 will be installed
--> Processing Dependency: zlib-devel for package: freetype-devel-2.4.11-9.el7.x86_64
---> Package libX11-devel.x86_64 0:1.6.0-2.1.el7 will be installed
--> Processing Dependency: pkgconfig(xcb) >= 1.1.92 for package: libX11-devel-1.6.0-2.1.el7.x86_64
--> Processing Dependency: pkgconfig(xcb) for package: libX11-devel-1.6.0-2.1.el7.x86_64
---> Package xorg-x11-proto-devel.noarch 0:7.7-8.el7.1 will be installed
--> Running transaction check
---> Package libxcb-devel.x86_64 0:1.9-5.el7 will be installed
--> Processing Dependency: pkgconfig(xau) >= 0.99.2 for package: libxcb-devel-1.9-5.el7.x86_64
---> Package zlib-devel.x86_64 0:1.2.7-13.el7 will be installed
--> Running transaction check
---> Package libXau-devel.x86_64 0:1.0.8-2.1.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

============================================================================================================================================================================================================================================
Package Arch Version Repository Size
============================================================================================================================================================================================================================================
Installing:
elfutils-libelf-devel x86_64 0.160-1.el7 base 34 k
fontconfig-devel x86_64 2.10.95-7.el7 base 127 k
ksh x86_64 20120801-22.el7 base 879 k
libXrender-devel x86_64 0.9.8-2.1.el7 base 16 k
libaio-devel x86_64 0.3.109-12.el7 base 12 k
Installing for dependencies:
expat-devel x86_64 2.1.0-8.el7 base 56 k
freetype-devel x86_64 2.4.11-9.el7 base 354 k
libX11-devel x86_64 1.6.0-2.1.el7 base 978 k
libXau-devel x86_64 1.0.8-2.1.el7 base 14 k
libxcb-devel x86_64 1.9-5.el7 base 1.0 M
xorg-x11-proto-devel noarch 7.7-8.el7.1 base 280 k
zlib-devel x86_64 1.2.7-13.el7 base 49 k

Transaction Summary
============================================================================================================================================================================================================================================
Install 5 Packages (+7 Dependent packages)

Total download size: 3.7 M
Installed size: 12 M
Downloading packages:
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total 13 MB/s | 3.7 MB 00:00:00 
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : xorg-x11-proto-devel-7.7-8.el7.1.noarch 1/12 
Installing : libXau-devel-1.0.8-2.1.el7.x86_64 2/12 
Installing : libxcb-devel-1.9-5.el7.x86_64 3/12 
Installing : libX11-devel-1.6.0-2.1.el7.x86_64 4/12 
Installing : expat-devel-2.1.0-8.el7.x86_64 5/12 
Installing : zlib-devel-1.2.7-13.el7.x86_64 6/12 
Installing : freetype-devel-2.4.11-9.el7.x86_64 7/12 
Installing : fontconfig-devel-2.10.95-7.el7.x86_64 8/12 
Installing : libXrender-devel-0.9.8-2.1.el7.x86_64 9/12 
Installing : libaio-devel-0.3.109-12.el7.x86_64 10/12 
Installing : elfutils-libelf-devel-0.160-1.el7.x86_64 11/12 
Installing : ksh-20120801-22.el7.x86_64 12/12 
Verifying : ksh-20120801-22.el7.x86_64 1/12 
Verifying : libXrender-devel-0.9.8-2.1.el7.x86_64 2/12 
Verifying : zlib-devel-1.2.7-13.el7.x86_64 3/12 
Verifying : libxcb-devel-1.9-5.el7.x86_64 4/12 
Verifying : libX11-devel-1.6.0-2.1.el7.x86_64 5/12 
Verifying : expat-devel-2.1.0-8.el7.x86_64 6/12 
Verifying : xorg-x11-proto-devel-7.7-8.el7.1.noarch 7/12 
Verifying : elfutils-libelf-devel-0.160-1.el7.x86_64 8/12 
Verifying : libaio-devel-0.3.109-12.el7.x86_64 9/12 
Verifying : fontconfig-devel-2.10.95-7.el7.x86_64 10/12 
Verifying : freetype-devel-2.4.11-9.el7.x86_64 11/12 
Verifying : libXau-devel-1.0.8-2.1.el7.x86_64 12/12

Installed:
elfutils-libelf-devel.x86_64 0:0.160-1.el7 fontconfig-devel.x86_64 0:2.10.95-7.el7 ksh.x86_64 0:20120801-22.el7 libXrender-devel.x86_64 0:0.9.8-2.1.el7 libaio-devel.x86_64 0:0.3.109-12.el7

Dependency Installed:
expat-devel.x86_64 0:2.1.0-8.el7 freetype-devel.x86_64 0:2.4.11-9.el7 libX11-devel.x86_64 0:1.6.0-2.1.el7 libXau-devel.x86_64 0:1.0.8-2.1.el7 libxcb-devel.x86_64 0:1.9-5.el7 xorg-x11-proto-devel.noarch 0:7.7-8.el7.1 
zlib-devel.x86_64 0:1.2.7-13.el7

Complete!

安装compat-libstdc++-33-3.2.3-72.el7.i686.rpm,因为名字带有版本信息

[root@19c1 ~]# yum install compat-libstdc++-33-3.2.3-72.el7.i686
Loaded plugins: langpacks
Resolving Dependencies
--> Running transaction check
---> Package compat-libstdc++-33.i686 0:3.2.3-72.el7 will be installed
--> Processing Dependency: libm.so.6 for package: compat-libstdc++-33-3.2.3-72.el7.i686
--> Processing Dependency: libgcc_s.so.1(GLIBC_2.0) for package: compat-libstdc++-33-3.2.3-72.el7.i686
--> Processing Dependency: libgcc_s.so.1(GCC_3.3) for package: compat-libstdc++-33-3.2.3-72.el7.i686
--> Processing Dependency: libgcc_s.so.1(GCC_3.0) for package: compat-libstdc++-33-3.2.3-72.el7.i686
--> Processing Dependency: libgcc_s.so.1 for package: compat-libstdc++-33-3.2.3-72.el7.i686
--> Processing Dependency: libc.so.6(GLIBC_2.3) for package: compat-libstdc++-33-3.2.3-72.el7.i686
--> Running transaction check
---> Package glibc.i686 0:2.17-78.0.1.el7 will be installed
--> Processing Dependency: libfreebl3.so(NSSRAWHASH_3.12.3) for package: glibc-2.17-78.0.1.el7.i686
--> Processing Dependency: libfreebl3.so for package: glibc-2.17-78.0.1.el7.i686
---> Package libgcc.i686 0:4.8.3-9.el7 will be installed
--> Running transaction check
---> Package nss-softokn-freebl.i686 0:3.16.2.3-9.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

============================================================================================================================================================================================================================================
Package Arch Version Repository Size
============================================================================================================================================================================================================================================
Installing:
compat-libstdc++-33 i686 3.2.3-72.el7 base 196 k
Installing for dependencies:
glibc i686 2.17-78.0.1.el7 base 4.2 M
libgcc i686 4.8.3-9.el7 base 99 k
nss-softokn-freebl i686 3.16.2.3-9.el7 base 186 k

Transaction Summary
============================================================================================================================================================================================================================================
Install 1 Package (+3 Dependent packages)

Total download size: 4.6 M
Installed size: 16 M
Is this ok [y/d/N]: y
Downloading packages:
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total 26 MB/s | 4.6 MB 00:00:00 
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : libgcc-4.8.3-9.el7.i686 1/4 
Installing : nss-softokn-freebl-3.16.2.3-9.el7.i686 2/4 
Installing : glibc-2.17-78.0.1.el7.i686 3/4 
Installing : compat-libstdc++-33-3.2.3-72.el7.i686 4/4 
Verifying : compat-libstdc++-33-3.2.3-72.el7.i686 1/4 
Verifying : glibc-2.17-78.0.1.el7.i686 2/4 
Verifying : libgcc-4.8.3-9.el7.i686 3/4 
Verifying : nss-softokn-freebl-3.16.2.3-9.el7.i686 4/4

Installed:
compat-libstdc++-33.i686 0:3.2.3-72.el7

Dependency Installed:
glibc.i686 0:2.17-78.0.1.el7 libgcc.i686 0:4.8.3-9.el7 nss-softokn-freebl.i686 0:3.16.2.3-9.el7

Complete!


[root@19c2 ~]# yum install -y bc binutils compat-libcap1 compat-libstdc++ elfutils-libelf elfutils-libelf-devel fontconfig-devel glibc glibc-devel ksh libaio libaio-devel libX11 libXau libXi libXtst libXrender libXrender-devel libgcc libstdc++ libstdc++-devel libxcb make net-tools nfs-utils python python-configshell python-rtslib python-six targetcli smartmontools sysstat gcc c-c++ gcc-info gcc-locale gcc48 gcc48-info gcc48-locale gcc48-c++
Loaded plugins: langpacks
Package bc-1.06.95-13.el7.x86_64 already installed and latest version
Package binutils-2.23.52.0.1-30.el7.x86_64 already installed and latest version
Package compat-libcap1-1.10-7.el7.x86_64 already installed and latest version
No package compat-libstdc++ available. --后面要单独安装这个包
Package elfutils-libelf-0.160-1.el7.x86_64 already installed and latest version
Package glibc-2.17-78.0.1.el7.x86_64 already installed and latest version
Package glibc-devel-2.17-78.0.1.el7.x86_64 already installed and latest version
Package libaio-0.3.109-12.el7.x86_64 already installed and latest version
Package libX11-1.6.0-2.1.el7.x86_64 already installed and latest version
Package libXau-1.0.8-2.1.el7.x86_64 already installed and latest version
Package libXi-1.7.2-2.1.el7.x86_64 already installed and latest version
Package libXtst-1.2.2-2.1.el7.x86_64 already installed and latest version
Package libXrender-0.9.8-2.1.el7.x86_64 already installed and latest version
Package libgcc-4.8.3-9.el7.x86_64 already installed and latest version
Package libstdc++-4.8.3-9.el7.x86_64 already installed and latest version
Package libstdc++-devel-4.8.3-9.el7.x86_64 already installed and latest version
Package libxcb-1.9-5.el7.x86_64 already installed and latest version
Package 1:make-3.82-21.el7.x86_64 already installed and latest version
Package net-tools-2.0-0.17.20131004git.el7.x86_64 already installed and latest version
Package 1:nfs-utils-1.3.0-0.8.el7.x86_64 already installed and latest version
Package python-2.7.5-16.el7.x86_64 already installed and latest version
Package 1:python-configshell-1.1.fb14-1.el7.noarch already installed and latest version
Package python-rtslib-2.1.fb50-1.el7.noarch already installed and latest version
Package python-six-1.3.0-4.el7.noarch already installed and latest version
Package targetcli-2.1.fb37-3.el7.noarch already installed and latest version
Package 1:smartmontools-6.2-4.el7.x86_64 already installed and latest version
Package sysstat-10.1.5-7.el7.x86_64 already installed and latest version
Package gcc-4.8.3-9.el7.x86_64 already installed and latest version
No package c-c++ available.
No package gcc-info available.
No package gcc-locale available.
No package gcc48 available.
No package gcc48-info available.
No package gcc48-locale available.
No package gcc48-c++ available.
Resolving Dependencies
--> Running transaction check
---> Package elfutils-libelf-devel.x86_64 0:0.160-1.el7 will be installed
---> Package fontconfig-devel.x86_64 0:2.10.95-7.el7 will be installed
--> Processing Dependency: freetype-devel >= 2.1.4 for package: fontconfig-devel-2.10.95-7.el7.x86_64
--> Processing Dependency: pkgconfig(freetype2) for package: fontconfig-devel-2.10.95-7.el7.x86_64
--> Processing Dependency: pkgconfig(expat) for package: fontconfig-devel-2.10.95-7.el7.x86_64
---> Package ksh.x86_64 0:20120801-22.el7 will be installed
---> Package libXrender-devel.x86_64 0:0.9.8-2.1.el7 will be installed
--> Processing Dependency: pkgconfig(renderproto) >= 0.9 for package: libXrender-devel-0.9.8-2.1.el7.x86_64
--> Processing Dependency: pkgconfig(xproto) for package: libXrender-devel-0.9.8-2.1.el7.x86_64
--> Processing Dependency: pkgconfig(x11) for package: libXrender-devel-0.9.8-2.1.el7.x86_64
---> Package libaio-devel.x86_64 0:0.3.109-12.el7 will be installed
--> Running transaction check
---> Package expat-devel.x86_64 0:2.1.0-8.el7 will be installed
---> Package freetype-devel.x86_64 0:2.4.11-9.el7 will be installed
--> Processing Dependency: zlib-devel for package: freetype-devel-2.4.11-9.el7.x86_64
---> Package libX11-devel.x86_64 0:1.6.0-2.1.el7 will be installed
--> Processing Dependency: pkgconfig(xcb) >= 1.1.92 for package: libX11-devel-1.6.0-2.1.el7.x86_64
--> Processing Dependency: pkgconfig(xcb) for package: libX11-devel-1.6.0-2.1.el7.x86_64
---> Package xorg-x11-proto-devel.noarch 0:7.7-8.el7.1 will be installed
--> Running transaction check
---> Package libxcb-devel.x86_64 0:1.9-5.el7 will be installed
--> Processing Dependency: pkgconfig(xau) >= 0.99.2 for package: libxcb-devel-1.9-5.el7.x86_64
---> Package zlib-devel.x86_64 0:1.2.7-13.el7 will be installed
--> Running transaction check
---> Package libXau-devel.x86_64 0:1.0.8-2.1.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

============================================================================================================================================================================================================================================
Package Arch Version Repository Size
============================================================================================================================================================================================================================================
Installing:
elfutils-libelf-devel x86_64 0.160-1.el7 base 34 k
fontconfig-devel x86_64 2.10.95-7.el7 base 127 k
ksh x86_64 20120801-22.el7 base 879 k
libXrender-devel x86_64 0.9.8-2.1.el7 base 16 k
libaio-devel x86_64 0.3.109-12.el7 base 12 k
Installing for dependencies:
expat-devel x86_64 2.1.0-8.el7 base 56 k
freetype-devel x86_64 2.4.11-9.el7 base 354 k
libX11-devel x86_64 1.6.0-2.1.el7 base 978 k
libXau-devel x86_64 1.0.8-2.1.el7 base 14 k
libxcb-devel x86_64 1.9-5.el7 base 1.0 M
xorg-x11-proto-devel noarch 7.7-8.el7.1 base 280 k
zlib-devel x86_64 1.2.7-13.el7 base 49 k

Transaction Summary
============================================================================================================================================================================================================================================
Install 5 Packages (+7 Dependent packages)

Total download size: 3.7 M
Installed size: 12 M
Downloading packages:
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total 8.1 MB/s | 3.7 MB 00:00:00 
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : xorg-x11-proto-devel-7.7-8.el7.1.noarch 1/12 
Installing : libXau-devel-1.0.8-2.1.el7.x86_64 2/12 
Installing : libxcb-devel-1.9-5.el7.x86_64 3/12 
Installing : libX11-devel-1.6.0-2.1.el7.x86_64 4/12 
Installing : expat-devel-2.1.0-8.el7.x86_64 5/12 
Installing : zlib-devel-1.2.7-13.el7.x86_64 6/12 
Installing : freetype-devel-2.4.11-9.el7.x86_64 7/12 
Installing : fontconfig-devel-2.10.95-7.el7.x86_64 8/12 
Installing : libXrender-devel-0.9.8-2.1.el7.x86_64 9/12 
Installing : libaio-devel-0.3.109-12.el7.x86_64 10/12 
Installing : elfutils-libelf-devel-0.160-1.el7.x86_64 11/12 
Installing : ksh-20120801-22.el7.x86_64 12/12 
Verifying : ksh-20120801-22.el7.x86_64 1/12 
Verifying : libXrender-devel-0.9.8-2.1.el7.x86_64 2/12 
Verifying : zlib-devel-1.2.7-13.el7.x86_64 3/12 
Verifying : libxcb-devel-1.9-5.el7.x86_64 4/12 
Verifying : libX11-devel-1.6.0-2.1.el7.x86_64 5/12 
Verifying : expat-devel-2.1.0-8.el7.x86_64 6/12 
Verifying : xorg-x11-proto-devel-7.7-8.el7.1.noarch 7/12 
Verifying : elfutils-libelf-devel-0.160-1.el7.x86_64 8/12 
Verifying : libaio-devel-0.3.109-12.el7.x86_64 9/12 
Verifying : fontconfig-devel-2.10.95-7.el7.x86_64 10/12 
Verifying : freetype-devel-2.4.11-9.el7.x86_64 11/12 
Verifying : libXau-devel-1.0.8-2.1.el7.x86_64 12/12

Installed:
elfutils-libelf-devel.x86_64 0:0.160-1.el7 fontconfig-devel.x86_64 0:2.10.95-7.el7 ksh.x86_64 0:20120801-22.el7 libXrender-devel.x86_64 0:0.9.8-2.1.el7 libaio-devel.x86_64 0:0.3.109-12.el7

Dependency Installed:
expat-devel.x86_64 0:2.1.0-8.el7 freetype-devel.x86_64 0:2.4.11-9.el7 libX11-devel.x86_64 0:1.6.0-2.1.el7 libXau-devel.x86_64 0:1.0.8-2.1.el7 libxcb-devel.x86_64 0:1.9-5.el7 xorg-x11-proto-devel.noarch 0:7.7-8.el7.1 
zlib-devel.x86_64 0:1.2.7-13.el7

Complete!

安装compat-libstdc++-33-3.2.3-72.el7.i686.rpm,因为名字带有版本信息

[root@19c2 ~]# yum install compat-libstdc++-33-3.2.3-72.el7.i686
Loaded plugins: langpacks
Resolving Dependencies
--> Running transaction check
---> Package compat-libstdc++-33.i686 0:3.2.3-72.el7 will be installed
--> Processing Dependency: libm.so.6 for package: compat-libstdc++-33-3.2.3-72.el7.i686
--> Processing Dependency: libgcc_s.so.1(GLIBC_2.0) for package: compat-libstdc++-33-3.2.3-72.el7.i686
--> Processing Dependency: libgcc_s.so.1(GCC_3.3) for package: compat-libstdc++-33-3.2.3-72.el7.i686
--> Processing Dependency: libgcc_s.so.1(GCC_3.0) for package: compat-libstdc++-33-3.2.3-72.el7.i686
--> Processing Dependency: libgcc_s.so.1 for package: compat-libstdc++-33-3.2.3-72.el7.i686
--> Processing Dependency: libc.so.6(GLIBC_2.3) for package: compat-libstdc++-33-3.2.3-72.el7.i686
--> Running transaction check
---> Package glibc.i686 0:2.17-78.0.1.el7 will be installed
--> Processing Dependency: libfreebl3.so(NSSRAWHASH_3.12.3) for package: glibc-2.17-78.0.1.el7.i686
--> Processing Dependency: libfreebl3.so for package: glibc-2.17-78.0.1.el7.i686
---> Package libgcc.i686 0:4.8.3-9.el7 will be installed
--> Running transaction check
---> Package nss-softokn-freebl.i686 0:3.16.2.3-9.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

============================================================================================================================================================================================================================================
Package Arch Version Repository Size
============================================================================================================================================================================================================================================
Installing:
compat-libstdc++-33 i686 3.2.3-72.el7 base 196 k
Installing for dependencies:
glibc i686 2.17-78.0.1.el7 base 4.2 M
libgcc i686 4.8.3-9.el7 base 99 k
nss-softokn-freebl i686 3.16.2.3-9.el7 base 186 k

Transaction Summary
============================================================================================================================================================================================================================================
Install 1 Package (+3 Dependent packages)

Total download size: 4.6 M
Installed size: 16 M
Is this ok [y/d/N]: y
Downloading packages:
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total 74 MB/s | 4.6 MB 00:00:00 
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : libgcc-4.8.3-9.el7.i686 1/4 
Installing : nss-softokn-freebl-3.16.2.3-9.el7.i686 2/4 
Installing : glibc-2.17-78.0.1.el7.i686 3/4 
Installing : compat-libstdc++-33-3.2.3-72.el7.i686 4/4 
Verifying : compat-libstdc++-33-3.2.3-72.el7.i686 1/4 
Verifying : glibc-2.17-78.0.1.el7.i686 2/4 
Verifying : libgcc-4.8.3-9.el7.i686 3/4 
Verifying : nss-softokn-freebl-3.16.2.3-9.el7.i686 4/4

Installed:
compat-libstdc++-33.i686 0:3.2.3-72.el7

Dependency Installed:
glibc.i686 0:2.17-78.0.1.el7 libgcc.i686 0:4.8.3-9.el7 nss-softokn-freebl.i686 0:3.16.2.3-9.el7

Complete!

检查已经安装的软件包

[root@19c1 ~]# rpm -q --qf '%{NAME}-%{VERSION}-%{RELEASE} (%{ARCH})\n' bc binutils compat-libcap1 compat-libstdc++ elfutils-libelf elfutils-libelf-devel fontconfig-devel glibc glibc-devel ksh libaio libaio-devel libX11 libXau libXi libXtst libXrender libXrender-devel libgcc libstdc++ libstdc++-devel libxcb make net-tools nfs-utils python python-configshell python-rtslib python-six targetcli smartmontools sysstat
bc-1.06.95-13.el7 (x86_64)
binutils-2.23.52.0.1-30.el7 (x86_64)
compat-libcap1-1.10-7.el7 (x86_64)
package compat-libstdc++ is not installed
elfutils-libelf-0.160-1.el7 (x86_64)
elfutils-libelf-devel-0.160-1.el7 (x86_64)
fontconfig-devel-2.10.95-7.el7 (x86_64)
glibc-2.17-78.0.1.el7 (x86_64)
glibc-2.17-78.0.1.el7 (i686)
glibc-devel-2.17-78.0.1.el7 (x86_64)
ksh-20120801-22.el7 (x86_64)
libaio-0.3.109-12.el7 (x86_64)
libaio-devel-0.3.109-12.el7 (x86_64)
libX11-1.6.0-2.1.el7 (x86_64)
libXau-1.0.8-2.1.el7 (x86_64)
libXi-1.7.2-2.1.el7 (x86_64)
libXtst-1.2.2-2.1.el7 (x86_64)
libXrender-0.9.8-2.1.el7 (x86_64)
libXrender-devel-0.9.8-2.1.el7 (x86_64)
libgcc-4.8.3-9.el7 (x86_64)
libgcc-4.8.3-9.el7 (i686)
libstdc++-4.8.3-9.el7 (x86_64)
libstdc++-devel-4.8.3-9.el7 (x86_64)
libxcb-1.9-5.el7 (x86_64)
make-3.82-21.el7 (x86_64)
net-tools-2.0-0.17.20131004git.el7 (x86_64)
nfs-utils-1.3.0-0.8.el7 (x86_64)
python-2.7.5-16.el7 (x86_64)
python-configshell-1.1.fb14-1.el7 (noarch)
python-rtslib-2.1.fb50-1.el7 (noarch)
python-six-1.3.0-4.el7 (noarch)
targetcli-2.1.fb37-3.el7 (noarch)
smartmontools-6.2-4.el7 (x86_64)
sysstat-10.1.5-7.el7 (x86_64)

[root@19c2 ~]# rpm -q --qf '%{NAME}-%{VERSION}-%{RELEASE} (%{ARCH})\n' bc binutils compat-libcap1 compat-libstdc++ elfutils-libelf elfutils-libelf-devel fontconfig-devel glibc glibc-devel ksh libaio libaio-devel libX11 libXau libXi libXtst libXrender libXrender-devel libgcc libstdc++ libstdc++-devel libxcb make net-tools nfs-utils python python-configshell python-rtslib python-six targetcli smartmontools sysstat
bc-1.06.95-13.el7 (x86_64)
binutils-2.23.52.0.1-30.el7 (x86_64)
compat-libcap1-1.10-7.el7 (x86_64)
package compat-libstdc++ is not installed
elfutils-libelf-0.160-1.el7 (x86_64)
elfutils-libelf-devel-0.160-1.el7 (x86_64)
fontconfig-devel-2.10.95-7.el7 (x86_64)
glibc-2.17-78.0.1.el7 (x86_64)
glibc-2.17-78.0.1.el7 (i686)
glibc-devel-2.17-78.0.1.el7 (x86_64)
ksh-20120801-22.el7 (x86_64)
libaio-0.3.109-12.el7 (x86_64)
libaio-devel-0.3.109-12.el7 (x86_64)
libX11-1.6.0-2.1.el7 (x86_64)
libXau-1.0.8-2.1.el7 (x86_64)
libXi-1.7.2-2.1.el7 (x86_64)
libXtst-1.2.2-2.1.el7 (x86_64)
libXrender-0.9.8-2.1.el7 (x86_64)
libXrender-devel-0.9.8-2.1.el7 (x86_64)
libgcc-4.8.3-9.el7 (x86_64)
libgcc-4.8.3-9.el7 (i686)
libstdc++-4.8.3-9.el7 (x86_64)
libstdc++-devel-4.8.3-9.el7 (x86_64)
libxcb-1.9-5.el7 (x86_64)
make-3.82-21.el7 (x86_64)
net-tools-2.0-0.17.20131004git.el7 (x86_64)
nfs-utils-1.3.0-0.8.el7 (x86_64)
python-2.7.5-16.el7 (x86_64)
python-configshell-1.1.fb14-1.el7 (noarch)
python-rtslib-2.1.fb50-1.el7 (noarch)
python-six-1.3.0-4.el7 (noarch)
targetcli-2.1.fb37-3.el7 (noarch)
smartmontools-6.2-4.el7 (x86_64)
sysstat-10.1.5-7.el7 (x86_64)

2.11编辑hosts文件

[root@19c1 ~]# vi /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6

#public-ip
10.13.13.141 19c1
10.13.13.142 19c2

#public-vip
10.13.13.143 19c1-vip
10.13.13.144 19c2-vip

#prive-ip
10.10.10.141 19c1-priv
10.10.10.142 19c2-priv

#scan-ip
10.13.13.145 scan-19c
10.13.13.146 scan-19c
10.13.13.147 scan-19c


[root@19c2 ~]# vi /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6

#public-ip
10.13.13.141 19c1
10.13.13.142 19c2

#public-vip
10.13.13.143 19c1-vip
10.13.13.144 19c2-vip

#prive-ip
10.10.10.141 19c1-priv
10.10.10.142 19c2-priv

#scan-ip
10.13.13.145 scan-19c
10.13.13.146 scan-19c
10.13.13.147 scan-19c

2.12 修改系统内核参数

[root@19c1 ~]# cat /etc/sysconfig/network
# Created by anaconda
[root@19c1 ~]# cat >> /etc/sysctl.conf < kernel.shmall = 4294967296
> kernel.sem = 510 65280 510 128
> kernel.shmmni = 4096
> kernel.shmmax = 429496729500
> net.ipv4.ip_local_port_range = 9000 65500
> net.core.rmem_default = 1048576
> net.core.rmem_max = 4194304
> net.core.wmem_default = 262144
> net.core.wmem_max = 1048576
> fs.file-max = 6815744
> fs.aio-max-nr = 1048576
> vm.swappiness = 0
> vm.dirty_background_ratio = 3
> vm.dirty_ratio = 80
> vm.dirty_expire_centisecs = 500
> vm.dirty_writeback_centisecs = 100
> net.ipv4.tcp_sack = 0
> net.ipv4.tcp_timestamps = 0
> net.ipv4.conf.default.rp_filter = 0
> net.ipv4.tcp_wmem = 262144
> net.ipv4.tcp_rmem = 4194304
> EOF

[root@19c2 ~]# cat /etc/sysconfig/network
# Created by anaconda
[root@19c2 ~]# cat >> /etc/sysctl.conf < kernel.shmall = 4294967296
> kernel.sem = 510 65280 510 128
> kernel.shmmni = 4096
> kernel.shmmax = 429496729500
> net.ipv4.ip_local_port_range = 9000 65500
> net.core.rmem_default = 1048576
> net.core.rmem_max = 4194304
> net.core.wmem_default = 262144
> net.core.wmem_max = 1048576
> fs.file-max = 6815744
> fs.aio-max-nr = 1048576
> vm.swappiness = 0
> vm.dirty_background_ratio = 3
> vm.dirty_ratio = 80
> vm.dirty_expire_centisecs = 500
> vm.dirty_writeback_centisecs = 100
> net.ipv4.tcp_sack = 0
> net.ipv4.tcp_timestamps = 0
> net.ipv4.conf.default.rp_filter = 0
> net.ipv4.tcp_wmem = 262144
> net.ipv4.tcp_rmem = 4194304
> EOF

[root@19c1 ~]# sysctl -p
kernel.shmall = 4294967296
kernel.sem = 510 65280 510 128
kernel.shmmni = 4096
kernel.shmmax = 429496729500
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 1048576
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
fs.file-max = 6815744
fs.aio-max-nr = 1048576
vm.swappiness = 0
vm.dirty_background_ratio = 3
vm.dirty_ratio = 80
vm.dirty_expire_centisecs = 500
vm.dirty_writeback_centisecs = 100
net.ipv4.tcp_sack = 0
net.ipv4.tcp_timestamps = 0
net.ipv4.conf.default.rp_filter = 0
net.ipv4.tcp_wmem = 262144
net.ipv4.tcp_rmem = 4194304

[root@19c2 ~]# sysctl -p
kernel.shmall = 4294967296
kernel.sem = 510 65280 510 128
kernel.shmmni = 4096
kernel.shmmax = 429496729500
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 1048576
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
fs.file-max = 6815744
fs.aio-max-nr = 1048576
vm.swappiness = 0
vm.dirty_background_ratio = 3
vm.dirty_ratio = 80
vm.dirty_expire_centisecs = 500
vm.dirty_writeback_centisecs = 100
net.ipv4.tcp_sack = 0
net.ipv4.tcp_timestamps = 0
net.ipv4.conf.default.rp_filter = 0
net.ipv4.tcp_wmem = 262144
net.ipv4.tcp_rmem = 4194304

2.13 配置LIMITS限制参数

[root@19c1 ~]# cat >> /etc/security/limits.conf < oracle soft nproc 2047
> oracle hard nproc 16384
> oracle soft nofile 65536
> oracle hard nofile 65536
> oracle soft memlock 3145728
> oracle hard memlock 3145728
> oracle soft stack 10240
> oracle hard stack 32768
> 
> grid soft nproc 2047
> grid hard nproc 16384
> grid soft nofile 65536
> grid hard nofile 65536
> grid soft memlock 3145728
> grid hard memlock 3145728
> grid soft stack 10240
> grid hard stack 32768
> EOF

[root@19c2 ~]# cat >> /etc/security/limits.conf < oracle soft nproc 2047
> oracle hard nproc 16384
> oracle soft nofile 65536
> oracle hard nofile 65536
> oracle soft memlock 3145728
> oracle hard memlock 3145728
> oracle soft stack 10240
> oracle hard stack 32768
> 
> grid soft nproc 2047
> grid hard nproc 16384
> grid soft nofile 65536
> grid hard nofile 65536
> grid soft memlock 3145728
> grid hard memlock 3145728
> grid soft stack 10240
> grid hard stack 32768
> EOF

2.14配置PAM

[root@19c1 ~]# cat >> /etc/pam.d/login < session required /lib64/security/pam_limits.so 
> EOF

[root@19c2 ~]# cat >> /etc/pam.d/login < session required /lib64/security/pam_limits.so 
> EOF

2.15 配置系统环境变量

[root@19c1 ~]# cat >> /etc/pam.d/login < if [ \$USER = "oracle" ]; then 
> if [ \$SHELL = "/bin/ksh" ]; then
> ulimit -p 16384
> ulimit -n 65536
> else
> ulimit -u 16384 -n 65536
> fi
> fi
> 
> if [ \$USER = "grid" ]; then 
> if [ \$SHELL = "/bin/ksh" ]; then
> ulimit -p 16384
> ulimit -n 65536
> else
> ulimit -u 16384 -n 65536
> fi
> fi
> 
> EOF



[root@19c2 ~]# cat >> /etc/profile < if [ \$USER = "oracle" ]; then 
> if [ \$SHELL = "/bin/ksh" ]; then
> ulimit -p 16384
> ulimit -n 65536
> else
> ulimit -u 16384 -n 65536
> fi
> fi
> 
> if [ \$USER = "grid" ]; then 
> if [ \$SHELL = "/bin/ksh" ]; then
> ulimit -p 16384
> ulimit -n 65536
> else
> ulimit -u 16384 -n 65536
> fi
> fi
> 
> EOF

2.16 配置grid用户环境变量

[grid@19c1 ~]$ vi .bash_profile
# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATH:$HOME/.local/bin:$HOME/bin

export PATH

TEMP=/u01/tmp
TMPDIR=/u01/tmp
export TEMP TMPDIR
export LD_ASSUME_KERNEL=3.8.13
export ORACLE_BASE=/u01/app/grid
export ORACLE_HOME=/u01/app/19.3/grid
export ORACLE_SID=+ASM1
export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK
export ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
export LD_LIBRARY_PATH
export PATH=$PATH:$ORACLE_HOME/bin
CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
CLASSPATH=$CLASSPATH:$ORACLE_HOME/network/jlib
export CLASSPATH
umask=022
export PATH=$PATH:$ORACLE_HOME/rdbms/lib

[grid@19c2 ~]$ vi .bash_profile
# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATH:$HOME/.local/bin:$HOME/bin

export PATH

TEMP=/u01/tmp
TMPDIR=/u01/tmp
export TEMP TMPDIR
export LD_ASSUME_KERNEL=3.8.13
export ORACLE_BASE=/u01/app/grid
export ORACLE_HOME=/u01/app/19.3/grid
export ORACLE_SID=+ASM2
export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK
export ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
export LD_LIBRARY_PATH
export PATH=$PATH:$ORACLE_HOME/bin
CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
CLASSPATH=$CLASSPATH:$ORACLE_HOME/network/jlib
export CLASSPATH
umask=022
export PATH=$PATH:$ORACLE_HOME/rdbms/lib

2.17 配置oracle用户环境变量

[oracle@19c1 ~]$ vi .bash_profile
# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATH:$HOME/.local/bin:$HOME/bin

export PATH

TEMP=/u01/tmp
TMPDIR=/u01/tmp
export TEMP TMPDIR
export LD_ASSUME_KERNEL=3.8.13
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=/u01/app/oracle/product/19.3/db
export ORACLE_SID=ora19c1
export ORACLE_UNQNAME=ora19c
export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK
export ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
export LD_LIBRARY_PATH
export PATH=$PATH:$ORACLE_HOME/bin
CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
CLASSPATH=$CLASSPATH:$ORACLE_HOME/network/jlib
export CLASSPATH
umask=022
export PATH=$PATH:$ORACLE_HOME/rdbms/lib


[oracle@19c2 ~]$ vi .bash_profile
# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATH:$HOME/.local/bin:$HOME/bin

export PATH

TEMP=/u01/tmp
TMPDIR=/u01/tmp
export TEMP TMPDIR
export LD_ASSUME_KERNEL=3.8.13
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=/u01/app/oracle/product/19.3/db
export ORACLE_SID=ora19c2
export ORACLE_UNQNAME=ora19c
export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK
export ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
export LD_LIBRARY_PATH
export PATH=$PATH:$ORACLE_HOME/bin
CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
CLASSPATH=$CLASSPATH:$ORACLE_HOME/network/jlib
export CLASSPATH
umask=022
export PATH=$PATH:$ORACLE_HOME/rdbms/lib

2.18 配置ASM所需磁盘,编辑/etc/udev/rules.d/99-my-asmdevices.rules配置文件

[root@19c1 ~]# fdisk -l

Disk /dev/sdc: 64.4 GB, 64424509440 bytes, 125829120 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/sda: 85.9 GB, 85899345920 bytes, 167772160 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x0001fbac

Device Boot Start End Blocks Id System
/dev/sda1 * 2048 1026047 512000 83 Linux
/dev/sda2 1026048 167649279 83311616 8e Linux LVM

Disk /dev/sdb: 53.7 GB, 53687091200 bytes, 104857600 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/mapper/ol-root: 76.8 GB, 76843843584 bytes, 150085632 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/mapper/ol-swap: 8455 MB, 8455716864 bytes, 16515072 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

[root@19c1 ~]# /usr/lib/udev/scsi_id -g -u -d /dev/sdb
36000c299fe61de641fb3c6a854adf1f7
[root@19c1 ~]# /usr/lib/udev/scsi_id -g -u -d /dev/sdc
36000c29ad3aa426c31327dac0a2b2a01

[root@19c1 ~]# vi /etc/udev/rules.d/99-my-asmdevices.rules

KERNEL==”sd*[!0-9]”, ENV{DEVTYPE}==”disk”, SUBSYSTEM==”block”, PROGRAM==”/usr/lib/udev/scsi_id -g -u -d $devnode”, RESULT==”36000c299fe61de641fb3c6a854adf1f7″, RUN+=”/bin/sh -c ‘mknod /dev/asmdisk01 b $major $minor; chown grid:asmadmin /dev/asmdisk01; chmod 0660 /dev/asmdisk01′”
KERNEL==”sd*[!0-9]”, ENV{DEVTYPE}==”disk”, SUBSYSTEM==”block”, PROGRAM==”/usr/lib/udev/scsi_id -g -u -d $devnode”, RESULT==”36000c29ad3aa426c31327dac0a2b2a01″, RUN+=”/bin/sh -c ‘mknod /dev/asmdisk02 b $major $minor; chown grid:asmadmin /dev/asmdisk02; chmod 0660 /dev/asmdisk02′”

[root@19c1 ~]# /sbin/udevadm trigger –type=devices –action=change
[root@19c1 ~]# ls -lrt /dev/asm*
brw-rw—-. 1 grid asmadmin 8, 16 May 18 18:30 /dev/asmdisk01
brw-rw—-. 1 grid asmadmin 8, 32 May 18 18:30 /dev/asmdisk02

[root@19c2 ~]# fdisk -l

Disk /dev/sdb: 53.7 GB, 53687091200 bytes, 104857600 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/sda: 85.9 GB, 85899345920 bytes, 167772160 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x0001fbac

Device Boot Start End Blocks Id System
/dev/sda1 * 2048 1026047 512000 83 Linux
/dev/sda2 1026048 167649279 83311616 8e Linux LVM

Disk /dev/sdc: 64.4 GB, 64424509440 bytes, 125829120 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/mapper/ol-root: 76.8 GB, 76843843584 bytes, 150085632 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/mapper/ol-swap: 8455 MB, 8455716864 bytes, 16515072 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

[root@19c2 ~]# /usr/lib/udev/scsi_id -g -u -d /dev/sdb
36000c299fe61de641fb3c6a854adf1f7
[root@19c2 ~]# /usr/lib/udev/scsi_id -g -u -d /dev/sdc
36000c29ad3aa426c31327dac0a2b2a01

[root@19c2 ~]# vi /etc/udev/rules.d/99-my-asmdevices.rules
KERNEL==”sd*[!0-9]”, ENV{DEVTYPE}==”disk”, SUBSYSTEM==”block”, PROGRAM==”/usr/lib/udev/scsi_id -g -u -d $devnode”, RESULT==”36000c299fe61de641fb3c6a854adf1f7″, RUN+=”/bin/sh -c ‘mknod /dev/asmdisk01 b $major $minor; chown grid:asmadmin /dev/asmdisk01; chmod 0660 /dev/asmdisk01′”
KERNEL==”sd*[!0-9]”, ENV{DEVTYPE}==”disk”, SUBSYSTEM==”block”, PROGRAM==”/usr/lib/udev/scsi_id -g -u -d $devnode”, RESULT==”36000c29ad3aa426c31327dac0a2b2a01″, RUN+=”/bin/sh -c ‘mknod /dev/asmdisk02 b $major $minor; chown grid:asmadmin /dev/asmdisk02; chmod 0660 /dev/asmdisk02′”

[root@19c2 ~]# /sbin/udevadm trigger –type=devices –action=change
[root@19c2 ~]# ls -lrt /dev/asm*
brw-rw—-. 1 grid asmadmin 8, 16 May 18 18:30 /dev/asmdisk01
brw-rw—-. 1 grid asmadmin 8, 32 May 18 18:30 /dev/asmdisk02

2.19 禁用avahi
[root@19c1 /]# systemctl stop avahi-dnsconfd
Failed to issue method call: Unit avahi-dnsconfd.service not loaded.
[root@19c1 /]# systemctl stop avahi-daemon
Warning: Stopping avahi-daemon, but it can still be activated by:
avahi-daemon.socket
[root@19c1 /]# systemctl disable avahi-dnsconfd
[root@19c1 /]# systemctl disable avahi-daemon

[root@19c2 /]# systemctl stop avahi-dnsconfd
Failed to issue method call: Unit avahi-dnsconfd.service not loaded.
[root@19c2 /]# systemctl stop avahi-daemon
Warning: Stopping avahi-daemon, but it can still be activated by:
avahi-daemon.socket
[root@19c2 /]# systemctl disable avahi-dnsconfd
[root@19c2 /]# systemctl disable avahi-daemon

三·安装集群软件
3.1解压grid软件

[root@19c1 /]# su - grid
Last login: Mon May 18 18:15:15 CST 2020 on pts/0
[grid@19c1 ~]$ cd /soft
[grid@19c1 soft]$ ls -lrt
total 5809468
-rw-r--r--. 1 grid oinstall 2889184573 May 16 22:08 LINUX.X64_193000_grid_home.zip
-rwxr-xr-x. 1 oracle oinstall 3059705302 May 18 18:44 LINUX.X64_193000_db_home.zip
[grid@19c1 soft]$ unzip -q LINUX.X64_193000_grid_home.zip -d $ORACLE_HOME

3.2 安装CVU

[root@19c1 /]# export CVUQDISK_GRP=oinstall; 
[root@19c1 /]# rpm -ivh /u01/app/19.3/grid/cv/rpm/cvuqdisk-1.0.10-1.rpm
Preparing... ################################# [100%]
Updating / installing...
1:cvuqdisk-1.0.10-1 ################################# [100%]

把安装包复件到节点2

[root@19c1 /]# scp /u01/app/19.3/grid/cv/rpm/cvuqdisk-1.0.10-1.rpm 19c2:~ 
The authenticity of host '19c2 (10.13.13.142)' can't be established.
ECDSA key fingerprint is 7f:1f:9a:0f:8b:d1:e0:17:32:08:12:73:d8:1d:9c:da.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '19c2,10.13.13.142' (ECDSA) to the list of known hosts.
root@19c2's password: 
cvuqdisk-1.0.10-1.rpm

[root@19c2 ~]# export CVUQDISK_GRP=oinstall;
[root@19c2 ~]# rpm -ivh cvuqdisk-1.0.10-1.rpm 
Preparing... ################################# [100%]
Updating / installing...
1:cvuqdisk-1.0.10-1 ################################# [100%]

3.3 配置SSH信任
给grid用户进行配置

[root@19c1 /]# /u01/app/19.3/grid/oui/prov/resources/scripts/sshUserSetup.sh -user grid -hosts "19c1 19c2" -advanced exverify -confirm

[root@19c1 /]# /u01/app/19.3/grid/oui/prov/resources/scripts/sshUserSetup.sh -user oracle -hosts "19c1 19c2" -advanced exverify -confirm

[root@19c1 /]# su - grid
Last login: Mon May 18 19:03:39 CST 2020 on pts/0
[grid@19c1 ~]$ ssh 19c2 date
Mon May 18 19:07:27 CST 2020
[grid@19c1 ~]$ ssh 19c1 date
Mon May 18 19:07:36 CST 2020
[grid@19c1 ~]$ exit
logout
[root@19c1 /]# su - oracle
Last login: Mon May 18 18:17:25 CST 2020 on pts/0
[oracle@19c1 ~]$ ssh 19c2 date
Mon May 18 19:07:45 CST 2020
[oracle@19c1 ~]$ ssh 19c1 date
Mon May 18 19:07:51 CST 2020

[root@19c2 ~]# su - grid
Last login: Mon May 18 18:16:12 CST 2020 on pts/0
[grid@19c2 ~]$ ssh 19c1 date
Mon May 18 19:04:05 CST 2020
[grid@19c2 ~]$ ssh 19c2 date
Mon May 18 19:08:17 CST 2020
[grid@19c2 ~]$ exit
logout
[root@19c2 ~]# su - oracle
Last login: Mon May 18 18:19:20 CST 2020 on pts/0
[oracle@19c2 ~]$ ssh 19c1 date
Mon May 18 19:08:27 CST 2020
[oracle@19c2 ~]$ ssh 19c2 date
Mon May 18 19:08:31 CST 2020

3.4 安装前环境检查GI

[grid@19c1 ~]$ $ORACLE_HOME/runcluvfy.sh stage -pre crsinst -n "19c1,19c2" -fixup -verbose

根据提示修复检查的问题
[root@19c1 /]# /u01/tmp/CVU_19.0.0.0.0_grid/runfixup.sh
All Fix-up operations were completed successfully.

[root@19c2 /]# /u01/tmp/CVU_19.0.0.0.0_grid/runfixup.sh
All Fix-up operations were completed successfully.

3.5开始安装Grid软件

[grid@19c1 ~]$ vi grid.rsp

oracle.install.responseFileVersion=/oracle/install/rspfmt_crsinstall_response_schema_v19.0.0
INVENTORY_LOCATION=/u01/app/oraInventory
oracle.install.option=CRS_CONFIG
ORACLE_BASE=/u01/app/grid
oracle.install.asm.OSDBA=asmdba
oracle.install.asm.OSOPER=asmoper
oracle.install.asm.OSASM=asmadmin
oracle.install.crs.config.scanType=LOCAL_SCAN
oracle.install.crs.config.gpnp.scanName=scan-19c
oracle.install.crs.config.gpnp.scanPort=1521
oracle.install.crs.config.ClusterConfiguration=STANDALONE
oracle.install.crs.config.configureAsExtendedCluster=false
oracle.install.crs.config.clusterName=ora19c-cluster
oracle.install.crs.config.gpnp.configureGNS=false
oracle.install.crs.config.autoConfigureClusterNodeVIP=false
oracle.install.crs.config.clusterNodes=19c1:19c1-vip,19c2:19c2-vip
oracle.install.crs.config.networkInterfaceList=ens192:10.10.10.0:5,ens160:10.13.13.0:1
oracle.install.crs.configureGIMR=false
oracle.install.asm.configureGIMRDataDG=false
oracle.install.crs.config.useIPMI=false
oracle.install.asm.storageOption=ASM
oracle.install.asmOnNAS.configureGIMRDataDG=false
oracle.install.asm.SYSASMPassword=xxzx7817600
oracle.install.asm.diskGroup.name=OCR
oracle.install.asm.diskGroup.redundancy=EXTERNAL
oracle.install.asm.diskGroup.AUSize=4
oracle.install.asm.diskGroup.disks=/dev/asmdisk01
oracle.install.asm.diskGroup.diskDiscoveryString=/dev/asm*
oracle.install.asm.configureAFD=false
oracle.install.asm.monitorPassword=xxzx7817600
oracle.install.crs.configureRHPS=false
oracle.install.crs.config.ignoreDownNodes=false
oracle.install.config.managementOption=NONE
oracle.install.config.omsPort=0
oracle.install.crs.rootconfig.executeRootScript=false


[grid@19c1 ~]$ $ORACLE_HOME/gridSetup.sh -silent -force -noconfig -waitforcompletion -ignorePrereq -responseFile /home/grid/grid.rsp
Launching Oracle Grid Infrastructure Setup Wizard...

[WARNING] [INS-30011] The SYS password entered does not conform to the Oracle recommended standards.
CAUSE: Oracle recommends that the password entered should be at least 8 characters in length, contain at least 1 uppercase character, 1 lower case character and 1 digit [0-9].
ACTION: Provide a password that conforms to the Oracle recommended standards.
[WARNING] [INS-30011] The ASMSNMP password entered does not conform to the Oracle recommended standards.
CAUSE: Oracle recommends that the password entered should be at least 8 characters in length, contain at least 1 uppercase character, 1 lower case character and 1 digit [0-9].
ACTION: Provide a password that conforms to the Oracle recommended standards.
[WARNING] [INS-32047] The location (/u01/app/oraInventory) specified for the central inventory is not empty.
ACTION: It is recommended to provide an empty location for the inventory.
[WARNING] [INS-13013] Target environment does not meet some mandatory requirements.
CAUSE: Some of the mandatory prerequisites are not met. See logs for details. /u01/tmp/GridSetupActions2020-05-18_09-17-17PM/gridSetupActions2020-05-18_09-17-17PM.log
ACTION: Identify the list of failed prerequisite checks from the log: /u01/tmp/GridSetupActions2020-05-18_09-17-17PM/gridSetupActions2020-05-18_09-17-17PM.log. Then either from the log file or from installation manual find the appropriate configuration to meet the prerequisites and fix it manually.
The response file for this session can be found at:
/u01/app/19.3/grid/install/response/grid_2020-05-18_09-17-17PM.rsp

You can find the log of this install session at:
/u01/tmp/GridSetupActions2020-05-18_09-17-17PM/gridSetupActions2020-05-18_09-17-17PM.log

As a root user, execute the following script(s):
1. /u01/app/oraInventory/orainstRoot.sh
2. /u01/app/19.3/grid/root.sh

Execute /u01/app/oraInventory/orainstRoot.sh on the following nodes: 
[19c1, 19c2]
Execute /u01/app/19.3/grid/root.sh on the following nodes: 
[19c1, 19c2]

Run the script on the local node first. After successful completion, you can start the script in parallel on all other nodes.

Successfully Setup Software with warning(s).
As install user, execute the following command to complete the configuration.
/u01/app/19.3/grid/gridSetup.sh -executeConfigTools -responseFile /home/grid/grid.rsp [-silent]


Moved the install session logs to:
/u01/app/oraInventory/logs/GridSetupActions2020-05-18_09-17-17PM

节点一 执行root脚本

[root@19c1 ~]# /u01/app/oraInventory/orainstRoot.sh
Changing permissions of /u01/app/oraInventory.
Adding read,write permissions for group.
Removing read,write,execute permissions for world.

Changing groupname of /u01/app/oraInventory to oinstall.
The execution of the script is complete.
[root@19c1 ~]# /u01/app/19.3/grid/root.sh
Check /u01/app/19.3/grid/install/root_19c1_2020-05-18_21-35-58-622023345.log for the output of root script

节点二 执行root脚本

[root@19c2 /]# /u01/app/oraInventory/orainstRoot.sh
Changing permissions of /u01/app/oraInventory.
Adding read,write permissions for group.
Removing read,write,execute permissions for world.

Changing groupname of /u01/app/oraInventory to oinstall.
The execution of the script is complete.
[root@19c2 /]# /u01/app/19.3/grid/root.sh
Check /u01/app/19.3/grid/install/root_19c2_2020-05-18_21-58-15-384301417.log for the output of root script

[grid@19c1 ~]$ crsctl stat res -t
--------------------------------------------------------------------------------
Name Target State Server State details 
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.LISTENER.lsnr
ONLINE ONLINE 19c1 STABLE
ONLINE ONLINE 19c2 STABLE
ora.chad
ONLINE ONLINE 19c1 STABLE
ONLINE ONLINE 19c2 STABLE
ora.net1.network
ONLINE ONLINE 19c1 STABLE
ONLINE ONLINE 19c2 STABLE
ora.ons
ONLINE ONLINE 19c1 STABLE
ONLINE ONLINE 19c2 STABLE
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.19c1.vip
1 ONLINE ONLINE 19c1 STABLE
ora.19c2.vip
1 ONLINE ONLINE 19c2 STABLE
ora.ASMNET1LSNR_ASM.lsnr(ora.asmgroup)
1 ONLINE ONLINE 19c1 STABLE
2 ONLINE ONLINE 19c2 STABLE
3 OFFLINE OFFLINE STABLE
ora.LISTENER_SCAN1.lsnr
1 ONLINE ONLINE 19c2 STABLE
ora.LISTENER_SCAN2.lsnr
1 ONLINE ONLINE 19c1 STABLE
ora.LISTENER_SCAN3.lsnr
1 ONLINE ONLINE 19c1 STABLE
ora.OCR.dg(ora.asmgroup)
1 ONLINE ONLINE 19c1 STABLE
2 ONLINE ONLINE 19c2 STABLE
3 OFFLINE OFFLINE STABLE
ora.asm(ora.asmgroup)
1 ONLINE ONLINE 19c1 Started,STABLE
2 ONLINE ONLINE 19c2 Started,STABLE
3 OFFLINE OFFLINE STABLE
ora.asmnet1.asmnetwork(ora.asmgroup)
1 ONLINE ONLINE 19c1 STABLE
2 ONLINE ONLINE 19c2 STABLE
3 OFFLINE OFFLINE STABLE
ora.cvu
1 ONLINE ONLINE 19c1 STABLE
ora.qosmserver
1 ONLINE ONLINE 19c1 STABLE
ora.scan1.vip
1 ONLINE ONLINE 19c2 STABLE
ora.scan2.vip
1 ONLINE ONLINE 19c1 STABLE
ora.scan3.vip
1 ONLINE ONLINE 19c1 STABLE
--------------------------------------------------------------------------------

3.6创建ASM磁盘组

[grid@19c1 ~]$ sqlplus / as sysasm

SQL*Plus: Release 19.0.0.0.0 - Production on Mon May 18 22:10:54 2020
Version 19.3.0.0.0

Copyright (c) 1982, 2019, Oracle. All rights reserved.


Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0

SQL> create diskgroup DATA external REDUNDANCY disk '/dev/asmdisk02' ATTRIBUTE 'au_size'='4M', 'compatible.rdbms' = '19.0', 'compatible.asm' = '19.0';

Diskgroup created.

节点二执行挂载

[grid@19c2 ~]$ sqlplus / as sysasm

SQL*Plus: Release 19.0.0.0.0 - Production on Mon May 18 22:13:07 2020
Version 19.3.0.0.0

Copyright (c) 1982, 2019, Oracle. All rights reserved.


Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0

SQL> alter diskgroup data mount;

Diskgroup altered.

[grid@19c1 ~]$ crsctl stat res -t
--------------------------------------------------------------------------------
Name Target State Server State details 
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.LISTENER.lsnr
ONLINE ONLINE 19c1 STABLE
ONLINE ONLINE 19c2 STABLE
ora.chad
ONLINE ONLINE 19c1 STABLE
ONLINE ONLINE 19c2 STABLE
ora.net1.network
ONLINE ONLINE 19c1 STABLE
ONLINE ONLINE 19c2 STABLE
ora.ons
ONLINE ONLINE 19c1 STABLE
ONLINE ONLINE 19c2 STABLE
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.19c1.vip
1 ONLINE ONLINE 19c1 STABLE
ora.19c2.vip
1 ONLINE ONLINE 19c2 STABLE
ora.ASMNET1LSNR_ASM.lsnr(ora.asmgroup)
1 ONLINE ONLINE 19c1 STABLE
2 ONLINE ONLINE 19c2 STABLE
3 OFFLINE OFFLINE STABLE
ora.DATA.dg(ora.asmgroup)
1 ONLINE ONLINE 19c1 STABLE
2 ONLINE ONLINE 19c2 STABLE
3 OFFLINE OFFLINE STABLE
ora.LISTENER_SCAN1.lsnr
1 ONLINE ONLINE 19c2 STABLE
ora.LISTENER_SCAN2.lsnr
1 ONLINE ONLINE 19c1 STABLE
ora.LISTENER_SCAN3.lsnr
1 ONLINE ONLINE 19c1 STABLE
ora.OCR.dg(ora.asmgroup)
1 ONLINE ONLINE 19c1 STABLE
2 ONLINE ONLINE 19c2 STABLE
3 OFFLINE OFFLINE STABLE
ora.asm(ora.asmgroup)
1 ONLINE ONLINE 19c1 Started,STABLE
2 ONLINE ONLINE 19c2 Started,STABLE
3 OFFLINE OFFLINE STABLE
ora.asmnet1.asmnetwork(ora.asmgroup)
1 ONLINE ONLINE 19c1 STABLE
2 ONLINE ONLINE 19c2 STABLE
3 OFFLINE OFFLINE STABLE
ora.cvu
1 ONLINE ONLINE 19c1 STABLE
ora.qosmserver
1 ONLINE ONLINE 19c1 STABLE
ora.scan1.vip
1 ONLINE ONLINE 19c2 STABLE
ora.scan2.vip
1 ONLINE ONLINE 19c1 STABLE
ora.scan3.vip
1 ONLINE ONLINE 19c1 STABLE
--------------------------------------------------------------------------------

四·安装数据库软件
4.1 解压安装包

[oracle@19c1 ~]$ cd /soft
[oracle@19c1 soft]$ ls -lrt
total 5809468
-rw-r--r--. 1 grid oinstall 2889184573 May 16 22:08 LINUX.X64_193000_grid_home.zip
-rwxr-xr-x. 1 oracle oinstall 3059705302 May 18 18:44 LINUX.X64_193000_db_home.zip
[oracle@19c1 soft]$ unzip -q LINUX.X64_193000_db_home.zip -d $ORACLE_HOME



4.2安装前检查
[grid@19c1 ~]$ $ORACLE_HOME/runcluvfy.sh stage -pre dbinst -n "19c1,19c2" -fixup -verbose

4.3编写响应文件

[oracle@19c1 ~]$ vi dbinstall.rsp
oracle.install.responseFileVersion=/oracle/install/rspfmt_dbinstall_response_schema_v19.0.0
oracle.install.option=INSTALL_DB_SWONLY
UNIX_GROUP_NAME=oinstall
INVENTORY_LOCATION=/u01/app/oraInventory
ORACLE_BASE=/u01/app/oracle
ORACLE_HOME=/u01/app/oracle/product/19.3/db
oracle.install.db.InstallEdition=EE
oracle.install.db.OSDBA_GROUP=dba
oracle.install.db.OSOPER_GROUP=oper
oracle.install.db.OSBACKUPDBA_GROUP=backupdba
oracle.install.db.OSDGDBA_GROUP=dgdba
oracle.install.db.OSKMDBA_GROUP=kmdba
oracle.install.db.OSRACDBA_GROUP=racdba
oracle.install.db.CLUSTER_NODES=19c1,19c2
oracle.install.db.config.starterdb.type=GENERAL_PURPOSE

4.4执行安装

[oracle@19c1 ~]$ $ORACLE_HOME/runInstaller -silent -force -noconfig -ignorePrereq -responseFile /home/oracle/dbinstall.rsp
Launching Oracle Database Setup Wizard...

[WARNING] [INS-13013] Target environment does not meet some mandatory requirements.
CAUSE: Some of the mandatory prerequisites are not met. See logs for details. /u01/app/oraInventory/logs/InstallActions2020-05-18_10-55-24PM/installActions2020-05-18_10-55-24PM.log
ACTION: Identify the list of failed prerequisite checks from the log: /u01/app/oraInventory/logs/InstallActions2020-05-18_10-55-24PM/installActions2020-05-18_10-55-24PM.log. Then either from the log file or from installation manual find the appropriate configuration to meet the prerequisites and fix it manually.
The response file for this session can be found at:
/u01/app/oracle/product/19.3/db/install/response/db_2020-05-18_10-55-24PM.rsp

You can find the log of this install session at:
/u01/app/oraInventory/logs/InstallActions2020-05-18_10-55-24PM/installActions2020-05-18_10-55-24PM.log

As a root user, execute the following script(s):
1. /u01/app/oracle/product/19.3/db/root.sh

Execute /u01/app/oracle/product/19.3/db/root.sh on the following nodes: 
[19c1, 19c2]


Successfully Setup Software with warning(s).

4.5执行root.sh脚本

[root@19c1 ~]# /u01/app/oracle/product/19.3/db/root.sh
Check /u01/app/oracle/product/19.3/db/install/root_19c1_2020-05-18_23-18-15-064687854.log for the output of root script
[root@19c1 ~]# cat /u01/app/oracle/product/19.3/db/install/root_19c1_2020-05-18_23-18-15-064687854.log
Performing root user operation.

The following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= /u01/app/oracle/product/19.3/db
Copying dbhome to /usr/local/bin ...
Copying oraenv to /usr/local/bin ...
Copying coraenv to /usr/local/bin ...

Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be performed.

[root@19c2 /]# /u01/app/19.3/grid/root.sh
Check /u01/app/19.3/grid/install/root_19c2_2020-05-18_21-58-15-384301417.log for the output of root script
[root@19c2 /]# /u01/app/oracle/product/19.3/db/root.sh
Check /u01/app/oracle/product/19.3/db/install/root_19c2_2020-05-18_23-18-22-213501815.log for the output of root script
[root@19c2 /]# cat /u01/app/oracle/product/19.3/db/install/root_19c2_2020-05-18_23-18-22-213501815.log
Performing root user operation.

The following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= /u01/app/oracle/product/19.3/db
Copying dbhome to /usr/local/bin ...
Copying oraenv to /usr/local/bin ...
Copying coraenv to /usr/local/bin ...

Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be performed.

五·创建数据库

[oracle@19c1 ~]$ vi dbca.rsp
responseFileVersion=/oracle/assistants/rspfmt_dbca_response_schema_v19.0.0
templateName=General_Purpose.dbc
gdbName=ora19c
sid=ora19c
databaseConfigType=RAC
responseFile=NO_VALUE
characterSet=ZHS16GBK
nationalCharacterSet=AL16UTF16
sysPassword=xxzx7817600
systemPassword=xxzx7817600
createAsContainerDatabase=true
numberOfPDBs=1
pdbName=ora19cpdb
useLocalUndoForPDBs=TRUE
pdbAdminPassword=xxzx7817600
databaseType=MULTIPURPOSE
automaticMemoryManagement=false
totalMemory=3072
redoLogFileSize=50
emConfiguration=NONE
nodelist=19c1,19c2
storageType=ASM
diskGroupName=+DATA
datafileDestination=+DATA
asmsnmpPassword=xxzx7817600
sampleSchema=TRUE

oracle@19c1 ~]$ dbca -silent -createDatabase -responseFile /home/oracle/dbca.rsp
[WARNING] [DBT-06208] The 'SYS' password entered does not conform to the Oracle recommended standards.
CAUSE: 
a. Oracle recommends that the password entered should be at least 8 characters in length, contain at least 1 uppercase character, 1 lower case character and 1 digit [0-9].
b.The password entered is a keyword that Oracle does not recommend to be used as password
ACTION: Specify a strong password. If required refer Oracle documentation for guidelines.
[WARNING] [DBT-06208] The 'SYSTEM' password entered does not conform to the Oracle recommended standards.
CAUSE: 
a. Oracle recommends that the password entered should be at least 8 characters in length, contain at least 1 uppercase character, 1 lower case character and 1 digit [0-9].
b.The password entered is a keyword that Oracle does not recommend to be used as password
ACTION: Specify a strong password. If required refer Oracle documentation for guidelines.
[WARNING] [DBT-06208] The 'PDBADMIN' password entered does not conform to the Oracle recommended standards.
CAUSE: 
a. Oracle recommends that the password entered should be at least 8 characters in length, contain at least 1 uppercase character, 1 lower case character and 1 digit [0-9].
b.The password entered is a keyword that Oracle does not recommend to be used as password
ACTION: Specify a strong password. If required refer Oracle documentation for guidelines.
[FATAL] [DBT-09101] Target environment does not meet some mandatory requirements.
CAUSE: Some of the mandatory prerequisites are not met. See logs for details. /u01/app/oracle/cfgtoollogs/dbca/trace.log_2020-05-19_12-01-31AM
ACTION: Find the appropriate configuration from the log file or from the installation guide to meet the prerequisites and fix this manually.

查看错误日志可以看到因为操作系统内核版本过低等原因检查没有通过

INFO: May 19, 2020 12:09:27 AM oracle.install.commons.base.prereq.PrereqCheckerJob logTaskOverallResult
INFO: OS Kernel Version: This is a prerequisite condition to test whether the system kernel version is at least "4.1.12".


INFO: May 19, 2020 12:09:27 AM oracle.install.commons.base.prereq.PrereqCheckerJob logTaskOverallResult
INFO: Severity:CRITICAL


INFO: May 19, 2020 12:09:27 AM oracle.install.commons.base.prereq.PrereqCheckerJob logTaskOverallResult
INFO: OverallStatus:VERIFICATION_FAILED


INFO: May 19, 2020 12:09:27 AM oracle.install.commons.base.prereq.PrereqCheckerJob logTaskOverallResult
INFO: *********************************************


INFO: May 19, 2020 12:09:27 AM oracle.install.commons.base.prereq.PrereqCheckerJob logTaskOverallResult
INFO: Package: kmod-20-21 (x86_64): This is a prerequisite condition to test whether the package "kmod-20-21 (x86_64)" is available on the system.


INFO: May 19, 2020 12:09:27 AM oracle.install.commons.base.prereq.PrereqCheckerJob logTaskOverallResult
INFO: Severity:IGNORABLE


INFO: May 19, 2020 12:09:27 AM oracle.install.commons.base.prereq.PrereqCheckerJob logTaskOverallResult
INFO: OverallStatus:VERIFICATION_FAILED


INFO: May 19, 2020 12:09:27 AM oracle.install.commons.base.prereq.PrereqCheckerJob logTaskOverallResult
INFO: *********************************************


INFO: May 19, 2020 12:09:27 AM oracle.install.commons.base.prereq.PrereqCheckerJob logTaskOverallResult
INFO: Package: kmod-libs-20-21 (x86_64): This is a prerequisite condition to test whether the package "kmod-libs-20-21 (x86_64)" is available on the system.


INFO: May 19, 2020 12:09:27 AM oracle.install.commons.base.prereq.PrereqCheckerJob logTaskOverallResult
INFO: Severity:IGNORABLE


INFO: May 19, 2020 12:09:27 AM oracle.install.commons.base.prereq.PrereqCheckerJob logTaskOverallResult
INFO: OverallStatus:VERIFICATION_FAILED


INFO: May 19, 2020 12:09:27 AM oracle.install.commons.base.prereq.PrereqCheckerJob logTaskOverallResult
INFO: *********************************************


INFO: May 19, 2020 12:09:27 AM oracle.install.commons.base.prereq.PrereqCheckerJob logTaskOverallResult
INFO: Single Client Access Name (SCAN): This test verifies the Single Client Access Name configuration.


INFO: May 19, 2020 12:09:27 AM oracle.install.commons.base.prereq.PrereqCheckerJob logTaskOverallResult
INFO: Severity:CRITICAL


INFO: May 19, 2020 12:09:27 AM oracle.install.commons.base.prereq.PrereqCheckerJob logTaskOverallResult
INFO: OverallStatus:VERIFICATION_FAILED


INFO: May 19, 2020 12:09:27 AM oracle.install.commons.base.prereq.PrereqCheckerJob logTaskOverallResult
INFO: *********************************************


INFO: May 19, 2020 12:09:27 AM oracle.install.commons.base.prereq.PrereqCheckerJob logTaskOverallResult
INFO: DNS/NIS name service 'scan-19c': This test verifies that the Name Service lookups for the Distributed Name Server (DNS) and the Network Information Service (NIS) match for the SCAN name entries.


INFO: May 19, 2020 12:09:27 AM oracle.install.commons.base.prereq.PrereqCheckerJob logTaskOverallResult
INFO: Severity:CRITICAL


INFO: May 19, 2020 12:09:27 AM oracle.install.commons.base.prereq.PrereqCheckerJob logTaskOverallResult
INFO: OverallStatus:VERIFICATION_FAILED

使用-ignorePreReqs忽略警告和错误再次执行

[oracle@19c1 ~]$ dbca -ignorePreReqs -silent -createDatabase -responseFile /home/oracle/dbca.rsp
[WARNING] [DBT-06208] The 'SYS' password entered does not conform to the Oracle recommended standards.
CAUSE: 
a. Oracle recommends that the password entered should be at least 8 characters in length, contain at least 1 uppercase character, 1 lower case character and 1 digit [0-9].
b.The password entered is a keyword that Oracle does not recommend to be used as password
ACTION: Specify a strong password. If required refer Oracle documentation for guidelines.
[WARNING] [DBT-06208] The 'SYSTEM' password entered does not conform to the Oracle recommended standards.
CAUSE: 
a. Oracle recommends that the password entered should be at least 8 characters in length, contain at least 1 uppercase character, 1 lower case character and 1 digit [0-9].
b.The password entered is a keyword that Oracle does not recommend to be used as password
ACTION: Specify a strong password. If required refer Oracle documentation for guidelines.
[WARNING] [DBT-06208] The 'PDBADMIN' password entered does not conform to the Oracle recommended standards.
CAUSE: 
a. Oracle recommends that the password entered should be at least 8 characters in length, contain at least 1 uppercase character, 1 lower case character and 1 digit [0-9].
b.The password entered is a keyword that Oracle does not recommend to be used as password
ACTION: Specify a strong password. If required refer Oracle documentation for guidelines.
Prepare for db operation
7% complete
Copying database files
27% complete
Creating and starting Oracle instance
28% complete
31% complete
35% complete
37% complete
40% complete
Creating cluster database views
41% complete
53% complete
Completing Database Creation
57% complete
59% complete
60% complete
Creating Pluggable Databases
64% complete
80% complete
Executing Post Configuration Actions
100% complete
Database creation complete. For details check the logfiles at:
/u01/app/oracle/cfgtoollogs/dbca/ora19c.
Database Information:
Global Database Name:ora19c
System Identifier(SID) Prefix:ora19c
Look at the log file "/u01/app/oracle/cfgtoollogs/dbca/ora19c/ora19c0.log" for further details.

[grid@19c2 ~]$ crsctl stat res -t
--------------------------------------------------------------------------------
Name Target State Server State details 
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.LISTENER.lsnr
ONLINE ONLINE 19c1 STABLE
ONLINE ONLINE 19c2 STABLE
ora.chad
ONLINE ONLINE 19c1 STABLE
ONLINE ONLINE 19c2 STABLE
ora.net1.network
ONLINE ONLINE 19c1 STABLE
ONLINE ONLINE 19c2 STABLE
ora.ons
ONLINE ONLINE 19c1 STABLE
ONLINE ONLINE 19c2 STABLE
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.19c1.vip
1 ONLINE ONLINE 19c1 STABLE
ora.19c2.vip
1 ONLINE ONLINE 19c2 STABLE
ora.ASMNET1LSNR_ASM.lsnr(ora.asmgroup)
1 ONLINE ONLINE 19c1 STABLE
2 ONLINE ONLINE 19c2 STABLE
3 OFFLINE OFFLINE STABLE
ora.DATA.dg(ora.asmgroup)
1 ONLINE ONLINE 19c1 STABLE
2 ONLINE ONLINE 19c2 STABLE
3 OFFLINE OFFLINE STABLE
ora.LISTENER_SCAN1.lsnr
1 ONLINE ONLINE 19c2 STABLE
ora.LISTENER_SCAN2.lsnr
1 ONLINE ONLINE 19c1 STABLE
ora.LISTENER_SCAN3.lsnr
1 ONLINE ONLINE 19c1 STABLE
ora.OCR.dg(ora.asmgroup)
1 ONLINE ONLINE 19c1 STABLE
2 ONLINE ONLINE 19c2 STABLE
3 OFFLINE OFFLINE STABLE
ora.asm(ora.asmgroup)
1 ONLINE ONLINE 19c1 Started,STABLE
2 ONLINE ONLINE 19c2 Started,STABLE
3 OFFLINE OFFLINE STABLE
ora.asmnet1.asmnetwork(ora.asmgroup)
1 ONLINE ONLINE 19c1 STABLE
2 ONLINE ONLINE 19c2 STABLE
3 OFFLINE OFFLINE STABLE
ora.cvu
1 ONLINE ONLINE 19c1 STABLE
ora.ora19c.db
1 ONLINE ONLINE 19c1 Open,HOME=/u01/app/o
racle/product/19.3/d
b,STABLE
2 ONLINE ONLINE 19c2 Open,HOME=/u01/app/o
racle/product/19.3/d
b,STABLE
ora.qosmserver
1 ONLINE ONLINE 19c1 STABLE
ora.scan1.vip
1 ONLINE ONLINE 19c2 STABLE
ora.scan2.vip
1 ONLINE ONLINE 19c1 STABLE
ora.scan3.vip
1 ONLINE ONLINE 19c1 STABLE
--------------------------------------------------------------------------------

测试连接

[oracle@19c2 ~]$ sqlplus / as sysdba

SQL*Plus: Release 19.0.0.0.0 - Production on Tue May 19 02:12:46 2020
Version 19.3.0.0.0

Copyright (c) 1982, 2019, Oracle. All rights reserved.


Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0


SQL> select * from v$version;

BANNER BANNER_FULL BANNER_LEGACY CON_ID
------------------------------------------------------------ ------------------------------------------------------------ -------------------------------------------------- ----------
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Oracle Database 19c Enterprise Edition Release 19. 0
Production Production 0.0.0.0 - Production

SQL> show pdbs;

CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
2 PDB$SEED READ ONLY NO
3 ORA19CPDB READ WRITE NO

到此安装就完了.

Oracle Linux 7.1 silent install 19c

Oracle Linux 7.1 单机静默安装19C
一·操作环境
操作系统 Oracle Linux 7.1
数据库版本 Oracle Database 19.3
主机名 ora19c
IP:10.10.10.140
安装目录 /u01/app/oracle/product/19.3/db1
数据库名称 cs

二·操作环境准备
2.1 关闭防火墙

[root@ora19c ~]# systemctl stop firewalld
[root@ora19c ~]# systemctl disable firewalld
rm '/etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service'
rm '/etc/systemd/system/basic.target.wants/firewalld.service'

2.2禁用NetworkManager服务

[root@ora19c ~]# systemctl stop NetworkManager
[root@ora19c ~]# systemctl disable NetworkManager
rm '/etc/systemd/system/multi-user.target.wants/NetworkManager.service'
rm '/etc/systemd/system/dbus-org.freedesktop.NetworkManager.service'
rm '/etc/systemd/system/dbus-org.freedesktop.nm-dispatcher.service'

2.3禁用SELINUX

[root@ora19c ~]# setenforce 0
[root@ora19c ~]# sed -i "/^SELINUX=/s#enforcing#disabled#" /etc/selinux/config
[root@ora19c ~]# cat /etc/selinux/config

# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#     enforcing - SELinux security policy is enforced.
#     permissive - SELinux prints warnings instead of enforcing.
#     disabled - No SELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE= can take one of three two values:
#     targeted - Targeted processes are protected,
#     minimum - Modification of targeted policy. Only selected processes are protected. 
#     mls - Multi Level Security protection.
SELINUXTYPE=targeted 

2.4配置hosts解析

[root@ora19c ~]# echo " 
> 10.138.130.140 ora19c " >> /etc/hosts
[root@ora19c ~]# cat /etc/hosts
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
 
10.138.130.140 ora19c 

2.6创建组和用户

[root@ora19c ~]# groupadd -g 54327 asmdba
[root@ora19c ~]# groupadd -g 54328 asmoper
[root@ora19c ~]# groupadd -g 54322 dba
[root@ora19c ~]# groupadd -g 54323 oper
[root@ora19c ~]# groupadd -g 54324 backupdba
[root@ora19c ~]# groupadd -g 54325 dgdba
[root@ora19c ~]# groupadd -g 54326 kmdba
[root@ora19c ~]# groupadd -g 54329 oinstall
[root@ora19c ~]# groupadd -g 54330 racdba

[root@ora19c ~]# useradd -u 54321 -g oinstall -G dba,asmdba,backupdba,dgdba,kmdba,racdba oracle
[root@ora19c ~]# passwd oracle
Changing password for user oracle.
New password: 
Retype new password: 
passwd: all authentication tokens updated successfully.

2.7创建安装目录

[root@ora19c ~]# mkdir -p /u01/app/oraInventory
[root@ora19c ~]# mkdir -p /u01/app/oracle/product/19.3/db1
[root@ora19c ~]# mkdir -p /u01/temp

[root@ora19c ~]# chown -R oracle:oinstall /u01
[root@ora19c ~]# chmod -R 775 /u01

2.8配置用户环境变量

[oracle@ora19c ~]$ cat .bash_profile
# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
        . ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATH:$HOME/.local/bin:$HOME/bin

export PATH

TEMP=/u01/temp
TMPDIR=/u01/temp
export TEMP TMPDIR
export LD_ASSUME_KERNEL=3.8.13
export ORACLE_BASE=/u01/app/oracle
DB_HOME=/u01/app/oracle/product/19.3/db1
export ORACLE_HOME=$DB_HOME
export ORACLE_SID=ora19c
export ORACLE_UNQNAME=ora19c
export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK
export ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
export LD_LIBRARY_PATH
export PATH=$PATH:$ORACLE_HOME/bin
CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
CLASSPATH=$CLASSPATH:$ORACLE_HOME/network/jlib
export CLASSPATH
umask=022
export PATH=$PATH:$ORACLE_HOME/rdbms/lib 

2.9配置系统环境变量

[root@ora19c ~]# cat >> /etc/profile <  if [ \$USER = "oracle" ]; then  
>     if [ \$SHELL = "/bin/ksh" ]; then
>         ulimit -p 16384
>         ulimit -n 65536
>     else
>         ulimit -u 16384 -n 65536
>     fi
> fi
> EOF

2.10修改系统内核参数

[root@ora19c ~]# cat >> /etc/sysctl.conf <  fs.aio-max-nr = 1048576
> fs.file-max = 6815744
> kernel.shmall = 2097152
> kernel.shmmax = 42949672950
> kernel.shmmni = 4096
> kernel.sem = 250 32000 100 128
> net.ipv4.ip_local_port_range = 9000 65500
> net.core.rmem_default = 262144
> net.core.rmem_max = 4194304
> net.core.wmem_default = 262144
> net.core.wmem_max = 1048576
> EOF


[root@ora19c ~]# sysctl -p
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 42949672950
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576

2.11 配置LIMITS限制

[root@ora19c ~]# cat >> /etc/security/limits.conf <  oracle          soft    nproc           16384
> oracle          hard    nproc           16384
> oracle          soft    nofile          65536
> oracle          hard    nofile          65536
> oracle          soft    memlock         3145728
> oracle          hard    memlock         3145728
> EOF

2.12配置PAM
[root@ora19c ~]# cat >> /etc/pam.d/login < session required /lib64/security/pam_limits.so
> EOF

2.13安装依赖包
配置YUM源

[root@ora19c ~]# df -h
Filesystem           Size  Used Avail Use% Mounted on
/dev/mapper/ol-root   72G   11G   61G  16% /
devtmpfs             3.8G     0  3.8G   0% /dev
tmpfs                3.8G   84K  3.8G   1% /dev/shm
tmpfs                3.8G  8.9M  3.8G   1% /run
tmpfs                3.8G     0  3.8G   0% /sys/fs/cgroup
/dev/sda1            497M  152M  346M  31% /boot
/dev/sr0             4.0G  4.0G     0 100% /run/media/root/OL-7.1 Server.x86_64
[root@ora19c ~]# mount /dev/sr0 /mnt/
mount: /dev/sr0 is write-protected, mounting read-only

[root@ora19c ~]# cd /etc/yum.repos.d/
[root@ora19c yum.repos.d]# ls -lrt
total 4
-rw-r--r--. 1 root root 2323 Feb 16  2015 public-yum-ol7.repo

[root@ora19c yum.repos.d]# cat >> /etc/yum.repos.d/local.repo <  [base]
> name=local
> baseurl=file:///mnt 
> gpgcheck=0
> enabled=1
> EOF

[root@ora19c yum.repos.d]# yum clean all
Loaded plugins: langpacks
Cleaning repos: base
Cleaning up everything
[root@ora19c yum.repos.d]# yum makecache
Loaded plugins: langpacks
base                                                                                                                                                                                                                 | 3.6 kB  00:00:00     
(1/4): base/group_gz                                                                                                                                                                                                 | 134 kB  00:00:00     
(2/4): base/filelists_db                                                                                                                                                                                             | 3.4 MB  00:00:00     
(3/4): base/primary_db                                                                                                                                                                                               | 4.0 MB  00:00:00     
(4/4): base/other_db                                                                                                                                                                                                 | 1.3 MB  00:00:00     
Metadata Cache Created

安装依赖包

[root@ora19c yum.repos.d]# yum install -y bc binutils compat-libcap1 compat-libstdc++ elfutils-libelf elfutils-libelf-devel fontconfig-devel glibc glibc-devel ksh libaio libaio-devel libX11 libXau libXi libXtst libXrender libXrender-devel libgcc libstdc++ libstdc++-devel libxcb make net-tools nfs-utils python  python-configshell  python-rtslib python-six targetcli smartmontools sysstat
Loaded plugins: langpacks
Package bc-1.06.95-13.el7.x86_64 already installed and latest version
Package binutils-2.23.52.0.1-30.el7.x86_64 already installed and latest version
Package compat-libcap1-1.10-7.el7.x86_64 already installed and latest version
No package compat-libstdc++ available. --后面要单独安装这个包
Package elfutils-libelf-0.160-1.el7.x86_64 already installed and latest version
Package glibc-2.17-78.0.1.el7.x86_64 already installed and latest version
Package glibc-devel-2.17-78.0.1.el7.x86_64 already installed and latest version
Package libaio-0.3.109-12.el7.x86_64 already installed and latest version
Package libX11-1.6.0-2.1.el7.x86_64 already installed and latest version
Package libXau-1.0.8-2.1.el7.x86_64 already installed and latest version
Package libXi-1.7.2-2.1.el7.x86_64 already installed and latest version
Package libXtst-1.2.2-2.1.el7.x86_64 already installed and latest version
Package libXrender-0.9.8-2.1.el7.x86_64 already installed and latest version
Package libgcc-4.8.3-9.el7.x86_64 already installed and latest version
Package libstdc++-4.8.3-9.el7.x86_64 already installed and latest version
Package libstdc++-devel-4.8.3-9.el7.x86_64 already installed and latest version
Package libxcb-1.9-5.el7.x86_64 already installed and latest version
Package 1:make-3.82-21.el7.x86_64 already installed and latest version
Package net-tools-2.0-0.17.20131004git.el7.x86_64 already installed and latest version
Package 1:nfs-utils-1.3.0-0.8.el7.x86_64 already installed and latest version
Package python-2.7.5-16.el7.x86_64 already installed and latest version
Package 1:python-configshell-1.1.fb14-1.el7.noarch already installed and latest version
Package python-rtslib-2.1.fb50-1.el7.noarch already installed and latest version
Package python-six-1.3.0-4.el7.noarch already installed and latest version
Package targetcli-2.1.fb37-3.el7.noarch already installed and latest version
Package 1:smartmontools-6.2-4.el7.x86_64 already installed and latest version
Package sysstat-10.1.5-7.el7.x86_64 already installed and latest version
Resolving Dependencies
--> Running transaction check
---> Package elfutils-libelf-devel.x86_64 0:0.160-1.el7 will be installed
---> Package fontconfig-devel.x86_64 0:2.10.95-7.el7 will be installed
--> Processing Dependency: freetype-devel >= 2.1.4 for package: fontconfig-devel-2.10.95-7.el7.x86_64
--> Processing Dependency: pkgconfig(freetype2) for package: fontconfig-devel-2.10.95-7.el7.x86_64
--> Processing Dependency: pkgconfig(expat) for package: fontconfig-devel-2.10.95-7.el7.x86_64
---> Package ksh.x86_64 0:20120801-22.el7 will be installed
---> Package libXrender-devel.x86_64 0:0.9.8-2.1.el7 will be installed
--> Processing Dependency: pkgconfig(renderproto) >= 0.9 for package: libXrender-devel-0.9.8-2.1.el7.x86_64
--> Processing Dependency: pkgconfig(xproto) for package: libXrender-devel-0.9.8-2.1.el7.x86_64
--> Processing Dependency: pkgconfig(x11) for package: libXrender-devel-0.9.8-2.1.el7.x86_64
---> Package libaio-devel.x86_64 0:0.3.109-12.el7 will be installed
--> Running transaction check
---> Package expat-devel.x86_64 0:2.1.0-8.el7 will be installed
---> Package freetype-devel.x86_64 0:2.4.11-9.el7 will be installed
--> Processing Dependency: zlib-devel for package: freetype-devel-2.4.11-9.el7.x86_64
---> Package libX11-devel.x86_64 0:1.6.0-2.1.el7 will be installed
--> Processing Dependency: pkgconfig(xcb) >= 1.1.92 for package: libX11-devel-1.6.0-2.1.el7.x86_64
--> Processing Dependency: pkgconfig(xcb) for package: libX11-devel-1.6.0-2.1.el7.x86_64
---> Package xorg-x11-proto-devel.noarch 0:7.7-8.el7.1 will be installed
--> Running transaction check
---> Package libxcb-devel.x86_64 0:1.9-5.el7 will be installed
--> Processing Dependency: pkgconfig(xau) >= 0.99.2 for package: libxcb-devel-1.9-5.el7.x86_64
---> Package zlib-devel.x86_64 0:1.2.7-13.el7 will be installed
--> Running transaction check
---> Package libXau-devel.x86_64 0:1.0.8-2.1.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

============================================================================================================================================================================================================================================
 Package                                                           Arch                                               Version                                                        Repository                                        Size
============================================================================================================================================================================================================================================
Installing:
 elfutils-libelf-devel                                             x86_64                                             0.160-1.el7                                                    base                                              34 k
 fontconfig-devel                                                  x86_64                                             2.10.95-7.el7                                                  base                                             127 k
 ksh                                                               x86_64                                             20120801-22.el7                                                base                                             879 k
 libXrender-devel                                                  x86_64                                             0.9.8-2.1.el7                                                  base                                              16 k
 libaio-devel                                                      x86_64                                             0.3.109-12.el7                                                 base                                              12 k
Installing for dependencies:
 expat-devel                                                       x86_64                                             2.1.0-8.el7                                                    base                                              56 k
 freetype-devel                                                    x86_64                                             2.4.11-9.el7                                                   base                                             354 k
 libX11-devel                                                      x86_64                                             1.6.0-2.1.el7                                                  base                                             978 k
 libXau-devel                                                      x86_64                                             1.0.8-2.1.el7                                                  base                                              14 k
 libxcb-devel                                                      x86_64                                             1.9-5.el7                                                      base                                             1.0 M
 xorg-x11-proto-devel                                              noarch                                             7.7-8.el7.1                                                    base                                             280 k
 zlib-devel                                                        x86_64                                             1.2.7-13.el7                                                   base                                              49 k

Transaction Summary
============================================================================================================================================================================================================================================
Install  5 Packages (+7 Dependent packages)

Total download size: 3.7 M
Installed size: 12 M
Downloading packages:
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                                                                                       9.3 MB/s | 3.7 MB  00:00:00     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : xorg-x11-proto-devel-7.7-8.el7.1.noarch                                                                                                                                                                                 1/12 
  Installing : libXau-devel-1.0.8-2.1.el7.x86_64                                                                                                                                                                                       2/12 
  Installing : libxcb-devel-1.9-5.el7.x86_64                                                                                                                                                                                           3/12 
  Installing : libX11-devel-1.6.0-2.1.el7.x86_64                                                                                                                                                                                       4/12 
  Installing : expat-devel-2.1.0-8.el7.x86_64                                                                                                                                                                                          5/12 
  Installing : zlib-devel-1.2.7-13.el7.x86_64                                                                                                                                                                                          6/12 
  Installing : freetype-devel-2.4.11-9.el7.x86_64                                                                                                                                                                                      7/12 
  Installing : fontconfig-devel-2.10.95-7.el7.x86_64                                                                                                                                                                                   8/12 
  Installing : libXrender-devel-0.9.8-2.1.el7.x86_64                                                                                                                                                                                   9/12 
  Installing : libaio-devel-0.3.109-12.el7.x86_64                                                                                                                                                                                     10/12 
  Installing : elfutils-libelf-devel-0.160-1.el7.x86_64                                                                                                                                                                               11/12 
  Installing : ksh-20120801-22.el7.x86_64                                                                                                                                                                                             12/12 
  Verifying  : ksh-20120801-22.el7.x86_64                                                                                                                                                                                              1/12 
  Verifying  : libXrender-devel-0.9.8-2.1.el7.x86_64                                                                                                                                                                                   2/12 
  Verifying  : zlib-devel-1.2.7-13.el7.x86_64                                                                                                                                                                                          3/12 
  Verifying  : libxcb-devel-1.9-5.el7.x86_64                                                                                                                                                                                           4/12 
  Verifying  : libX11-devel-1.6.0-2.1.el7.x86_64                                                                                                                                                                                       5/12 
  Verifying  : expat-devel-2.1.0-8.el7.x86_64                                                                                                                                                                                          6/12 
  Verifying  : xorg-x11-proto-devel-7.7-8.el7.1.noarch                                                                                                                                                                                 7/12 
  Verifying  : elfutils-libelf-devel-0.160-1.el7.x86_64                                                                                                                                                                                8/12 
  Verifying  : libaio-devel-0.3.109-12.el7.x86_64                                                                                                                                                                                      9/12 
  Verifying  : fontconfig-devel-2.10.95-7.el7.x86_64                                                                                                                                                                                  10/12 
  Verifying  : freetype-devel-2.4.11-9.el7.x86_64                                                                                                                                                                                     11/12 
  Verifying  : libXau-devel-1.0.8-2.1.el7.x86_64                                                                                                                                                                                      12/12 

Installed:
  elfutils-libelf-devel.x86_64 0:0.160-1.el7          fontconfig-devel.x86_64 0:2.10.95-7.el7          ksh.x86_64 0:20120801-22.el7          libXrender-devel.x86_64 0:0.9.8-2.1.el7          libaio-devel.x86_64 0:0.3.109-12.el7         

Dependency Installed:
  expat-devel.x86_64 0:2.1.0-8.el7    freetype-devel.x86_64 0:2.4.11-9.el7    libX11-devel.x86_64 0:1.6.0-2.1.el7    libXau-devel.x86_64 0:1.0.8-2.1.el7    libxcb-devel.x86_64 0:1.9-5.el7    xorg-x11-proto-devel.noarch 0:7.7-8.el7.1   
  zlib-devel.x86_64 0:1.2.7-13.el7   

Complete!

安装compat-libstdc++-33-3.2.3-72.el7.i686.rpm,因为名字带有版本信息

[root@ora19c yum.repos.d]# yum install  compat-libstdc++-33-3.2.3-72.el7.i686
Loaded plugins: langpacks
Resolving Dependencies
--> Running transaction check
---> Package compat-libstdc++-33.i686 0:3.2.3-72.el7 will be installed
--> Processing Dependency: libm.so.6 for package: compat-libstdc++-33-3.2.3-72.el7.i686
--> Processing Dependency: libgcc_s.so.1(GLIBC_2.0) for package: compat-libstdc++-33-3.2.3-72.el7.i686
--> Processing Dependency: libgcc_s.so.1(GCC_3.3) for package: compat-libstdc++-33-3.2.3-72.el7.i686
--> Processing Dependency: libgcc_s.so.1(GCC_3.0) for package: compat-libstdc++-33-3.2.3-72.el7.i686
--> Processing Dependency: libgcc_s.so.1 for package: compat-libstdc++-33-3.2.3-72.el7.i686
--> Processing Dependency: libc.so.6(GLIBC_2.3) for package: compat-libstdc++-33-3.2.3-72.el7.i686
--> Running transaction check
---> Package glibc.i686 0:2.17-78.0.1.el7 will be installed
--> Processing Dependency: libfreebl3.so(NSSRAWHASH_3.12.3) for package: glibc-2.17-78.0.1.el7.i686
--> Processing Dependency: libfreebl3.so for package: glibc-2.17-78.0.1.el7.i686
---> Package libgcc.i686 0:4.8.3-9.el7 will be installed
--> Running transaction check
---> Package nss-softokn-freebl.i686 0:3.16.2.3-9.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

============================================================================================================================================================================================================================================
 Package                                                          Arch                                              Version                                                         Repository                                         Size
============================================================================================================================================================================================================================================
Installing:
 compat-libstdc++-33                                              i686                                              3.2.3-72.el7                                                    base                                              196 k
Installing for dependencies:
 glibc                                                            i686                                              2.17-78.0.1.el7                                                 base                                              4.2 M
 libgcc                                                           i686                                              4.8.3-9.el7                                                     base                                               99 k
 nss-softokn-freebl                                               i686                                              3.16.2.3-9.el7                                                  base                                              186 k

Transaction Summary
============================================================================================================================================================================================================================================
Install  1 Package (+3 Dependent packages)

Total download size: 4.6 M
Installed size: 16 M
Is this ok [y/d/N]: y
Downloading packages:
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                                                                                        44 MB/s | 4.6 MB  00:00:00     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : libgcc-4.8.3-9.el7.i686                                                                                                                                                                                                  1/4 
  Installing : nss-softokn-freebl-3.16.2.3-9.el7.i686                                                                                                                                                                                   2/4 
  Installing : glibc-2.17-78.0.1.el7.i686                                                                                                                                                                                               3/4 
  Installing : compat-libstdc++-33-3.2.3-72.el7.i686                                                                                                                                                                                    4/4 
  Verifying  : compat-libstdc++-33-3.2.3-72.el7.i686                                                                                                                                                                                    1/4 
  Verifying  : glibc-2.17-78.0.1.el7.i686                                                                                                                                                                                               2/4 
  Verifying  : libgcc-4.8.3-9.el7.i686                                                                                                                                                                                                  3/4 
  Verifying  : nss-softokn-freebl-3.16.2.3-9.el7.i686                                                                                                                                                                                   4/4 

Installed:
  compat-libstdc++-33.i686 0:3.2.3-72.el7                                                                                                                                                                                                   

Dependency Installed:
  glibc.i686 0:2.17-78.0.1.el7                                               libgcc.i686 0:4.8.3-9.el7                                               nss-softokn-freebl.i686 0:3.16.2.3-9.el7                                              

Complete!

检查已安装依赖包

[root@ora19c yum.repos.d]# rpm -q --qf '%{NAME}-%{VERSION}-%{RELEASE} (%{ARCH})\n' bc binutils compat-libcap1 compat-libstdc++ elfutils-libelf elfutils-libelf-devel fontconfig-devel glibc glibc-devel ksh libaio libaio-devel libX11 libXau libXi libXtst libXrender libXrender-devel libgcc libstdc++ libstdc++-devel libxcb make net-tools nfs-utils python  python-configshell  python-rtslib python-six targetcli smartmontools sysstat
bc-1.06.95-13.el7 (x86_64)
binutils-2.23.52.0.1-30.el7 (x86_64)
compat-libcap1-1.10-7.el7 (x86_64)
package compat-libstdc++ is not installed --只要安装了这个报错没有关系。
elfutils-libelf-0.160-1.el7 (x86_64)
elfutils-libelf-devel-0.160-1.el7 (x86_64)
fontconfig-devel-2.10.95-7.el7 (x86_64)
glibc-2.17-78.0.1.el7 (x86_64)
glibc-2.17-78.0.1.el7 (i686)
glibc-devel-2.17-78.0.1.el7 (x86_64)
ksh-20120801-22.el7 (x86_64)
libaio-0.3.109-12.el7 (x86_64)
libaio-devel-0.3.109-12.el7 (x86_64)
libX11-1.6.0-2.1.el7 (x86_64)
libXau-1.0.8-2.1.el7 (x86_64)
libXi-1.7.2-2.1.el7 (x86_64)
libXtst-1.2.2-2.1.el7 (x86_64)
libXrender-0.9.8-2.1.el7 (x86_64)
libXrender-devel-0.9.8-2.1.el7 (x86_64)
libgcc-4.8.3-9.el7 (x86_64)
libgcc-4.8.3-9.el7 (i686)
libstdc++-4.8.3-9.el7 (x86_64)
libstdc++-devel-4.8.3-9.el7 (x86_64)
libxcb-1.9-5.el7 (x86_64)
make-3.82-21.el7 (x86_64)
net-tools-2.0-0.17.20131004git.el7 (x86_64)
nfs-utils-1.3.0-0.8.el7 (x86_64)
python-2.7.5-16.el7 (x86_64)
python-configshell-1.1.fb14-1.el7 (noarch)
python-rtslib-2.1.fb50-1.el7 (noarch)
python-six-1.3.0-4.el7 (noarch)
targetcli-2.1.fb37-3.el7 (noarch)
smartmontools-6.2-4.el7 (x86_64)
sysstat-10.1.5-7.el7 (x86_64)

三·安装软件
3.1 解压数据库软件

[root@ora19c soft]# chown -R oracle:oinstall /soft
[root@ora19c soft]# chmod -R 775 /soft
[root@ora19c soft]# su - oracle
Last login: Sun May 17 08:09:29 CST 2020 on pts/0

[oracle@ora19c soft]$ unzip -q LINUX.X64_193000_db_home.zip  -d $ORACLE_HOME
replace /u01/app/oracle/product/19.3/db1/.patch_storage/29517242_Apr_17_2019_23_27_10/original_patch/README.txt? [y]es, [n]o, [A]ll, [N]one, [r]ename: A
[oracle@ora19c soft]$ du -sh $ORACLE_HOME
6.5G    /u01/app/oracle/product/19.3/db1

3.2安装数据库软件
配置响应文件

[oracle@ora19c ~]$ vi 19c_dbinstall.rsp
oracle.install.responseFileVersion=/oracle/install/rspfmt_dbinstall_response_schema_v19.0.0
oracle.install.option=INSTALL_DB_SWONLY
UNIX_GROUP_NAME=oinstall
INVENTORY_LOCATION=/u01/app/oraInventory
ORACLE_BASE=/u01/app/oracle
ORACLE_HOME=/u01/app/oracle/product/19.3/db1
oracle.install.db.InstallEdition=EE
oracle.install.db.OSDBA_GROUP=dba
oracle.install.db.OSOPER_GROUP=oper
oracle.install.db.OSBACKUPDBA_GROUP=backupdba
oracle.install.db.OSDGDBA_GROUP=dgdba
oracle.install.db.OSKMDBA_GROUP=kmdba
oracle.install.db.OSRACDBA_GROUP=racdba
oracle.install.db.rootconfig.executeRootScript=true
oracle.install.db.rootconfig.configMethod=ROOT

执行安装

[oracle@ora19c ~]$ $ORACLE_HOME/runInstaller -silent  -force -noconfig  -ignorePrereq  -responseFile /home/oracle/19c_dbinstall.rsp
Launching Oracle Database Setup Wizard...


 Enter password for 'root' user:  --输入root用户密码用于自动执行root.sh脚本
[WARNING] [INS-13013] Target environment does not meet some mandatory requirements.
   CAUSE: Some of the mandatory prerequisites are not met. See logs for details. /u01/temp/InstallActions2020-05-17_09-19-02AM/installActions2020-05-17_09-19-02AM.log
   ACTION: Identify the list of failed prerequisite checks from the log: /u01/temp/InstallActions2020-05-17_09-19-02AM/installActions2020-05-17_09-19-02AM.log. Then either from the log file or from installation manual find the appropriate configuration to meet the prerequisites and fix it manually.
The response file for this session can be found at:
 /u01/app/oracle/product/19.3/db1/install/response/db_2020-05-17_09-19-02AM.rsp

You can find the log of this install session at:
 /u01/temp/InstallActions2020-05-17_09-19-02AM/installActions2020-05-17_09-19-02AM.log
Successfully Setup Software with warning(s).
Moved the install session logs to:
 /u01/app/oraInventory/logs/InstallActions2020-05-17_09-19-02AM

四·配置监听
创建配置监听的响应文件

[oracle@ora19c ~]$ vi 19c_netca.rsp
[GENERAL]
RESPONSEFILE_VERSION="19.3"
CREATE_TYPE="CUSTOM"
[Session]
TOPLEVEL_COMPONENT={"oracle.net.ca","19.3"}
[oracle.net.ca]
INSTALLED_COMPONENTS={"server","net8","javavm"}
INSTALL_TYPE=""typical""
LISTENER_NUMBER=1
LISTENER_NAMES={"LISTENER"}
LISTENER_PROTOCOLS={"TCP;1521"}
LISTENER_START=""LISTENER""
NAMING_METHODS={"TNSNAMES","ONAMES","HOSTNAME"}
NSN_NUMBER=1
NSN_NAMES={"EXTPROC_CONNECTION_DATA"}
NSN_SERVICE={"PLSExtProc"}
NSN_PROTOCOLS={"TCP;HOSTNAME;1521"}

配置监听

[oracle@ora19c ~]$ netca /silent /responsefile /home/oracle/19c_netca.rsp

Parsing command line arguments:
    Parameter "silent" = true
    Parameter "responsefile" = /home/oracle/19c_netca.rsp
Done parsing command line arguments.
Oracle Net Services Configuration:
Profile configuration complete.
Oracle Net Listener Startup:
    Running Listener Control: 
      /u01/app/oracle/product/19.3/db1/bin/lsnrctl start LISTENER
    Listener Control complete.
    Listener started successfully.
Listener configuration complete.
Oracle Net Services configuration successful. The exit code is 0

五·创建数据库
创建配置数据库的响应文件

[oracle@ora19c ~]$ vi 19c_dbca.rsp
responseFileVersion=/oracle/assistants/rspfmt_dbca_response_schema_v19.0.0
templateName=General_Purpose.dbc
gdbName=ora19c
sid=ora19c
databaseConfigType=SI
createAsContainerDatabase=TRUE
numberOfPDBs=1
pdbName=ora19c1
useLocalUndoForPDBs=TRUE
pdbAdminPassword=xxzx7817600
sysPassword=xxzx7817600
systemPassword=xxzx7817600
datafileDestination='/u01/app/oracle/oradata'
recoveryAreaDestination='/u01/app/oracle/flash_recovery_area'
storageType=FS
characterSet=ZHS16GBK
nationalCharacterSet=AL16UTF16
listeners="LISTENER"
sampleSchema=TRUE
totalMemory 2048
databaseType=MULTIPURPOSE
automaticMemoryManagement=TRUE
totalMemory=4096

创建数据库

[oracle@ora19c ~]$ dbca -silent  -createDatabase -responseFile /home/oracle/19c_dbca.rsp
[WARNING] [DBT-06208] The 'SYS' password entered does not conform to the Oracle recommended standards.
   CAUSE: 
a. Oracle recommends that the password entered should be at least 8 characters in length, contain at least 1 uppercase character, 1 lower case character and 1 digit [0-9].
b.The password entered is a keyword that Oracle does not recommend to be used as password
   ACTION: Specify a strong password. If required refer Oracle documentation for guidelines.
[WARNING] [DBT-06208] The 'SYSTEM' password entered does not conform to the Oracle recommended standards.
   CAUSE: 
a. Oracle recommends that the password entered should be at least 8 characters in length, contain at least 1 uppercase character, 1 lower case character and 1 digit [0-9].
b.The password entered is a keyword that Oracle does not recommend to be used as password
   ACTION: Specify a strong password. If required refer Oracle documentation for guidelines.
[WARNING] [DBT-06208] The 'PDBADMIN' password entered does not conform to the Oracle recommended standards.
   CAUSE: 
a. Oracle recommends that the password entered should be at least 8 characters in length, contain at least 1 uppercase character, 1 lower case character and 1 digit [0-9].
b.The password entered is a keyword that Oracle does not recommend to be used as password
   ACTION: Specify a strong password. If required refer Oracle documentation for guidelines.
Prepare for db operation
8% complete
Copying database files
31% complete
Creating and starting Oracle instance
32% complete
36% complete
40% complete
43% complete
46% complete
Completing Database Creation
51% complete
53% complete
54% complete
Creating Pluggable Databases
58% complete
77% complete
Executing Post Configuration Actions
100% complete
Database creation complete. For details check the logfiles at:
 /u01/app/oracle/cfgtoollogs/dbca/ora19c.
Database Information:
Global Database Name:ora19c
System Identifier(SID):ora19c
Look at the log file "/u01/app/oracle/cfgtoollogs/dbca/ora19c/ora19c.log" for further details.

六·检查监听状态验证数据库是否被自动注册

[oracle@ora19c ORA19C]$ lsnrctl status

LSNRCTL for Linux: Version 19.0.0.0.0 - Production on 18-MAY-2020 08:21:51

Copyright (c) 1991, 2019, Oracle.  All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=ora19c)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 19.0.0.0.0 - Production
Start Date                17-MAY-2020 20:21:29
Uptime                    0 days 12 hr. 0 min. 23 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/oracle/product/19.3/db1/network/admin/listener.ora
Listener Log File         /u01/app/oracle/diag/tnslsnr/ora19c/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=ora19c)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
Services Summary...
Service "86b637b62fdf7a65e053f706e80a27ca" has 1 instance(s).
  Instance "ora19c", status READY, has 1 handler(s) for this service...
Service "a5d933ae541261b5e0538c828a0a1480" has 1 instance(s).
  Instance "ora19c", status READY, has 1 handler(s) for this service...
Service "ora19c" has 1 instance(s).
  Instance "ora19c", status READY, has 1 handler(s) for this service...
Service "ora19c1" has 1 instance(s).
  Instance "ora19c", status READY, has 1 handler(s) for this service...
Service "ora19cXDB" has 1 instance(s).
  Instance "ora19c", status READY, has 1 handler(s) for this service...
The command completed successfully
[oracle@ora19c ORA19C]$ sqlplus / as sysdba

SQL*Plus: Release 19.0.0.0.0 - Production on Mon May 18 08:22:30 2020
Version 19.3.0.0.0

Copyright (c) 1982, 2019, Oracle.  All rights reserved.


Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0

SQL> show pdbs

    CON_ID CON_NAME                       OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
         2 PDB$SEED                       READ ONLY  NO
         3 ORA19C1                        READ WRITE NO

到此,19c静默安装已经完成。

Linux Use ODBC Connect Oracle

因为工作需要,需要使用ODBC访问Oracle,下面是ODBC访问Oracle的具体配置
1.下载unixODBC和Oracle简易客户端软件包
1.1下载地址:

http://www.unixodbc.org/

1.1.1下载文件:

unixODBC-2.3.0.tar.gz

2 Oracle ODBC Driver
2.1下载地址:

http://www.oracle.com/technetwork/topics/linuxx86-64soft-092277.html

2.1.1下载文件:

instantclient-sqlplus-linux.x64-12.2.0.1.0.zip
instantclient-basic-linux.x64-12.2.0.1.0.zip
instantclient-sdk-linux.x64-12.2.0.1.0.zip
instantclient-jdbc-linux.x64-12.2.0.1.0.zip
instantclient-odbc-linux.x64-12.2.0.1.0-2.zip
instantclient-basiclite-linux.x64-12.2.0.1.0.zip
instantclient-tools-linux.x64-12.2.0.1.0.zip

将这些软件包上传到/soft目录

3.安装unixODBC(root用户)

#cd /soft
#tar xvf unixODBC-2.3.0.tar.gz
#cd /soft/unixODBC-2.3.0
#./configure
#make
#make install

(默认是被安装到/usr/local)

4.安装Oracle ODBC(root用户)

#cd /soft/
#unzip instantclient-sqlplus-linux.x64-12.2.0.1.0.zip
#unzip instantclient-basic-linux.x64-12.2.0.1.0.zip
#unzip instantclient-sdk-linux.x64-12.2.0.1.0.zip
#unzip instantclient-jdbc-linux.x64-12.2.0.1.0.zip
#unzip instantclient-odbc-linux.x64-12.2.0.1.0-2.zip
#unzip instantclient-basiclite-linux.x64-12.2.0.1.0.zip
#unzip instantclient-tools-linux.x64-12.2.0.1.0.zip
[root@dmks instantclient_12_2]# ./odbc_update_ini.sh /usr/local
 *** ODBCINI environment variable not set,defaulting it to HOME directory!

更新操作完成后,会在/usr/local/etc/odbcinst.ini增加Oracle12C的驱动描述信息。

[root@dmks etc]# cat odbcinst.ini
[DM7 ODBC DRIVER]
Description = ODBC DRIVER FOR DM7
Driver = /dm_home/dmdbms/bin/libdodbc.so


[Oracle 12c ODBC driver]
Description     = Oracle ODBC driver for Oracle 12c
Driver          = /soft/instantclient_12_2/libsqora.so.12.1
Setup           =
FileUsage       =
CPTimeout       =
CPReuse         =

并且会在HOME目录下也就是/root,生成.odbc.ini文件,修改.odbc.ini文件

[root@dmks ~]# cat .odbc.ini
[OracleODBC-12c]
Application Attributes = T
Attributes = W
BatchAutocommitMode = IfAllSuccessful
BindAsFLOAT = F
CloseCursor = F
DisableDPM = F
DisableMTS = T
Driver = Oracle 12c ODBC driver
DSN = OracleODBC-12c
EXECSchemaOpt =
EXECSyntax = T
Failover = T
FailoverDelay = 10
FailoverRetryCount = 10
FetchBufferSize = 64000
ForceWCHAR = F
Lobs = T
Longs = T
MaxLargeData = 0
MetadataIdDefault = F
QueryTimeout = T
ResultSets = T
ServerName = shardcat 与tnsnames.ora文件中的服务器一致
SQLGetData extensions = F
Translation DLL =
Translation Option = 0
DisableRULEHint = T
UserID =
StatementCache=F
CacheBufferSize=20
UseOCIDescribeAny=F
SQLTranslateErrors=F
MaxTokenSize=8192
AggregateSQLType=FLOAT
5.测试ODBC连接Oracle
[root@dmks ~]# isql  OracleODBC-12c system xxzx7817600 -v
+---------------------------------------+
| Connected!                            |
|                                       |
| sql-statement                         |
| help [tablename]                      |
| quit                                  |
|                                       |
+---------------------------------------+
SQL> select * from v$version;
+---------------------------------------------------------------------------------+-----------------------------------------+
| BANNER                                                                          | CON_ID                                  |
+---------------------------------------------------------------------------------+-----------------------------------------+
| Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production    | 0                                       |
| PL/SQL Release 12.2.0.1.0 - Production                                          | 0                                       |
| CORE  12.2.0.1.0      Production                                                      | 0                                       
| TNS for Linux: Version 12.2.0.1.0 - Production                                  | 0                                       |
| NLSRTL Version 12.2.0.1.0 - Production                                          | 0                                       |
+---------------------------------------------------------------------------------+-----------------------------------------+

到此使用odbc连接Oracle的操作完成,还是很简单的。

18C RAC DBCA建库时找不到ASM磁盘

在Oracle Linux 7.1中使用dbca为Oracle 18C RAC创建数据库时,找不到ASM磁盘组;而grid用户使用asmca却又能看到ASM磁盘组。

解决方法
1. 检查创建ASM磁盘设备的权限,正确的权限为grid:asmadmin,通过下面输出可知权限正确

[root@18c1 ~]# ls -lrt /dev/asm*
brw-rw---- 1 grid asmadmin 8, 16 Mar 16 22:28 /dev/asmdisk01
brw-rw---- 1 grid asmadmin 8, 32 Mar 17 08:40 /dev/asmdisk02

[root@18c2 ~]# ls -lrt /dev/asm*
brw-rw---- 1 grid asmadmin 8, 32 Mar 17 08:41 /dev/asmdisk02
brw-rw---- 1 grid asmadmin 8, 16 Mar 17 08:41 /dev/asmdisk01

2.检查ASM实例是否启动

[grid@18c1 ~]$ asmcmd lsdg
State    Type    Rebal  Sector  Logical_Sector  Block       AU  Total_MB  Free_MB  Req_mir_free_MB  Usable_file_MB  Offline_disks  Voting_files  Name
MOUNTED  EXTERN  N         512             512   4096  4194304     61440    35868                0           35868              0             Y  CRS/
MOUNTED  EXTERN  N         512             512   4096  4194304     40960    36036                0           36036              0             N  DATA/

[grid@18c2 ~]$ asmcmd lsdg
State    Type    Rebal  Sector  Logical_Sector  Block       AU  Total_MB  Free_MB  Req_mir_free_MB  Usable_file_MB  Offline_disks  Voting_files  Name
MOUNTED  EXTERN  N         512             512   4096  4194304     61440    35868                0           35868              0             Y  CRS/
MOUNTED  EXTERN  N         512             512   4096  4194304     40960    36036                0           36036              0             N  DATA/

3. 检查GRID_HOME/bin下oracle是否有s权限,如果没有需要添加s权限,通过下面的输出可知GRID_HOME/bin目录下的oracle是没有s权限的,这里需要添加

[root@18c1 ~]# ls -lrt /u01/app/oracle/18.0.0/db/bin/oracle
-rwsr-s--x 1 oracle asmadmin 437038067 Mar 16 23:00 /u01/app/oracle/18.0.0/db/bin/oracle
[root@18c1 ~]# ls -lrt /u01/app/18.0.0/grid/bin/oracle
-rwxr-x--x. 1 grid oinstall 413877125 Mar 16 19:10 /u01/app/18.0.0/grid/bin/oracle
[root@18c2 /]# ls -lrt /u01/app/oracle/18.0.0/db/bin/oracle
-rwsr-s--x 1 oracle oinstall 437038067 Mar 16 23:07 /u01/app/oracle/18.0.0/db/bin/oracle
[root@18c2 /]# ls -lrt /u01/app/18.0.0/grid/bin/oracle
-rwxr-x--x. 1 grid oinstall 413877125 Mar 16 19:30 /u01/app/18.0.0/grid/bin/oracle

[root@18c1 ~]# chmod +s /u01/app/18.0.0/grid/bin/oracle
[root@18c1 ~]# ls -lrt /u01/app/18.0.0/grid/bin/oracle
-rwsr-s--x. 1 grid oinstall 413877125 Mar 16 19:10 /u01/app/18.0.0/grid/bin/oracle

[root@18c2 /]# chmod +s /u01/app/18.0.0/grid/bin/oracle
[root@18c2 /]# ls -lrt /u01/app/18.0.0/grid/bin/oracle
-rwsr-s--x. 1 grid oinstall 413877125 Mar 16 19:30 /u01/app/18.0.0/grid/bin/oracle

4.检查用户所有组

[root@18c1 ~]# id oracle
uid=1001(oracle) gid=1011(oinstall) groups=1007(asmdba),1009(dba),1010(oper),1012(backupdba),1013(dgdba),1014(kmdba),1015(racdba),1011(oinstall)
[root@18c1 ~]# id grid
uid=1002(grid) gid=1011(oinstall) groups=1006(asmadmin),1007(asmdba),1008(asmoper),1009(dba),1011(oinstall)
[root@18c1 ~]# gpasswd -a oracle asmadmin
Adding user oracle to group asmadmin
[root@18c1 ~]# id oracle
uid=1001(oracle) gid=1011(oinstall) groups=1006(asmadmin),1007(asmdba),1009(dba),1010(oper),1012(backupdba),1013(dgdba),1014(kmdba),1015(racdba),1011(oinstall)

[root@18c2 /]# id oracle
uid=1001(oracle) gid=1011(oinstall) groups=1007(asmdba),1009(dba),1010(oper),1012(backupdba),1013(dgdba),1014(kmdba),1015(racdba),1011(oinstall)
[root@18c2 /]# id grid
uid=1002(grid) gid=1011(oinstall) groups=1006(asmadmin),1007(asmdba),1008(asmoper),1009(dba),1011(oinstall)
[root@18c2 /]# gpasswd -a oracle asmadmin
Adding user oracle to group asmadmin
[root@18c2 /]# id oracle
uid=1001(oracle) gid=1011(oinstall) groups=1006(asmadmin),1007(asmdba),1009(dba),1010(oper),1012(backupdba),1013(dgdba),1014(kmdba),1015(racdba),1011(oinstall)

再执行dbca创建数据库时能正确找到磁盘组

Oracle Linux 7.1 Install Oracle 19C RAC

安装环境为Oracle Linux 7.1,Oracle版本为19C,下面是RAC环境的IP配置

ip地址          主机名                   类型     解析方式 
10.10.10.190  19c1                    public   DNS或etc/hosts 
10.10.10.191  19c2                    public   DNS或etc/hosts 
88.88.88.1    19c1-priv               private  DNS或etc/hosts 
88.88.88.2    19c2-priv               private  DNS或etc/hosts 
10.10.10.192  19c1-vip                virtual  DNS或etc/hosts 
10.10.10.193  19c2-vip                virtual  DNS或etc/hosts
10.10.10.194  hy-scan                 scan     DNS或etc/hosts
10.10.10.195  hy-scan                 scan     DNS或etc/hosts
10.10.10.196  hy-scan                 scan     DNS或etc/hosts

[root@19c1 /]# vi /etc/hosts
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6

10.10.10.190 19c1
10.10.10.191 19c2
88.88.88.1 19c1-priv
88.88.88.2 19c2-priv
10.10.10.192 19c1-vip
10.10.10.193 19c2-vip

10.10.10.194 hy-scan
10.10.10.195 hy-scan
10.10.10.196 hy-scan


[root@19c2 /]# vi /etc/hosts
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
10.10.10.190 19c1
10.10.10.191 19c2
88.88.88.1 19c1-priv
88.88.88.2 19c2-priv
10.10.10.192 19c1-vip
10.10.10.193 19c2-vip

10.10.10.194 hy-scan
10.10.10.195 hy-scan
10.10.10.196 hy-scan

创建用户组

[root@19c1 /]# groupadd -g 1006 asmadmin
[root@19c1 /]# groupadd -g 1007 asmdba
[root@19c1 /]# groupadd -g 1008 asmoper
[root@19c1 /]# groupadd -g 1009 dba
[root@19c1 /]# groupadd -g 1010 oper
[root@19c1 /]# groupadd -g 1011 oinstall
[root@19c1 /]# groupadd -g 1012 backupdba
[root@19c1 /]# groupadd -g 1013 dgdba
[root@19c1 /]# groupadd -g 1014 kmdba
[root@19c1 /]# groupadd -g 1015 racdba

[root@19c2 /]# groupadd -g 1006 asmadmin
[root@19c2 /]# groupadd -g 1007 asmdba
[root@19c2 /]# groupadd -g 1008 asmoper
[root@19c2 /]# groupadd -g 1009 dba
[root@19c2 /]# groupadd -g 1010 oper
[root@19c2 /]# groupadd -g 1011 oinstall
[root@19c2 /]# groupadd -g 1012 backupdba
[root@19c2 /]# groupadd -g 1013 dgdba
[root@19c2 /]# groupadd -g 1014 kmdba
[root@19c2 /]# groupadd -g 1015 racdba

创建用户

[root@19c1 /]# useradd  -u 1001 -g oinstall -G dba,asmdba,backupdba,dgdba,kmdba,racdba,oper,asmadmin oracle
[root@19c1 /]# useradd  -u 1002 -g oinstall -G asmadmin,asmdba,asmoper,dba grid


[root@19c2 /]# useradd  -u 1001 -g oinstall -G dba,asmdba,backupdba,dgdba,kmdba,racdba,oper,asmadmin oracle
[root@19c2 /]# useradd  -u 1002 -g oinstall -G asmadmin,asmdba,asmoper,dba grid

[root@19c1 /]# passwd grid
Changing password for user grid.
New password: 
Retype new password: 
passwd: all authentication tokens updated successfully.

[root@19c1 /]# passwd oracle
Changing password for user grid.
New password: 
Retype new password: 
passwd: all authentication tokens updated successfully.

[root@19c2 /]# passwd grid
Changing password for user grid.
New password: 
Retype new password: 
passwd: all authentication tokens updated successfully.

[root@19c2 /]# passwd oracle
Changing password for user grid.
New password: 
Retype new password: 
passwd: all authentication tokens updated successfully.

配置ASM所需磁盘,编辑/etc/udev/rules.d/99-my-asmdevices.rules配置文件

[root@19c1 /]# cd /etc/udev/rules.d/
[root@19c1 rules.d]# ls -lrt
总用量 4
-rw-r--r--. 1 root root 709 3月   6 2015 70-persistent-ipoib.rules
[root@19c1 rules.d]# vi 99-my-asmdevices.rules
KERNEL=="sd*[!0-9]", ENV{DEVTYPE}=="disk", SUBSYSTEM=="block",  PROGRAM=="/usr/lib/udev/scsi_id -g -u -d $devnode",  RESULT=="36000c29e40b943ae6772ffb254910685", RUN+="/bin/sh -c 'mknod /dev/asmdisk01 b  $major $minor; chown grid:asmadmin /dev/asmdisk01; chmod 0660 /dev/asmdisk01'"

KERNEL=="sd*[!0-9]", ENV{DEVTYPE}=="disk", SUBSYSTEM=="block",  PROGRAM=="/usr/lib/udev/scsi_id -g -u -d $devnode",  RESULT=="36000c29a2bcbd0e7f1843df54da0baa6", RUN+="/bin/sh -c 'mknod /dev/asmdisk02 b  $major $minor; chown grid:asmadmin /dev/asmdisk02; chmod 0660 /dev/asmdisk02'"


[root@19c2 rules.d]# vi 99-my-asmdevices.rules
KERNEL=="sd*[!0-9]", ENV{DEVTYPE}=="disk", SUBSYSTEM=="block",  PROGRAM=="/usr/lib/udev/scsi_id -g -u -d $devnode",  RESULT=="36000c29e40b943ae6772ffb254910685", RUN+="/bin/sh -c 'mknod /dev/asmdisk01 b  $major $minor; chown grid:asmadmin /dev/asmdisk01; chmod 0660 /dev/asmdisk01'"

KERNEL=="sd*[!0-9]", ENV{DEVTYPE}=="disk", SUBSYSTEM=="block",  PROGRAM=="/usr/lib/udev/scsi_id -g -u -d $devnode",  RESULT=="36000c29a2bcbd0e7f1843df54da0baa6", RUN+="/bin/sh -c 'mknod /dev/asmdisk02 b  $major $minor; chown grid:asmadmin /dev/asmdisk02; chmod 0660 /dev/asmdisk02'" 

[root@19c1 rules.d]# /sbin/udevadm trigger --type=devices --action=change 
[root@19c2 rules.d]# /sbin/udevadm trigger --type=devices --action=change

[root@19c1 rules.d]#  ls -lrt /dev/asm*
brw-rw----. 1 grid asmadmin 8, 32 3月  16 19:16 /dev/asmdisk02
brw-rw----. 1 grid asmadmin 8, 16 3月  16 19:16 /dev/asmdisk01


[root@19c2 rules.d]#  ls -lrt /dev/asm*
brw-rw----. 1 grid asmadmin 8, 32 Mar 16 19:15 /dev/asmdisk02
brw-rw----. 1 grid asmadmin 8, 16 Mar 16 19:15 /dev/asmdisk01


以root用户创建“Oracle inventory 目录”

[root@19c1 /]# mkdir -p /u01/app/oraInventory
[root@19c2 /]# mkdir -p /u01/app/oraInventory

以root用户创建“Grid Infrastructure BASE 目录”

[root@19c1 /]#  mkdir -p /u01/app/grid
[root@19c2 /]#  mkdir -p /u01/app/grid

以root用户创建“Grid Infrastructure Home 目录”

[root@19c1 /]# mkdir -p /u01/app/19.0.0/grid
[root@19c2 /]# mkdir -p /u01/app/19.0.0/grid
[root@19c1 /]# chown -R grid:oinstall /u01
[root@19c1 /]# chmod -R 775 /u01
[root@19c2 /]# chown -R grid:oinstall /u01
[root@19c2 /]# chmod -R 775 /u01

以root用户创建“Oracle Base 目录”

[root@19c1 /]#  mkdir -p /u01/app/oracle
[root@19c2 /]#  mkdir -p /u01/app/oracle

以root用户创建“Oracle RDBMS Home 目录”

[root@19c1 /]# mkdir -p /u01/app/oracle/19.0.0/db
[root@19c2 /]# mkdir -p /u01/app/oracle/19.0.0/db
[root@19c1 /]# chown -R oracle:oinstall /u01/app/oracle
[root@19c1 /]# chmod -R 775 /u01/app/oracle
[root@19c2 /]# chown -R oracle:oinstall /u01/app/oracle
[root@19c2 /]# chmod -R 775 /u01/app/oracle

创建一个tmp目录

[root@19c1 /]#  mkdir /u01/tmp
[root@19c1 /]# chmod a+wr /u01/tmp

[root@19c2 /]#  mkdir /u01/tmp
[root@19c2 /]# chmod a+wr /u01/tmp

设置环境变量

[grid@19c1 ~]$ vi .bash_profile
# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
        . ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATH:$HOME/.local/bin:$HOME/bin

export PATH

TEMP=/u01/tmp
TMPDIR=/u01/tmp
export TEMP TMPDIR
export LD_ASSUME_KERNEL=3.8.13
export ORACLE_BASE=/u01/app/grid
export ORACLE_HOME=/u01/app/19.0.0/grid
export ORACLE_SID=+ASM1
export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK
export ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
export LD_LIBRARY_PATH
export PATH=$PATH:$ORACLE_HOME/bin
CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
CLASSPATH=$CLASSPATH:$ORACLE_HOME/network/jlib
export CLASSPATH
umask=022 

[grid@19c2 ~]$ vi .bash_profile
# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
        . ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATH:$HOME/.local/bin:$HOME/bin

export PATH

TEMP=/u01/tmp
TMPDIR=/u01/tmp
export TEMP TMPDIR
export LD_ASSUME_KERNEL=3.8.13
export ORACLE_BASE=/u01/app/grid
export ORACLE_HOME=/u01/app/19.0.0/grid
export ORACLE_SID=+ASM2
export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK
export ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
export LD_LIBRARY_PATH
export PATH=$PATH:$ORACLE_HOME/bin
CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
CLASSPATH=$CLASSPATH:$ORACLE_HOME/network/jlib
export CLASSPATH
umask=022


[root@19c1 /]# su - oracle
[oracle@19c1 ~]$ vi .bash_profile
# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
        . ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATH:$HOME/.local/bin:$HOME/bin

export PATH

TEMP=/u01/tmp
TMPDIR=/u01/tmp
export TEMP TMPDIR
export LD_ASSUME_KERNEL=3.8.13
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=/u01/app/oracle/19.0.0/db
export ORACLE_SID=hy1
export ORACLE_UNQNAME=hy
export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK
export ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
export LD_LIBRARY_PATH
export PATH=$PATH:$ORACLE_HOME/bin
CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
CLASSPATH=$CLASSPATH:$ORACLE_HOME/network/jlib
export CLASSPATH
umask=022

[root@19c2 /]# su - oracle
-bash: /home/oracle: 是一个目录
[oracle@19c2 ~]$ vi .bash_profile
# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
        . ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATH:$HOME/.local/bin:$HOME/bin

export PATH

TEMP=/u01/tmp
TMPDIR=/u01/tmp
export TEMP TMPDIR
export LD_ASSUME_KERNEL=3.8.13
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=/u01/app/oracle/19.0.0/db
export ORACLE_SID=hy2
export ORACLE_UNQNAME=hy
export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK
export ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
export LD_LIBRARY_PATH
export PATH=$PATH:$ORACLE_HOME/bin
CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
CLASSPATH=$CLASSPATH:$ORACLE_HOME/network/jlib
export CLASSPATH
umask=022

修改内核参数编辑/etc/sysctl.conf文件

[root@19c1 /]# vi /etc/sysctl.conf
# System default settings live in /usr/lib/sysctl.d/00-system.conf.
# To override those settings, enter new settings here, or in an /etc/sysctl.d/.conf file
#
# For more information, see sysctl.conf(5) and sysctl.d(5).

fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 4294967295
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
net.ipv4.tcp_rmem = 4096 87380 4194304
net.ipv4.tcp_wmem = 4096 16384 4194304

[root@19c1 /]# sysctl -p
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 4294967295
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
net.ipv4.tcp_rmem = 4096 87380 4194304
net.ipv4.tcp_wmem = 4096 16384 4194304

[root@19c2 /]# vi /etc/sysctl.conf
# System default settings live in /usr/lib/sysctl.d/00-system.conf.
# To override those settings, enter new settings here, or in an /etc/sysctl.d/.conf file
#
# For more information, see sysctl.conf(5) and sysctl.d(5).

fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 4294967295
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
net.ipv4.tcp_rmem = 4096 87380 4194304
net.ipv4.tcp_wmem = 4096 16384 4194304

[root@19c2 /]# sysctl -p
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 4294967295
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
net.ipv4.tcp_rmem = 4096 87380 4194304
net.ipv4.tcp_wmem = 4096 16384 4194304

修改oarcle参数的shell限制,在所有节点的/etc/security/limits.conf文件中添加以下参数

grid soft nproc 2047
grid hard nproc 16384
grid soft nofile 1024
grid hard nofile 65536
grid soft stack 10240
grid hard stack 32768
grid soft memlock 3145728
grid hard memlock 3145728

oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
oracle soft stack 10240
oracle hard stack 32768
oracle soft memlock 3145728
oracle hard memlock 3145728

修改shell的默认参数文件,在所有节点的/etc/profile文件中添加以下内容

if [ $USER = "oracle" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi


if [ $USER = "grid" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi

对C shell(csh or tcsh) 在所有节点的/etc/csh.login文件中增加以下代码

if ( $USER == "oracle" ) then
limit maxproc 16384
limit descriptors 65536
endif

if ( $USER == "grid" ) then
limit maxproc 16384
limit descriptors 65536
endif

解压GI安装压缩包:

[grid@jytest1 soft]cd /soft/
[grid@19c1 soft]$ unzip Oracle_Database_Grid_Infrastructure_19_2_0_0_0_for_Linux_x86-64.zip -d /u01/app/19.0.0/grid/

这里使用xshell与xmanager来执行安装

[root@19c1 ~]# xhost +
access control disabled, clients can connect from any host
[root@19c1 ~]# su - grid
??′ε??£o? 3? 16 19:55:59 CST 2020pts/0 ?
[grid@19c1 ~]$ cd $ORACLE_HOME
[grid@19c1 grid]$ export DISPLAY=10.138.130.242:0.0
[grid@19c1 grid]$ ./gridSetup.sh
 




















以root用户分别在两个节点上执行以下脚本,先在主节点执行。

[[root@19c1 /]# ./u01/app/oraInventory/orainstRoot.sh
Changing permissions of /u01/app/oraInventory.
Adding read,write permissions for group.
Removing read,write,execute permissions for world.

Changing groupname of /u01/app/oraInventory to oinstall.
The execution of the script is complete.

[root@19c2 /]# ./u01/app/oraInventory/orainstRoot.sh
Changing permissions of /u01/app/oraInventory.
Adding read,write permissions for group.
Removing read,write,execute permissions for world.

Changing groupname of /u01/app/oraInventory to oinstall.
The execution of the script is complete.

[root@19c1 /]# ./u01/app/19.0.0/grid/root.sh
Performing root user operation.

The following environment variables are set as:
    ORACLE_OWNER= grid
    ORACLE_HOME=  /u01/app/19.0.0/grid

Enter the full pathname of the local bin directory: [/usr/local/bin]: 
   Copying dbhome to /usr/local/bin ...
   Copying oraenv to /usr/local/bin ...
   Copying coraenv to /usr/local/bin ...


Creating /etc/oratab file...
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be performed.
Relinking oracle with rac_on option
Using configuration parameter file: /u01/app/19.0.0/grid/crs/install/crsconfig_params
The log of current session can be found at:
  /u01/app/grid/crsdata/19c1/crsconfig/rootcrs_19c1_2020-03-16_10-18-52PM.log
2020/03/16 22:19:07 CLSRSC-594: Executing installation step 1 of 19: 'SetupTFA'.
2020/03/16 22:19:08 CLSRSC-594: Executing installation step 2 of 19: 'ValidateEnv'.
2020/03/16 22:19:08 CLSRSC-363: User ignored prerequisites during installation
2020/03/16 22:19:08 CLSRSC-594: Executing installation step 3 of 19: 'CheckFirstNode'.
2020/03/16 22:19:11 CLSRSC-594: Executing installation step 4 of 19: 'GenSiteGUIDs'.
2020/03/16 22:19:13 CLSRSC-594: Executing installation step 5 of 19: 'SetupOSD'.
2020/03/16 22:19:13 CLSRSC-594: Executing installation step 6 of 19: 'CheckCRSConfig'.
2020/03/16 22:19:13 CLSRSC-594: Executing installation step 7 of 19: 'SetupLocalGPNP'.
2020/03/16 22:19:44 CLSRSC-594: Executing installation step 8 of 19: 'CreateRootCert'.
2020/03/16 22:19:45 CLSRSC-4002: Successfully installed Oracle Trace File Analyzer (TFA) Collector.
2020/03/16 22:19:51 CLSRSC-594: Executing installation step 9 of 19: 'ConfigOLR'.
2020/03/16 22:20:06 CLSRSC-594: Executing installation step 10 of 19: 'ConfigCHMOS'.
2020/03/16 22:20:06 CLSRSC-594: Executing installation step 11 of 19: 'CreateOHASD'.
2020/03/16 22:20:15 CLSRSC-594: Executing installation step 12 of 19: 'ConfigOHASD'.
2020/03/16 22:20:16 CLSRSC-330: Adding Clusterware entries to file 'oracle-ohasd.service'
2020/03/16 22:20:46 CLSRSC-594: Executing installation step 13 of 19: 'InstallAFD'.
2020/03/16 22:20:56 CLSRSC-594: Executing installation step 14 of 19: 'InstallACFS'.
2020/03/16 22:21:06 CLSRSC-594: Executing installation step 15 of 19: 'InstallKA'.
2020/03/16 22:21:16 CLSRSC-594: Executing installation step 16 of 19: 'InitConfig'.

ASM has been created and started successfully.

[DBT-30001] Disk groups created successfully. Check /u01/app/grid/cfgtoollogs/asmca/asmca-200316PM102150.log for details.

2020/03/16 22:22:41 CLSRSC-482: Running command: '/u01/app/19.0.0/grid/bin/ocrconfig -upgrade grid oinstall'
CRS-4256: Updating the profile
Successful addition of voting disk dda88fad4f094f1cbf686f6a903d8f9c.
Successfully replaced voting disk group with +CRS.
CRS-4256: Updating the profile
CRS-4266: Voting file(s) successfully replaced
##  STATE    File Universal Id                File Name Disk group
--  -----    -----------------                --------- ---------
 1. ONLINE   dda88fad4f094f1cbf686f6a903d8f9c (/dev/asmdisk01) [CRS]
Located 1 voting disk(s).
2020/03/16 22:24:13 CLSRSC-594: Executing installation step 17 of 19: 'StartCluster'.
2020/03/16 22:25:23 CLSRSC-343: Successfully started Oracle Clusterware stack
2020/03/16 22:25:23 CLSRSC-594: Executing installation step 18 of 19: 'ConfigNode'.
2020/03/16 22:27:29 CLSRSC-594: Executing installation step 19 of 19: 'PostConfig'.
2020/03/16 22:28:06 CLSRSC-325: Configure Oracle Grid Infrastructure for a Cluster ... succeeded

[root@19c2 /]# ./u01/app/19.0.0/grid/root.sh
Performing root user operation.

The following environment variables are set as:
    ORACLE_OWNER= grid
    ORACLE_HOME=  /u01/app/19.0.0/grid

Enter the full pathname of the local bin directory: [/usr/local/bin]: 
   Copying dbhome to /usr/local/bin ...
   Copying oraenv to /usr/local/bin ...
   Copying coraenv to /usr/local/bin ...


Creating /etc/oratab file...
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be performed.
Relinking oracle with rac_on option
Using configuration parameter file: /u01/app/19.0.0/grid/crs/install/crsconfig_params
The log of current session can be found at:
  /u01/app/grid/crsdata/19c2/crsconfig/rootcrs_19c2_2020-03-16_10-28-54PM.log
2020/03/16 22:29:03 CLSRSC-594: Executing installation step 1 of 19: 'SetupTFA'.
2020/03/16 22:29:03 CLSRSC-594: Executing installation step 2 of 19: 'ValidateEnv'.
2020/03/16 22:29:03 CLSRSC-363: User ignored prerequisites during installation
2020/03/16 22:29:03 CLSRSC-594: Executing installation step 3 of 19: 'CheckFirstNode'.
2020/03/16 22:29:05 CLSRSC-594: Executing installation step 4 of 19: 'GenSiteGUIDs'.
2020/03/16 22:29:05 CLSRSC-594: Executing installation step 5 of 19: 'SetupOSD'.
2020/03/16 22:29:05 CLSRSC-594: Executing installation step 6 of 19: 'CheckCRSConfig'.
2020/03/16 22:29:06 CLSRSC-594: Executing installation step 7 of 19: 'SetupLocalGPNP'.
2020/03/16 22:29:08 CLSRSC-594: Executing installation step 8 of 19: 'CreateRootCert'.
2020/03/16 22:29:09 CLSRSC-594: Executing installation step 9 of 19: 'ConfigOLR'.
2020/03/16 22:29:13 CLSRSC-594: Executing installation step 10 of 19: 'ConfigCHMOS'.
2020/03/16 22:29:13 CLSRSC-594: Executing installation step 11 of 19: 'CreateOHASD'.
2020/03/16 22:29:17 CLSRSC-594: Executing installation step 12 of 19: 'ConfigOHASD'.
2020/03/16 22:29:17 CLSRSC-330: Adding Clusterware entries to file 'oracle-ohasd.service'
2020/03/16 22:29:36 CLSRSC-4002: Successfully installed Oracle Trace File Analyzer (TFA) Collector.
2020/03/16 22:29:44 CLSRSC-594: Executing installation step 13 of 19: 'InstallAFD'.
2020/03/16 22:29:47 CLSRSC-594: Executing installation step 14 of 19: 'InstallACFS'.
2020/03/16 22:29:50 CLSRSC-594: Executing installation step 15 of 19: 'InstallKA'.
2020/03/16 22:29:52 CLSRSC-594: Executing installation step 16 of 19: 'InitConfig'.
2020/03/16 22:30:02 CLSRSC-594: Executing installation step 17 of 19: 'StartCluster'.
2020/03/16 22:31:34 CLSRSC-343: Successfully started Oracle Clusterware stack
2020/03/16 22:31:34 CLSRSC-594: Executing installation step 18 of 19: 'ConfigNode'.
2020/03/16 22:31:57 CLSRSC-594: Executing installation step 19 of 19: 'PostConfig'.
2020/03/16 22:32:06 CLSRSC-325: Configure Oracle Grid Infrastructure for a Cluster ... succeeded



检查集群信息

[grid@19c1 ~]$ crsctl stat res -t
--------------------------------------------------------------------------------
Name           Target  State        Server                   State details       
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.LISTENER.lsnr
               ONLINE  ONLINE       19c1                     STABLE
               ONLINE  ONLINE       19c2                     STABLE
ora.chad
               ONLINE  ONLINE       19c1                     STABLE
               ONLINE  ONLINE       19c2                     STABLE
ora.net1.network
               ONLINE  ONLINE       19c1                     STABLE
               ONLINE  ONLINE       19c2                     STABLE
ora.ons
               ONLINE  ONLINE       19c1                     STABLE
               ONLINE  ONLINE       19c2                     STABLE
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.19c1.vip
      1        ONLINE  ONLINE       19c1                     STABLE
ora.19c2.vip
      1        ONLINE  ONLINE       19c2                     STABLE
ora.ASMNET1LSNR_ASM.lsnr(ora.asmgroup)
      1        ONLINE  ONLINE       19c1                     STABLE
      2        ONLINE  ONLINE       19c2                     STABLE
      3        OFFLINE OFFLINE                               STABLE
ora.CRS.dg(ora.asmgroup)
      1        ONLINE  ONLINE       19c1                     STABLE
      2        ONLINE  ONLINE       19c2                     STABLE
      3        OFFLINE OFFLINE                               STABLE
ora.LISTENER_SCAN1.lsnr
      1        ONLINE  ONLINE       19c2                     STABLE
ora.LISTENER_SCAN2.lsnr
      1        ONLINE  ONLINE       19c1                     STABLE
ora.LISTENER_SCAN3.lsnr
      1        ONLINE  ONLINE       19c1                     STABLE
ora.asm(ora.asmgroup)
      1        ONLINE  ONLINE       19c1                     Started,STABLE
      2        ONLINE  ONLINE       19c2                     Started,STABLE
      3        OFFLINE OFFLINE                               STABLE
ora.asmnet1.asmnetwork(ora.asmgroup)
      1        ONLINE  ONLINE       19c1                     STABLE
      2        ONLINE  ONLINE       19c2                     STABLE
      3        OFFLINE OFFLINE                               STABLE
ora.cvu
      1        ONLINE  ONLINE       19c1                     STABLE
ora.qosmserver
      1        ONLINE  ONLINE       19c1                     STABLE
ora.scan1.vip
      1        ONLINE  ONLINE       19c2                     STABLE
ora.scan2.vip
      1        ONLINE  ONLINE       19c1                     STABLE
ora.scan3.vip
      1        ONLINE  ONLINE       19c1                     STABLE
--------------------------------------------------------------------------------




[oracle@19c1 db]$ cd /soft
[oracle@19c1 soft]$ unzip -q Oracle_Database_19_2_0_0_0_for_Linux_x86-64.zip -d /u01/app/oracle/19.0.0/db

[root@19c1 ~]# xhost +
access control disabled, clients can connect from any host
[root@19c1 ~]# su – oracle
Last login: Mon Mar 16 22:51:15 CST 2020 on pts/3
[oracle@19c1 ~]$ cd $ORACLE_HOME
[oracle@19c1 db]$ export DISPLAY=10.138.130.242:0.0
[oracle@19c1 db]$ ./runInstaller











以 root用户在所有节点上执行以下脚本,先在主节点执行

[root@19c1 /]# ./u01/app/oracle/19.0.0/db/root.sh
Performing root user operation.

The following environment variables are set as:
    ORACLE_OWNER= oracle
    ORACLE_HOME=  /u01/app/oracle/19.0.0/db

Enter the full pathname of the local bin directory: [/usr/local/bin]: 
The contents of "dbhome" have not changed. No need to overwrite.
The contents of "oraenv" have not changed. No need to overwrite.
The contents of "coraenv" have not changed. No need to overwrite.

Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be performed.

[root@19c2 /]# ./u01/app/oracle/19.0.0/db/root.sh
Performing root user operation.

The following environment variables are set as:
    ORACLE_OWNER= oracle
    ORACLE_HOME=  /u01/app/oracle/19.0.0/db

Enter the full pathname of the local bin directory: [/usr/local/bin]: 
The contents of "dbhome" have not changed. No need to overwrite.
The contents of "oraenv" have not changed. No need to overwrite.
The contents of "coraenv" have not changed. No need to overwrite.

Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be performed.


创建磁盘组

[root@19c1 ~]# su - grid
Last login: Tue Mar 17 10:30:57 CST 2020
[grid@19c1 ~]$ export DISPLAY=10.138.130.242:0.0
[grid@19c1 ~]$ asmca



创建数据库hy

[root@19c1 ~]# xhost +
access control disabled, clients can connect from any host
[root@19c1 ~]# su - oracle
Last login: Mon Mar 16 23:09:23 CST 2020
[oracle@19c1 ~]$ export DISPLAY=10.138.130.242:0.0
[oracle@19c1 ~]$ dbca
 
















检查集群信息

[grid@jytest1 ~]$ crsctl stat res -t
--------------------------------------------------------------------------------
Name           Target  State        Server                   State details       
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.ASMNET1LSNR_ASM.lsnr
               ONLINE  ONLINE       jytest1                  STABLE
               ONLINE  ONLINE       jytest2                  STABLE
ora.CRS.dg
               ONLINE  ONLINE       jytest1                  STABLE
               ONLINE  ONLINE       jytest2                  STABLE
ora.DATA.dg
               ONLINE  ONLINE       jytest1                  STABLE
               ONLINE  ONLINE       jytest2                  STABLE
ora.LISTENER.lsnr
               ONLINE  ONLINE       jytest1                  STABLE
               ONLINE  ONLINE       jytest2                  STABLE
ora.TEST.dg
               ONLINE  ONLINE       jytest1                  STABLE
               ONLINE  ONLINE       jytest2                  STABLE
ora.chad
               ONLINE  ONLINE       jytest1                  STABLE
               ONLINE  ONLINE       jytest2                  STABLE
ora.net1.network
               ONLINE  ONLINE       jytest1                  STABLE
               ONLINE  ONLINE       jytest2                  STABLE
ora.ons
               ONLINE  ONLINE       jytest1                  STABLE
               ONLINE  ONLINE       jytest2                  STABLE
ora.proxy_advm
               OFFLINE OFFLINE      jytest1                  STABLE
               OFFLINE OFFLINE      jytest2                  STABLE
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
      1        ONLINE  ONLINE       jytest2                  STABLE
ora.LISTENER_SCAN2.lsnr
      1        ONLINE  ONLINE       jytest1                  STABLE
ora.LISTENER_SCAN3.lsnr
      1        ONLINE  ONLINE       jytest1                  STABLE
ora.MGMTLSNR
      1        ONLINE  ONLINE       jytest1                  169.254.123.145 88.8
                                                             8.88.1,STABLE
ora.asm
      1        ONLINE  ONLINE       jytest1                  Started,STABLE
      2        ONLINE  ONLINE       jytest2                  Started,STABLE
      3        OFFLINE OFFLINE                               STABLE
ora.cvu
      1        ONLINE  ONLINE       jytest1                  STABLE
ora.jy.db
      1        ONLINE  ONLINE       jytest1                  Open,HOME=/u01/app/o
                                                             racle/product/12.2.0
                                                             /db,STABLE
      2        ONLINE  ONLINE       jytest2                  Open,HOME=/u01/app/o
                                                             racle/product/12.2.0
                                                             /db,STABLE
ora.jytest1.vip
      1        ONLINE  ONLINE       jytest1                  STABLE
ora.jytest2.vip
      1        ONLINE  ONLINE       jytest2                  STABLE
ora.mgmtdb
      1        ONLINE  ONLINE       jytest1                  Open,STABLE
ora.qosmserver
      1        ONLINE  ONLINE       jytest1                  STABLE
ora.scan1.vip
      1        ONLINE  ONLINE       jytest2                  STABLE
ora.scan2.vip
      1        ONLINE  ONLINE       jytest1                  STABLE
ora.scan3.vip
      1        ONLINE  ONLINE       jytest1                  STABLE
--------------------------------------------------------------------------------

到此19C RAC for Oracle Linux 7.1的安装完成!

Oracle Linux Install Oracle 18C RAC

安装环境为Oracle Linux 7.1,Oracle版本为18C,下面是RAC环境的IP配置

ip地址          主机名                   类型     解析方式 
10.10.10.171  18c1                    public   DNS或etc/hosts 
10.10.10.172  18c2                    public   DNS或etc/hosts 
88.88.87.1    18c1-priv               private  DNS或etc/hosts 
88.88.87.2    18c2-priv               private  DNS或etc/hosts 
10.10.10.175  18c1-vip                virtual  DNS或etc/hosts 
10.10.10.176  18c2-vip                virtual  DNS或etc/hosts
10.10.10.177  jycs-scan               scan     DNS或etc/hosts
10.10.10.178  jycs-scan               scan     DNS或etc/hosts
10.10.10.179  jycs-scan               scan     DNS或etc/hosts

[root@localhost soft]# vi /etc/hosts
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
10.10.10.171 18c1
10.10.10.172 18c2
88.88.87.1 18c1-priv
88.88.87.2 18c2-priv
10.10.10.175 18c1-vip
10.10.10.176 18c2-vip

10.10.10.177 jycs-scan
10.10.10.178 jycs-scan
10.10.10.179 jycs-scan

[root@localhost ~]# vi /etc/hosts
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
10.10.10.171 18c1
10.10.10.172 18c2
88.88.87.1 18c1-priv
88.88.87.2 18c2-priv
10.10.10.175 18c1-vip
10.10.10.176 18c2-vip

10.10.10.177 jycs-scan
10.10.10.178 jycs-scan
10.10.10.179 jycs-scan

创建用户组

[root@jytest1 ~]# groupadd -g 1006 asmadmin
[root@jytest1 ~]# groupadd -g 1007 asmdba
[root@jytest1 ~]# groupadd -g 1008 asmoper
[root@jytest1 ~]# groupadd -g 1009 dba
[root@jytest1 ~]# groupadd -g 1010 oper
[root@jytest1 ~]# groupadd -g 1011 oinstall
[root@jytest1 ~]# groupadd -g 1012 backupdba
[root@jytest1 ~]# groupadd -g 1013 dgdba
[root@jytest1 ~]# groupadd -g 1014 kmdba
[root@jytest1 ~]# groupadd -g 1015 racdba


[root@jytest2 ~]# groupadd -g 1006 asmadmin
[root@jytest2 ~]# groupadd -g 1007 asmdba
[root@jytest2 ~]# groupadd -g 1008 asmoper
[root@jytest2 ~]# groupadd -g 1009 dba
[root@jytest2 ~]# groupadd -g 1010 oper
[root@jytest2 ~]# groupadd -g 1011 oinstall
[root@jytest2 ~]# groupadd -g 1012 backupdba
[root@jytest2 ~]# groupadd -g 1013 dgdba
[root@jytest2 ~]# groupadd -g 1014 kmdba
[root@jytest2 ~]# groupadd -g 1015 racdba

创建用户
[root@jytest1 ~]#useradd -u 1001 -g oinstall -G dba,asmdba,backupdba,dgdba,kmdba,racdba,oper,asmadmin oracle
[root@jytest1 ~]#useradd -u 1002 -g oinstall -G asmadmin,asmdba,asmoper,dba grid

[root@jytest2 ~]#useradd -u 1001 -g oinstall -G dba,asmdba,backupdba,dgdba,kmdba,racdba,oper,asmadmin oracle
[root@jytest2 ~]#useradd -u 1002 -g oinstall -G asmadmin,asmdba,asmoper,dba grid

[root@jytest1 /]# passwd grid
Changing password for user grid.
New password:
BAD PASSWORD: The password is shorter than 8 characters
Retype new password:
passwd: all authentication tokens updated successfully.
You have new mail in /var/spool/mail/root
[root@jytest1 /]# passwd oracle
Changing password for user oracle.
New password:
BAD PASSWORD: The password is shorter than 8 characters
Retype new password:
passwd: all authentication tokens updated successfully.

[root@jytest2 /]# passwd grid
Changing password for user grid.
New password:
BAD PASSWORD: The password is shorter than 8 characters
Retype new password:
passwd: all authentication tokens updated successfully.
[root@jytest2 /]# passwd oracle
Changing password for user oracle.
New password:
BAD PASSWORD: The password is shorter than 8 characters
Retype new password:
passwd: all authentication tokens updated successfully.

配置ASM所需磁盘,编辑/etc/udev/rules.d/99-my-asmdevices.rules配置文件

[root@18c1 rules.d]# vi /etc/udev/rules.d/99-my-asmdevices.rules
KERNEL=="sd*[!0-9]", ENV{DEVTYPE}=="disk", SUBSYSTEM=="block",  PROGRAM=="/usr/lib/udev/scsi_id -g -u -d $devnode",  RESULT=="36000c29b61b89a10988ac7ee8d332517", RUN+="/bin/sh -c 'mknod /dev/asmdisk01 b  $major $minor; chown grid:asmadmin /dev/asmdisk01; chmod 0660 /dev/asmdisk01'"

KERNEL=="sd*[!0-9]", ENV{DEVTYPE}=="disk", SUBSYSTEM=="block",  PROGRAM=="/usr/lib/udev/scsi_id -g -u -d $devnode",  RESULT=="36000c29dfb622388fc0d35385109c4e9", RUN+="/bin/sh -c 'mknod /dev/asmdisk02 b  $major $minor; chown grid:asmadmin /dev/asmdisk02; chmod 0660 /dev/asmdisk02'"

[root@18c2 rules.d]# vi /etc/udev/rules.d/99-my-asmdevices.rules
KERNEL=="sd*[!0-9]", ENV{DEVTYPE}=="disk", SUBSYSTEM=="block",  PROGRAM=="/usr/lib/udev/scsi_id -g -u -d $devnode",  RESULT=="36000c29b61b89a10988ac7ee8d332517", RUN+="/bin/sh -c 'mknod /dev/asmdisk01 b  $major $minor; chown grid:asmadmin /dev/asmdisk01; chmod 0660 /dev/asmdisk01'"

KERNEL=="sd*[!0-9]", ENV{DEVTYPE}=="disk", SUBSYSTEM=="block",  PROGRAM=="/usr/lib/udev/scsi_id -g -u -d $devnode",  RESULT=="36000c29dfb622388fc0d35385109c4e9", RUN+="/bin/sh -c 'mknod /dev/asmdisk02 b  $major $minor; chown grid:asmadmin /dev/asmdisk02; chmod 0660 /dev/asmdisk02'"
[root@18c1 rules.d]#  /sbin/udevadm trigger --type=devices --action=change
[root@18c2 ~]#  /sbin/udevadm trigger --type=devices --action=change

[root@18c1 rules.d]#  ls -lrt /dev/asm*
brw-rw----. 1 grid asmadmin 8, 32 Mar 16 17:00 /dev/asmdisk01
brw-rw----. 1 grid asmadmin 8, 32 Mar 16 17:01 /dev/asmdisk02

[root@18c2 ~]#  ls -lrt /dev/asm*
brw-rw----. 1 grid asmadmin 8, 16 Mar 16 17:00 /dev/asmdisk01
brw-rw----. 1 grid asmadmin 8, 32 Mar 16 17:02 /dev/asmdisk02

以root用户创建“Oracle inventory 目录”

[root@18c1 rules.d]# mkdir -p /u01/app/oraInventory
[root@18c1 rules.d]# chown -R grid:oinstall /u01/app/oraInventory
[root@18c1 rules.d]# chmod -R 775 /u01/app/oraInventory

[root@18c2 ~]# mkdir -p /u01/app/oraInventory
[root@18c2 ~]# chown -R grid:oinstall /u01/app/oraInventory
[root@18c2 ~]# chmod -R 775 /u01/app/oraInventory

以root用户创建“Grid Infrastructure BASE 目录”

[root@18c1 rules.d]# mkdir -p /u01/app/grid
[root@18c1 rules.d]# chown -R grid:oinstall /u01/app/grid
[root@18c1 rules.d]# chmod -R 775 /u01/app/grid

[root@18c2 ~]# mkdir -p /u01/app/grid
[root@18c2 ~]# chown -R grid:oinstall /u01/app/grid
[root@18c2 ~]# chmod -R 775 /u01/app/grid

以root用户创建“Grid Infrastructure Home 目录”

[root@18c1 rules.d]# mkdir -p /u01/app/18.0.0/grid
[root@18c1 rules.d]# chown -R grid:oinstall /u01/app/18.0.0/grid
[root@18c1 rules.d]# chmod -R 775 /u01/app/18.0.0/grid

[root@18c2 ~]# mkdir -p /u01/app/18.0.0/grid
[root@18c2 ~]# chown -R grid:oinstall /u01/app/18.0.0/grid
[root@18c2 ~]# chmod -R 775 /u01/app/18.0.0/grid

以root用户创建“Oracle Base 目录”

[root@18c1 rules.d]#  mkdir -p /u01/app/oracle
[root@18c1 rules.d]#  chown -R oracle:oinstall /u01/app/oracle
[root@18c1 rules.d]# chmod -R 775 /u01/app/oracle

[root@18c2 ~]#  mkdir -p /u01/app/oracle
[root@18c2 ~]#  chown -R oracle:oinstall /u01/app/oracle
[root@18c2 ~]# chmod -R 775 /u01/app/oracle

以root用户创建“Oracle RDBMS Home 目录”

[root@18c1 rules.d]# mkdir -p /u01/app/oracle/18.0.0/db
[root@18c1 rules.d]# chown -R oracle:oinstall /u01/app/oracle/18.0.0/db
[root@18c1 rules.d]# chmod -R 775 /u01/app/oracle/18.0.0/db

[root@18c2 ~]# mkdir -p /u01/app/oracle/18.0.0/db
[root@18c2 ~]# chown -R oracle:oinstall /u01/app/oracle/18.0.0/db
[root@18c2 ~]# chmod -R 775 /u01/app/oracle/18.0.0/db

创建一个tmp目录

[root@18c1 /]# mkdir /u01/tmp
[root@18c1 /]# chmod a+wr /u01/tmp

[root@18c2 ~]# mkdir /u01/tmp
[root@18c2 ~]# chmod a+wr /u01/tmp

设置环境变量

[root@jytest1 ~]# su - grid

[grid@18c1 ~]$ vi .bash_profile
# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
        . ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATH:$HOME/.local/bin:$HOME/bin

export PATH

TEMP=/u01/tmp
TMPDIR=/u01/tmp
export TEMP TMPDIR
export LD_ASSUME_KERNEL=3.8.13
export ORACLE_BASE=/u01/app/grid
export ORACLE_HOME=/u01/app/18.0.0/grid
export ORACLE_SID=+ASM1
export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK
export ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
export LD_LIBRARY_PATH
export PATH=$PATH:$ORACLE_HOME/bin
CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
CLASSPATH=$CLASSPATH:$ORACLE_HOME/network/jlib
export CLASSPATH
umask=022
[root@jytest2 ~]# su - grid
[grid@18c2 ~]$ vi .bash_profile
# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
        . ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATH:$HOME/.local/bin:$HOME/bin

export PATH

TEMP=/u01/tmp
TMPDIR=/u01/tmp
export TEMP TMPDIR
export LD_ASSUME_KERNEL=3.8.13
export ORACLE_BASE=/u01/app/grid
export ORACLE_HOME=/u01/app/18.0.0/grid
export ORACLE_SID=+ASM2
export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK
export ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
export LD_LIBRARY_PATH
export PATH=$PATH:$ORACLE_HOME/bin
CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
CLASSPATH=$CLASSPATH:$ORACLE_HOME/network/jlib
export CLASSPATH
umask=022

[root@18c1 /]# su - oracle
[oracle@18c1 ~]$ vi .bash_profile
# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
        . ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATH:$HOME/.local/bin:$HOME/bin

export PATH


TEMP=/u01/tmp
TMPDIR=/u01/tmp
export TEMP TMPDIR
export LD_ASSUME_KERNEL=3.8.13
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=/u01/app/oracle/18.0.0/db
export ORACLE_SID=jycs1
export ORACLE_UNQNAME=jycs
export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK
export ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
export LD_LIBRARY_PATH
export PATH=$PATH:$ORACLE_HOME/bin
CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
CLASSPATH=$CLASSPATH:$ORACLE_HOME/network/jlib
export CLASSPATH
umask=022

[root@18c2 ~]# su - oracle
[oracle@18c2 ~]$ vi .bash_profile
# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
        . ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATH:$HOME/.local/bin:$HOME/bin

export PATH

TEMP=/u01/tmp
TMPDIR=/u01/tmp
export TEMP TMPDIR
export LD_ASSUME_KERNEL=3.8.13
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=/u01/app/oracle/18.0.0/db
export ORACLE_SID=jycs2
export ORACLE_UNQNAME=jycs
export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK
export ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
export LD_LIBRARY_PATH
export PATH=$PATH:$ORACLE_HOME/bin
CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
CLASSPATH=$CLASSPATH:$ORACLE_HOME/network/jlib
export CLASSPATH
umask=022

修改内核参数编辑/etc/sysctl.conf文件

[root@18c1 /]# vi /etc/sysctl.conf
# System default settings live in /usr/lib/sysctl.d/00-system.conf.
# To override those settings, enter new settings here, or in an /etc/sysctl.d/.conf file
#
# For more information, see sysctl.conf(5) and sysctl.d(5).

fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 4294967295
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
net.ipv4.tcp_rmem = 4096 87380 4194304
net.ipv4.tcp_wmem = 4096 16384 4194304



[root@18c1 /]# sysctl -p
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 4294967295
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
net.ipv4.tcp_rmem = 4096 87380 4194304
net.ipv4.tcp_wmem = 4096 16384 4194304

[root@18c2 ~]# vi /etc/sysctl.conf
# System default settings live in /usr/lib/sysctl.d/00-system.conf.
# To override those settings, enter new settings here, or in an /etc/sysctl.d/.conf file
#
# For more information, see sysctl.conf(5) and sysctl.d(5).
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 4294967295
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
net.ipv4.tcp_rmem = 4096 87380 4194304
net.ipv4.tcp_wmem = 4096 16384 4194304

~
[root@18c2 ~]# sysctl -p
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 4294967295
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
net.ipv4.tcp_rmem = 4096 87380 4194304
net.ipv4.tcp_wmem = 4096 16384 4194304

修改oarcle参数的shell限制,在所有节点的/etc/security/limits.conf文件中添加以下参数

grid soft nproc 2047
grid hard nproc 16384
grid soft nofile 1024
grid hard nofile 65536
grid soft stack 10240
grid hard stack 32768
grid soft memlock 3145728
grid hard memlock 3145728

oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
oracle soft stack 10240
oracle hard stack 32768
oracle soft memlock 3145728
oracle hard memlock 3145728

修改shell的默认参数文件,在所有节点的/etc/profile文件中添加以下内容:

if [ $USER = "oracle" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi


if [ $USER = "grid" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi

对C shell(csh or tcsh) 在所有节点的/etc/csh.login文件中增加以下代码

if ( $USER == "oracle" ) then
limit maxproc 16384
limit descriptors 65536
endif

if ( $USER == "grid" ) then
limit maxproc 16384
limit descriptors 65536
endif

解压GI安装压缩包:

[grid@jytest1 soft]cd /soft/
[grid@18c1 soft]$ unzip LINUX.X64_180000_grid_home.zip -d /u01/app/18.0.0/grid

这里使用xshell与xmanager来执行安装

[root@18c1 ~]# xhost +
access control disabled, clients can connect from any host
[root@18c1 ~]# su - grid
Last login: Mon Mar 16 17:36:02 CST 2020 on pts/1
[grid@18c1 ~]$ cd /u01/app/18.0.0/grid
[grid@18c1 grid]$ export DISPLAY=10.138.130.242:0.0
[grid@18c1 grid]$ ./gridSetup.sh























以root用户分别在两个节点上执行以下脚本,先在主节点执行。

[root@18c1 /]# ./u01/app/oraInventory/orainstRoot.sh
Changing permissions of /u01/app/oraInventory.
Adding read,write permissions for group.
Removing read,write,execute permissions for world.

Changing groupname of /u01/app/oraInventory to oinstall.
The execution of the script is complete.

[root@18c2 /]# ./u01/app/oraInventory/orainstRoot.sh
Changing permissions of /u01/app/oraInventory.
Adding read,write permissions for group.
Removing read,write,execute permissions for world.

Changing groupname of /u01/app/oraInventory to oinstall.
The execution of the script is complete.


[root@18c1 /]# ./u01/app/18.0.0/grid/root.sh
Performing root user operation.

The following environment variables are set as:
    ORACLE_OWNER= grid
    ORACLE_HOME=  /u01/app/18.0.0/grid

Enter the full pathname of the local bin directory: [/usr/local/bin]: 
   Copying dbhome to /usr/local/bin ...
   Copying oraenv to /usr/local/bin ...
   Copying coraenv to /usr/local/bin ...


Creating /etc/oratab file...
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be performed.
Relinking oracle with rac_on option
Using configuration parameter file: /u01/app/18.0.0/grid/crs/install/crsconfig_params
The log of current session can be found at:
  /u01/app/grid/crsdata/18c1/crsconfig/rootcrs_18c1_2020-03-16_07-10-52PM.log
2020/03/16 19:11:26 CLSRSC-594: Executing installation step 1 of 20: 'SetupTFA'.
2020/03/16 19:11:26 CLSRSC-4001: Installing Oracle Trace File Analyzer (TFA) Collector.
2020/03/16 19:12:15 CLSRSC-4002: Successfully installed Oracle Trace File Analyzer (TFA) Collector.
2020/03/16 19:12:15 CLSRSC-594: Executing installation step 2 of 20: 'ValidateEnv'.
2020/03/16 19:12:15 CLSRSC-363: User ignored prerequisites during installation
2020/03/16 19:12:15 CLSRSC-594: Executing installation step 3 of 20: 'CheckFirstNode'.
2020/03/16 19:12:19 CLSRSC-594: Executing installation step 4 of 20: 'GenSiteGUIDs'.
2020/03/16 19:12:24 CLSRSC-594: Executing installation step 5 of 20: 'SaveParamFile'.
2020/03/16 19:12:41 CLSRSC-594: Executing installation step 6 of 20: 'SetupOSD'.
2020/03/16 19:12:41 CLSRSC-594: Executing installation step 7 of 20: 'CheckCRSConfig'.
2020/03/16 19:12:41 CLSRSC-594: Executing installation step 8 of 20: 'SetupLocalGPNP'.
2020/03/16 19:13:25 CLSRSC-594: Executing installation step 9 of 20: 'CreateRootCert'.
2020/03/16 19:13:35 CLSRSC-594: Executing installation step 10 of 20: 'ConfigOLR'.
2020/03/16 19:13:58 CLSRSC-594: Executing installation step 11 of 20: 'ConfigCHMOS'.
2020/03/16 19:13:58 CLSRSC-594: Executing installation step 12 of 20: 'CreateOHASD'.
2020/03/16 19:14:13 CLSRSC-594: Executing installation step 13 of 20: 'ConfigOHASD'.
2020/03/16 19:14:14 CLSRSC-330: Adding Clusterware entries to file 'oracle-ohasd.service'
2020/03/16 19:15:02 CLSRSC-594: Executing installation step 14 of 20: 'InstallAFD'.
2020/03/16 19:16:10 CLSRSC-594: Executing installation step 15 of 20: 'InstallACFS'.
CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on '18c1'
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on '18c1' has completed
CRS-4133: Oracle High Availability Services has been stopped.
CRS-4123: Oracle High Availability Services has been started.
2020/03/16 19:16:55 CLSRSC-594: Executing installation step 16 of 20: 'InstallKA'.
2020/03/16 19:17:10 CLSRSC-594: Executing installation step 17 of 20: 'InitConfig'.
CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on '18c1'
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on '18c1' has completed
CRS-4133: Oracle High Availability Services has been stopped.
CRS-4123: Oracle High Availability Services has been started.
CRS-2672: Attempting to start 'ora.driver.afd' on '18c1'
CRS-2672: Attempting to start 'ora.evmd' on '18c1'
CRS-2672: Attempting to start 'ora.mdnsd' on '18c1'
CRS-2676: Start of 'ora.driver.afd' on '18c1' succeeded
CRS-2672: Attempting to start 'ora.cssdmonitor' on '18c1'
CRS-2676: Start of 'ora.cssdmonitor' on '18c1' succeeded
CRS-2676: Start of 'ora.mdnsd' on '18c1' succeeded
CRS-2676: Start of 'ora.evmd' on '18c1' succeeded
CRS-2672: Attempting to start 'ora.gpnpd' on '18c1'
CRS-2676: Start of 'ora.gpnpd' on '18c1' succeeded
CRS-2672: Attempting to start 'ora.gipcd' on '18c1'
CRS-2676: Start of 'ora.gipcd' on '18c1' succeeded
CRS-2672: Attempting to start 'ora.cssd' on '18c1'
CRS-2672: Attempting to start 'ora.diskmon' on '18c1'
CRS-2676: Start of 'ora.diskmon' on '18c1' succeeded
CRS-2676: Start of 'ora.cssd' on '18c1' succeeded

[INFO] [DBT-30161] Disk label(s) created successfully. Check /u01/app/grid/cfgtoollogs/asmca/asmca-200316PM071759.log for details.
[INFO] [DBT-30001] Disk groups created successfully. Check /u01/app/grid/cfgtoollogs/asmca/asmca-200316PM071759.log for details.


2020/03/16 19:19:59 CLSRSC-482: Running command: '/u01/app/18.0.0/grid/bin/ocrconfig -upgrade grid oinstall'
CRS-2672: Attempting to start 'ora.crf' on '18c1'
CRS-2672: Attempting to start 'ora.storage' on '18c1'
CRS-2676: Start of 'ora.storage' on '18c1' succeeded
CRS-2676: Start of 'ora.crf' on '18c1' succeeded
CRS-2672: Attempting to start 'ora.crsd' on '18c1'
CRS-2676: Start of 'ora.crsd' on '18c1' succeeded
CRS-4256: Updating the profile
Successful addition of voting disk b1f6f23bbaef4ff2bf3cdfdec8a72881.
Successfully replaced voting disk group with +CRS.
CRS-4256: Updating the profile
CRS-4266: Voting file(s) successfully replaced
##  STATE    File Universal Id                File Name Disk group
--  -----    -----------------                --------- ---------
 1. ONLINE   b1f6f23bbaef4ff2bf3cdfdec8a72881 (AFD:CRS1) [CRS]
Located 1 voting disk(s).
CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on '18c1'
CRS-2673: Attempting to stop 'ora.crsd' on '18c1'
CRS-2677: Stop of 'ora.crsd' on '18c1' succeeded
CRS-2673: Attempting to stop 'ora.storage' on '18c1'
CRS-2673: Attempting to stop 'ora.crf' on '18c1'
CRS-2673: Attempting to stop 'ora.drivers.acfs' on '18c1'
CRS-2673: Attempting to stop 'ora.mdnsd' on '18c1'
CRS-2677: Stop of 'ora.crf' on '18c1' succeeded
CRS-2677: Stop of 'ora.storage' on '18c1' succeeded
CRS-2673: Attempting to stop 'ora.asm' on '18c1'
CRS-2677: Stop of 'ora.drivers.acfs' on '18c1' succeeded
CRS-2677: Stop of 'ora.mdnsd' on '18c1' succeeded
CRS-2677: Stop of 'ora.asm' on '18c1' succeeded
CRS-2673: Attempting to stop 'ora.cluster_interconnect.haip' on '18c1'
CRS-2677: Stop of 'ora.cluster_interconnect.haip' on '18c1' succeeded
CRS-2673: Attempting to stop 'ora.ctssd' on '18c1'
CRS-2673: Attempting to stop 'ora.evmd' on '18c1'
CRS-2677: Stop of 'ora.ctssd' on '18c1' succeeded
CRS-2677: Stop of 'ora.evmd' on '18c1' succeeded
CRS-2673: Attempting to stop 'ora.cssd' on '18c1'
CRS-2677: Stop of 'ora.cssd' on '18c1' succeeded
CRS-2673: Attempting to stop 'ora.driver.afd' on '18c1'
CRS-2673: Attempting to stop 'ora.gipcd' on '18c1'
CRS-2673: Attempting to stop 'ora.gpnpd' on '18c1'
CRS-2677: Stop of 'ora.driver.afd' on '18c1' succeeded
CRS-2677: Stop of 'ora.gpnpd' on '18c1' succeeded
CRS-2677: Stop of 'ora.gipcd' on '18c1' succeeded
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on '18c1' has completed
CRS-4133: Oracle High Availability Services has been stopped.
2020/03/16 19:22:35 CLSRSC-594: Executing installation step 18 of 20: 'StartCluster'.
CRS-4123: Starting Oracle High Availability Services-managed resources
CRS-2672: Attempting to start 'ora.evmd' on '18c1'
CRS-2672: Attempting to start 'ora.mdnsd' on '18c1'
CRS-2676: Start of 'ora.mdnsd' on '18c1' succeeded
CRS-2676: Start of 'ora.evmd' on '18c1' succeeded
CRS-2672: Attempting to start 'ora.gpnpd' on '18c1'
CRS-2676: Start of 'ora.gpnpd' on '18c1' succeeded
CRS-2672: Attempting to start 'ora.gipcd' on '18c1'
CRS-2676: Start of 'ora.gipcd' on '18c1' succeeded
CRS-2672: Attempting to start 'ora.cssdmonitor' on '18c1'
CRS-2676: Start of 'ora.cssdmonitor' on '18c1' succeeded
CRS-2672: Attempting to start 'ora.crf' on '18c1'
CRS-2672: Attempting to start 'ora.cssd' on '18c1'
CRS-2672: Attempting to start 'ora.diskmon' on '18c1'
CRS-2676: Start of 'ora.diskmon' on '18c1' succeeded
CRS-2676: Start of 'ora.crf' on '18c1' succeeded
CRS-2676: Start of 'ora.cssd' on '18c1' succeeded
CRS-2672: Attempting to start 'ora.cluster_interconnect.haip' on '18c1'
CRS-2672: Attempting to start 'ora.ctssd' on '18c1'
CRS-2676: Start of 'ora.ctssd' on '18c1' succeeded
CRS-2676: Start of 'ora.cluster_interconnect.haip' on '18c1' succeeded
CRS-2672: Attempting to start 'ora.asm' on '18c1'
CRS-2676: Start of 'ora.asm' on '18c1' succeeded
CRS-2672: Attempting to start 'ora.storage' on '18c1'
CRS-2676: Start of 'ora.storage' on '18c1' succeeded
CRS-2672: Attempting to start 'ora.crsd' on '18c1'
CRS-2676: Start of 'ora.crsd' on '18c1' succeeded
CRS-6023: Starting Oracle Cluster Ready Services-managed resources
CRS-6017: Processing resource auto-start for servers: 18c1
CRS-6016: Resource auto-start has completed for server 18c1
CRS-6024: Completed start of Oracle Cluster Ready Services-managed resources
CRS-4123: Oracle High Availability Services has been started.
2020/03/16 19:24:23 CLSRSC-343: Successfully started Oracle Clusterware stack
2020/03/16 19:24:23 CLSRSC-594: Executing installation step 19 of 20: 'ConfigNode'.
CRS-2672: Attempting to start 'ora.ASMNET1LSNR_ASM.lsnr' on '18c1'
CRS-2676: Start of 'ora.ASMNET1LSNR_ASM.lsnr' on '18c1' succeeded
CRS-2672: Attempting to start 'ora.asm' on '18c1'
CRS-2676: Start of 'ora.asm' on '18c1' succeeded
CRS-2672: Attempting to start 'ora.CRS.dg' on '18c1'
CRS-2676: Start of 'ora.CRS.dg' on '18c1' succeeded
2020/03/16 19:27:00 CLSRSC-594: Executing installation step 20 of 20: 'PostConfig'.
2020/03/16 19:29:03 CLSRSC-325: Configure Oracle Grid Infrastructure for a Cluster ... succeeded 

[root@18c2 /]# ./u01/app/18.0.0/grid/root.sh
Performing root user operation.

The following environment variables are set as:
    ORACLE_OWNER= grid
    ORACLE_HOME=  /u01/app/18.0.0/grid

Enter the full pathname of the local bin directory: [/usr/local/bin]: 
   Copying dbhome to /usr/local/bin ...
   Copying oraenv to /usr/local/bin ...
   Copying coraenv to /usr/local/bin ...


Creating /etc/oratab file...
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be performed.
Relinking oracle with rac_on option
Using configuration parameter file: /u01/app/18.0.0/grid/crs/install/crsconfig_params
The log of current session can be found at:
  /u01/app/grid/crsdata/18c2/crsconfig/rootcrs_18c2_2020-03-16_07-30-27PM.log
2020/03/16 19:30:47 CLSRSC-594: Executing installation step 1 of 20: 'SetupTFA'.
2020/03/16 19:30:47 CLSRSC-4001: Installing Oracle Trace File Analyzer (TFA) Collector.
2020/03/16 19:32:12 CLSRSC-4002: Successfully installed Oracle Trace File Analyzer (TFA) Collector.
2020/03/16 19:32:12 CLSRSC-594: Executing installation step 2 of 20: 'ValidateEnv'.
2020/03/16 19:32:12 CLSRSC-363: User ignored prerequisites during installation
2020/03/16 19:32:12 CLSRSC-594: Executing installation step 3 of 20: 'CheckFirstNode'.
2020/03/16 19:32:15 CLSRSC-594: Executing installation step 4 of 20: 'GenSiteGUIDs'.
2020/03/16 19:32:15 CLSRSC-594: Executing installation step 5 of 20: 'SaveParamFile'.
2020/03/16 19:32:19 CLSRSC-594: Executing installation step 6 of 20: 'SetupOSD'.
2020/03/16 19:32:20 CLSRSC-594: Executing installation step 7 of 20: 'CheckCRSConfig'.
2020/03/16 19:32:20 CLSRSC-594: Executing installation step 8 of 20: 'SetupLocalGPNP'.
2020/03/16 19:32:22 CLSRSC-594: Executing installation step 9 of 20: 'CreateRootCert'.
2020/03/16 19:32:22 CLSRSC-594: Executing installation step 10 of 20: 'ConfigOLR'.
2020/03/16 19:32:27 CLSRSC-594: Executing installation step 11 of 20: 'ConfigCHMOS'.
2020/03/16 19:32:27 CLSRSC-594: Executing installation step 12 of 20: 'CreateOHASD'.
2020/03/16 19:32:29 CLSRSC-594: Executing installation step 13 of 20: 'ConfigOHASD'.
2020/03/16 19:32:29 CLSRSC-330: Adding Clusterware entries to file 'oracle-ohasd.service'
2020/03/16 19:33:05 CLSRSC-594: Executing installation step 14 of 20: 'InstallAFD'.
2020/03/16 19:33:58 CLSRSC-594: Executing installation step 15 of 20: 'InstallACFS'.
CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on '18c2'
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on '18c2' has completed
CRS-4133: Oracle High Availability Services has been stopped.
CRS-4123: Oracle High Availability Services has been started.
2020/03/16 19:34:31 CLSRSC-594: Executing installation step 16 of 20: 'InstallKA'.
2020/03/16 19:34:33 CLSRSC-594: Executing installation step 17 of 20: 'InitConfig'.
CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on '18c2'
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on '18c2' has completed
CRS-4133: Oracle High Availability Services has been stopped.
CRS-4123: Oracle High Availability Services has been started.
CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on '18c2'
CRS-2673: Attempting to stop 'ora.drivers.acfs' on '18c2'
CRS-2677: Stop of 'ora.drivers.acfs' on '18c2' succeeded
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on '18c2' has completed
CRS-4133: Oracle High Availability Services has been stopped.
2020/03/16 19:35:14 CLSRSC-594: Executing installation step 18 of 20: 'StartCluster'.
CRS-4123: Starting Oracle High Availability Services-managed resources
CRS-2672: Attempting to start 'ora.mdnsd' on '18c2'
CRS-2672: Attempting to start 'ora.evmd' on '18c2'
CRS-2676: Start of 'ora.mdnsd' on '18c2' succeeded
CRS-2676: Start of 'ora.evmd' on '18c2' succeeded
CRS-2672: Attempting to start 'ora.gpnpd' on '18c2'
CRS-2676: Start of 'ora.gpnpd' on '18c2' succeeded
CRS-2672: Attempting to start 'ora.gipcd' on '18c2'
CRS-2676: Start of 'ora.gipcd' on '18c2' succeeded
CRS-2672: Attempting to start 'ora.cssdmonitor' on '18c2'
CRS-2676: Start of 'ora.cssdmonitor' on '18c2' succeeded
CRS-2672: Attempting to start 'ora.crf' on '18c2'
CRS-2672: Attempting to start 'ora.cssd' on '18c2'
CRS-2672: Attempting to start 'ora.diskmon' on '18c2'
CRS-2676: Start of 'ora.diskmon' on '18c2' succeeded
CRS-2676: Start of 'ora.crf' on '18c2' succeeded
CRS-2676: Start of 'ora.cssd' on '18c2' succeeded
CRS-2672: Attempting to start 'ora.cluster_interconnect.haip' on '18c2'
CRS-2672: Attempting to start 'ora.ctssd' on '18c2'
CRS-2676: Start of 'ora.ctssd' on '18c2' succeeded
CRS-2672: Attempting to start 'ora.crsd' on '18c2'
CRS-2676: Start of 'ora.crsd' on '18c2' succeeded
CRS-2676: Start of 'ora.cluster_interconnect.haip' on '18c2' succeeded
CRS-2672: Attempting to start 'ora.asm' on '18c2'
CRS-2676: Start of 'ora.asm' on '18c2' succeeded
CRS-6017: Processing resource auto-start for servers: 18c2
CRS-2673: Attempting to stop 'ora.LISTENER_SCAN1.lsnr' on '18c1'
CRS-2672: Attempting to start 'ora.ASMNET1LSNR_ASM.lsnr' on '18c2'
CRS-2672: Attempting to start 'ora.ons' on '18c2'
CRS-2677: Stop of 'ora.LISTENER_SCAN1.lsnr' on '18c1' succeeded
CRS-2673: Attempting to stop 'ora.scan1.vip' on '18c1'
CRS-2677: Stop of 'ora.scan1.vip' on '18c1' succeeded
CRS-2672: Attempting to start 'ora.scan1.vip' on '18c2'
CRS-2676: Start of 'ora.scan1.vip' on '18c2' succeeded
CRS-2672: Attempting to start 'ora.LISTENER_SCAN1.lsnr' on '18c2'
CRS-2676: Start of 'ora.ASMNET1LSNR_ASM.lsnr' on '18c2' succeeded
CRS-2672: Attempting to start 'ora.asm' on '18c2'
CRS-2676: Start of 'ora.ons' on '18c2' succeeded
CRS-2676: Start of 'ora.LISTENER_SCAN1.lsnr' on '18c2' succeeded
CRS-2676: Start of 'ora.asm' on '18c2' succeeded
CRS-2672: Attempting to start 'ora.proxy_advm' on '18c1'
CRS-2672: Attempting to start 'ora.proxy_advm' on '18c2'
CRS-2676: Start of 'ora.proxy_advm' on '18c1' succeeded
CRS-2676: Start of 'ora.proxy_advm' on '18c2' succeeded
CRS-6016: Resource auto-start has completed for server 18c2
CRS-6024: Completed start of Oracle Cluster Ready Services-managed resources
CRS-4123: Oracle High Availability Services has been started.
2020/03/16 19:38:09 CLSRSC-343: Successfully started Oracle Clusterware stack
2020/03/16 19:38:09 CLSRSC-594: Executing installation step 19 of 20: 'ConfigNode'.
2020/03/16 19:38:34 CLSRSC-594: Executing installation step 20 of 20: 'PostConfig'.
2020/03/16 19:39:07 CLSRSC-325: Configure Oracle Grid Infrastructure for a Cluster ... succeeded

检查集群信息

[root@18c1 /]# su - grid
Last login: Mon Mar 16 19:40:16 CST 2020
[grid@18c1 ~]$ crsctl stat res -t
--------------------------------------------------------------------------------
Name           Target  State        Server                   State details       
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.ASMNET1LSNR_ASM.lsnr
               ONLINE  ONLINE       18c1                     STABLE
               ONLINE  ONLINE       18c2                     STABLE
ora.CRS.GHCHKPT.advm
               OFFLINE OFFLINE      18c1                     STABLE
               OFFLINE OFFLINE      18c2                     STABLE
ora.CRS.dg
               ONLINE  ONLINE       18c1                     STABLE
               ONLINE  ONLINE       18c2                     STABLE
ora.LISTENER.lsnr
               ONLINE  ONLINE       18c1                     STABLE
               ONLINE  ONLINE       18c2                     STABLE
ora.crs.ghchkpt.acfs
               OFFLINE OFFLINE      18c1                     volume /opt/oracle/r
                                                             hp_images/chkbase is
                                                             unmounted,STABLE
               OFFLINE OFFLINE      18c2                     STABLE
ora.helper
               OFFLINE OFFLINE      18c1                     STABLE
               OFFLINE OFFLINE      18c2                     IDLE,STABLE
ora.net1.network
               ONLINE  ONLINE       18c1                     STABLE
               ONLINE  ONLINE       18c2                     STABLE
ora.ons
               ONLINE  ONLINE       18c1                     STABLE
               ONLINE  ONLINE       18c2                     STABLE
ora.proxy_advm
               ONLINE  ONLINE       18c1                     STABLE
               ONLINE  ONLINE       18c2                     STABLE
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.18c1.vip
      1        ONLINE  ONLINE       18c1                     STABLE
ora.18c2.vip
      1        ONLINE  ONLINE       18c2                     STABLE
ora.LISTENER_SCAN1.lsnr
      1        ONLINE  ONLINE       18c2                     STABLE
ora.LISTENER_SCAN2.lsnr
      1        ONLINE  ONLINE       18c1                     STABLE
ora.LISTENER_SCAN3.lsnr
      1        ONLINE  ONLINE       18c1                     STABLE
ora.MGMTLSNR
      1        OFFLINE OFFLINE                               STABLE
ora.asm
      1        ONLINE  ONLINE       18c1                     Started,STABLE
      2        ONLINE  ONLINE       18c2                     Started,STABLE
      3        OFFLINE OFFLINE                               STABLE
ora.cvu
      1        ONLINE  ONLINE       18c1                     STABLE
ora.qosmserver
      1        ONLINE  ONLINE       18c1                     STABLE
ora.rhpserver
      1        OFFLINE OFFLINE                               STABLE
ora.scan1.vip
      1        ONLINE  ONLINE       18c2                     STABLE
ora.scan2.vip
      1        ONLINE  ONLINE       18c1                     STABLE
ora.scan3.vip
      1        ONLINE  ONLINE       18c1                     STABLE
--------------------------------------------------------------------------------


安装数据库软件

[oracle@18c1 soft]$ unzip LINUX.X64_180000_db_home.zip -d /u01/app/oracle/18.0.0/db 

[root@18c1 ~]# xhost +
access control disabled, clients can connect from any host
[root@18c1 ~]# su - oracle
Last login: Mon Mar 16 17:20:14 CST 2020 on pts/0
[oracle@18c1 ~]$ cd  $ORACLE_HOME
[oracle@18c1  db]$ export DISPLAY=10.138.130.242:0.0
[oracle@18c1 db]$ ./runInstaller 











以 root用户在所有节点上执行以下脚本,先在主节点执行

[root@18c1 /]# ./u01/app/oracle/18.0.0/db/root.sh
Performing root user operation.

The following environment variables are set as:
    ORACLE_OWNER= oracle
    ORACLE_HOME=  /u01/app/oracle/18.0.0/db

Enter the full pathname of the local bin directory: [/usr/local/bin]: 
The contents of "dbhome" have not changed. No need to overwrite.
The contents of "oraenv" have not changed. No need to overwrite.
The contents of "coraenv" have not changed. No need to overwrite.

Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be performed.

[root@18c2 /]# ./u01/app/oracle/18.0.0/db/root.sh
Performing root user operation.

The following environment variables are set as:
    ORACLE_OWNER= oracle
    ORACLE_HOME=  /u01/app/oracle/18.0.0/db

Enter the full pathname of the local bin directory: [/usr/local/bin]: 
The contents of "dbhome" have not changed. No need to overwrite.
The contents of "oraenv" have not changed. No need to overwrite.
The contents of "coraenv" have not changed. No need to overwrite.

Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be performed.

创建数据库jycs

[oracle@jytest1 database]$ dbca
















检查数据库配置信息

[grid@18c2 18.0.0]$ crsctl stat res -t
--------------------------------------------------------------------------------
Name           Target  State        Server                   State details       
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.ASMNET1LSNR_ASM.lsnr
               ONLINE  ONLINE       18c1                     STABLE
               ONLINE  ONLINE       18c2                     STABLE
ora.CRS.GHCHKPT.advm
               OFFLINE OFFLINE      18c1                     STABLE
               OFFLINE OFFLINE      18c2                     STABLE
ora.CRS.dg
               ONLINE  ONLINE       18c1                     STABLE
               ONLINE  ONLINE       18c2                     STABLE
ora.DATA.dg
               ONLINE  ONLINE       18c1                     STABLE
               ONLINE  ONLINE       18c2                     STABLE
ora.LISTENER.lsnr
               ONLINE  ONLINE       18c1                     STABLE
               ONLINE  ONLINE       18c2                     STABLE
ora.chad
               ONLINE  ONLINE       18c1                     STABLE
               ONLINE  ONLINE       18c2                     STABLE
ora.crs.ghchkpt.acfs
               OFFLINE OFFLINE      18c1                     STABLE
               OFFLINE OFFLINE      18c2                     STABLE
ora.helper
               OFFLINE OFFLINE      18c1                     IDLE,STABLE
               OFFLINE OFFLINE      18c2                     IDLE,STABLE
ora.net1.network
               ONLINE  ONLINE       18c1                     STABLE
               ONLINE  ONLINE       18c2                     STABLE
ora.ons
               ONLINE  ONLINE       18c1                     STABLE
               ONLINE  ONLINE       18c2                     STABLE
ora.proxy_advm
               ONLINE  ONLINE       18c1                     STABLE
               ONLINE  ONLINE       18c2                     STABLE
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.18c1.vip
      1        ONLINE  ONLINE       18c1                     STABLE
ora.18c2.vip
      1        ONLINE  ONLINE       18c2                     STABLE
ora.LISTENER_SCAN1.lsnr
      1        ONLINE  ONLINE       18c2                     STABLE
ora.LISTENER_SCAN2.lsnr
      1        ONLINE  ONLINE       18c1                     STABLE
ora.LISTENER_SCAN3.lsnr
      1        ONLINE  ONLINE       18c1                     STABLE
ora.MGMTLSNR
      1        ONLINE  ONLINE       18c1                     169.254.11.99 88.88.
                                                             87.1,STABLE
ora.asm
      1        ONLINE  ONLINE       18c1                     Started,STABLE
      2        ONLINE  ONLINE       18c2                     Started,STABLE
      3        OFFLINE OFFLINE                               STABLE
ora.cvu
      1        ONLINE  ONLINE       18c1                     STABLE
ora.jycs.db
      1        ONLINE  ONLINE       18c1                     Open,HOME=/u01/app/o
                                                             racle/18.0.0/db,STAB
                                                             LE
      2        ONLINE  ONLINE       18c2                     Open,HOME=/u01/app/o
                                                             racle/18.0.0/db,STAB
                                                             LE
ora.mgmtdb
      1        ONLINE  ONLINE       18c1                     Open,STABLE
ora.qosmserver
      1        ONLINE  ONLINE       18c1                     STABLE
ora.rhpserver
      1        OFFLINE OFFLINE                               STABLE
ora.scan1.vip
      1        ONLINE  ONLINE       18c2                     STABLE
ora.scan2.vip
      1        ONLINE  ONLINE       18c1                     STABLE
ora.scan3.vip
      1        ONLINE  ONLINE       18c1                     STABLE
--------------------------------------------------------------------------------

到此18C RAC for Oracle Linux 7.1的安装完成!