RHCA培训+认证,助同学们实现梦想         RHCE9 1月周末班 正在授课 欢迎试学         2025—芬芳四季,感恩有您         2025元旦放假通知         PostgreSQL 高级认证考试         PostgreSQL 中级认证考试(DBA 方向)         PostgreSQL 初级认证考试         EULER(欧拉)操作系统,見证RHCE的代表性!         19cOCP 9月周末班 正在授课 欢迎试听         PGCE 认证专家,周末班报名中,欢迎垂询         

oracle 19c 如何使数据库不随GI启动而启动

更新时间: 2021-10-17 15:17

应该说是12c以上版本,如何使数据库不随GI启动而启动

以下提供了几种方式,几种方式,只需要提供其中一种即可。


1.修改策略为手工
[grid@dbserver ~]$ srvctl modify database -d orcl1 -h

Modifies the configuration for the database.

Usage: srvctl modify database -db <db_unique_name> [-dbname <db_name>] [-instance <inst_name>] [-oraclehome <oracle_home>] [-user <oracle_user>] [-domain <domain>] [-spfile <spfile>] [-pwfile <password_file_path>] [-role {PRIMARY | PHYSICAL_STANDBY | LOGICAL_STANDBY | SNAPSHOT_STANDBY}] [-startoption <start_options>] [-stopoption <stop_options>] [-policy {AUTOMATIC | MANUAL | NORESTART | USERONLY}] [-diskgroup "<diskgroup_list>"|-nodiskgroup] [-force]
    -db <db_unique_name>           Unique name for the database
    -dbname <db_name>              Database name (DB_NAME), if different from the unique name given by the -db option
    -instance <inst_name>          Instance name
    -oraclehome <path>             Oracle home path
    -user <oracle_user>            Oracle user
    -domain <domain_name>          Domain for database. Must be set if database has DB_DOMAIN set.
    -spfile <spfile>               Server parameter file path
    -pwfile <password_file_path>   Password file path
    -role <role>                   Role of the database (PRIMARY, PHYSICAL_STANDBY, LOGICAL_STANDBY, SNAPSHOT_STANDBY)
    -startoption <start_options>   Startup options for the database. Examples of startup options are OPEN, MOUNT, or "READ ONLY".
    -stopoption <stop_options>     Stop options for the database. Examples of shutdown options are NORMAL, TRANSACTIONAL, IMMEDIATE, or ABORT.
    -policy <dbpolicy>             Management policy for the database (AUTOMATIC, MANUAL, NORESTART or USERONLY)
    -diskgroup "<diskgroup_list>"  Comma separated list of disk group names
    -nodiskgroup                   To remove database's dependency upon disk groups
    -force                         Force the modify operation to stop database and service resources on some nodes as necessary, or to change management policy of all service to match new database management policy
    -verbose                       Verbose output
    -help                          Print usage



[grid@dbserver ~]$ srvctl modify database -db orcl1 -policy  MANUAL



[grid@dbserver ~]$ srvctl config database -d orcl1
Database unique name: orcl1
Database name: orcl1
Oracle home: /u01/app/oracle/product/19.10.0/db_1
Oracle user: grid
Spfile: +DATA/ORCL1/PARAMETERFILE/spfile.277.1062774613
Password file:
Domain:
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: MANUAL
Disk Groups: DATA
Services:
OSDBA group:
OSOPER group:
Database instance: orcl1


2.使用srvctl disable database

  srvctl disable database -d orcl1

  [grid@dbserver ~]$ srvctl disable database -db orcl1

3.使用 crsctl modify resource
[grid@dbserver ~]$ crsctl modify resource ora.orcl1.db -attr AUTO_START=never
CRS-4995:  The command 'Modify  resource' is invalid in crsctl. Use srvctl for this command.

12c以前,这样可以,12c以后,需要加上  -unsupported

[grid@dbserver ~]$  crsctl modify resource ora.orcl1.db -attr AUTO_START=never  -unsupported

[grid@dbserver ~]$ crsctl stat res ora.orcl1.db -p |grep -i auto_start
AUTO_START=never

开班信息MORE>>

课程名称 开课时间 上课类型 状态
OCP认证培训 1月 周末班 授课中...
RHCE培训 1月 周末班 授课中...
OCP培训 2月 精英班 报名中...
PGCE 专家 3月 周末班 报名中...
OCM培训 2月 周末班 报名中...
RHCE培训 常年 周末班 报名中...
MySQL培训 常年 周末班 报名中...
<<