暂无图片
分享
朱贺
2019-08-19
ORACLE 11gr2 RAC 新建库后原有server pool无法启动

主要诉求:想用原有rac环境再建一个db
创建成功后可以通过sqlplus的方式启动数据库,但crs不能动态识别库状态

[oracle@host01 bin]$ export ORACLE_SID=RACDB_1
[oracle@host01 bin]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.3.0 Production on Mon Aug 19 21:33:37 2019

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

Connected to an idle instance.

SQL> startup
ORACLE instance started.

Total System Global Area  196681728 bytes
Fixed Size                  1343864 bytes
Variable Size             134221448 bytes
Database Buffers           58720256 bytes
Redo Buffers                2396160 bytes
Database mounted.
Database opened.
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options
[oracle@host01 bin]$ ./crsctl stat res -t
--------------------------------------------------------------------------------
NAME           TARGET  STATE        SERVER                   STATE_DETAILS      
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.ACFS.dg
               ONLINE  ONLINE       host01                                      
               ONLINE  ONLINE       host02                                      
ora.DATA.dg
               ONLINE  ONLINE       host01                                      
               ONLINE  ONLINE       host02                                      
ora.FRA.dg
               ONLINE  ONLINE       host01                                      
               ONLINE  ONLINE       host02                                      
ora.LISTENER.lsnr
               ONLINE  ONLINE       host01                                      
               ONLINE  ONLINE       host02                                      
ora.asm
               ONLINE  ONLINE       host01                   Started            
               ONLINE  ONLINE       host02                   Started            
ora.gsd
               OFFLINE OFFLINE      host01                                      
               OFFLINE OFFLINE      host02                                      
ora.net1.network
               ONLINE  ONLINE       host01                                      
               ONLINE  ONLINE       host02                                      
ora.ons
               ONLINE  ONLINE       host01                                      
               ONLINE  ONLINE       host02                                      
ora.registry.acfs
               ONLINE  ONLINE       host01                                      
               ONLINE  ONLINE       host02                                      
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
      1        ONLINE  ONLINE       host02                                      
ora.LISTENER_SCAN2.lsnr
      1        ONLINE  ONLINE       host02                                      
ora.LISTENER_SCAN3.lsnr
      1        ONLINE  ONLINE       host01                                      
ora.ai.db
      1        ONLINE  ONLINE       host01                   Open               
      2        ONLINE  ONLINE       host02                   Open               
ora.cvu
      1        ONLINE  ONLINE       host01                                      
ora.host01.vip
      1        ONLINE  ONLINE       host01                                      
ora.host02.vip
      1        ONLINE  ONLINE       host02                                      
ora.oc4j
      1        ONLINE  ONLINE       host01                                      
ora.racdb.db
      1        ONLINE  OFFLINE                               Instance Shutdown  
      2        ONLINE  OFFLINE                               Instance Shutdown  
ora.scan1.vip
      1        ONLINE  ONLINE       host02                                      
ora.scan2.vip
      1        ONLINE  ONLINE       host02                                      
ora.scan3.vip
      1        ONLINE  ONLINE       host01  

使用srvctl命令启动后:

[oracle@host01 bin]$ srvctl start database -d RACDB
PRCR-1079 : Failed to start resource ora.racdb.db
CRS-2643: The server pool(s) where resource 'ora.racdb.db' could run have no servers

找了很长时间crsctl和srvctl没有找到启动srvpool的命令

查看监听信息:

Listener Parameter File   /u01/app/11.2.0/grid/network/admin/listener.ora
Listener Log File         /u01/app/grid/diag/tnslsnr/host01/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.0.2.113)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.0.2.101)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.0.2.103)(PORT=1521)))
Services Summary...
Service "+ASM" has 1 instance(s).
  Instance "+ASM1", status READY, has 1 handler(s) for this service...
Service "RACDB" has 2 instance(s).
  Instance "RACDB", status UNKNOWN, has 1 handler(s) for this service...
  Instance "RACDB_1", status READY, has 2 handler(s) for this service...
Service "RACDBXDB" has 1 instance(s).
  Instance "RACDB_1", status READY, has 1 handler(s) for this service...
Service "ai" has 3 instance(s).
  Instance "ai", status UNKNOWN, has 1 handler(s) for this service...
  Instance "ai1", status READY, has 2 handler(s) for this service...
  Instance "ai2", status READY, has 1 handler(s) for this service...
Service "aiXDB" has 2 instance(s).
  Instance "ai1", status READY, has 1 handler(s) for this service...
  Instance "ai2", status READY, has 1 handler(s) for this service...
The command completed successfully

----------------------------------------

远程连接没问题:

[oracle@edbjr2p1 admin]$ sqlplus sys/oracle@racdb as sysdba

SQL*Plus: Release 11.2.0.3.0 Production on Mon Aug 19 22:30:15 2019

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


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options

SQL> sho parameter name

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
db_file_name_convert                 string
db_name                              string      RACDB
db_unique_name                       string      RACDB
global_names                         boolean     FALSE
instance_name                        string      RACDB_1
lock_name_space                      string
log_file_name_convert                string
processor_group_name                 string
service_names                        string      RACDB
SQL> !hostname
edbjr2p1

请问,如何让crs动态识别库状态信息

收藏
分享
5条回答
默认
最新
始于脚下

通过srvctl config database检查一下集群中数据库的相关配置是否正确,然后用srvctl start/stop database管理一下数据库,应该就好了,通过sqlplus命令直接startup有时候会有这种情况出现,然后通过srvctl管理一次就好了,你试试。

暂无图片 评论
暂无图片 有用 0
朱贺

[oracle@host01 bin]$ srvctl config database -d RACDB
Database unique name: RACDB
Database name: RACDB
Oracle home: /u01/app/oracle/product/11.2.0/dbhome_1
Oracle user: oracle
Spfile: +DATA/RACDB/spfileRACDB.ora
Domain:
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Server pools: OCMPOOL
Database instances:
Disk Groups: DATA,FRA
Mount point paths:
Services:
Type: RAC
Database is policy managed

------------------------------------------------------------------------------------------

因为新建db的原因装库时需要停掉之前的pool,查看pool信息如下:

[oracle@host01 bin]$ srvctl status srvpool
Server pool name: Free
Active servers count: 0
Server pool name: Generic
Active servers count: 2

Server pool name: OCMPOOL
Active servers count: 0

[oracle@host01 bin]$ srvctl config srvpool -g Generic
PRKO-3160 : Server pool Generic is internally managed as part of administrator-managed database configuration and therefore cannot be queried directly via srvpool object.

generic pool中应该是我新建的db,而老db---racdb所在的ocmpool count 为0,现在需要知道如何修改这个参数

暂无图片 评论
暂无图片 有用 0
朱贺

通过查找oracle提供了修改srvpool  -i -l的方式来增加权重但修改后并没有达到效果(使active servers count数值增加),还请专家指点

暂无图片 评论
暂无图片 有用 0
朱贺

貌似找到了答案,还是没太理解,下面这段意思是12c可以使多个库使用不同的pool了吗?

====================================================

Note:

Oracle Clusterware 11g release 2 (11.2) supports only a single server pool configuration. You must manually make any changes to the server pool configuration when you want the change to take effect.


-----------------------------------------------------------------------------------

In Oracle Clusterware 12c, you use the policies defined in the cluster configuration policy set for server pool specification and management, and Oracle Clusterware manages the server pools according to the policies in the policy set. With a cluster configuration policy set, for example, you can allocate more servers to OLTP workload during weekly business hours to respond to email demand, and on the weekends and evenings, allocate more servers to batch workloads, and perform transitions of server pool configuration or server allocation, atomically.


At any point in time, only one policy is in effect for the cluster. But you can create several different policies, so that you can configure pools of servers with parameters to reflect differences in requirements for the cluster based on business needs or demand, or based on calendar dates or times of the day.

====================================================


暂无图片 评论
暂无图片 有用 0
朱贺
问题已关闭:
暂无图片 评论
暂无图片 有用 0
回答交流
提交
问题信息
请登录之后查看
邀请回答
暂无人订阅该标签,敬请期待~~
暂无图片墨值悬赏