设为首页收藏本站

Botang唐波's Oracle Station

查看: 83|回复: 0

课程第50/51/52次(2018-10-26星期五、2018-10-29星期一和2018-11-02星期五)

[复制链接]

744

主题

1117

帖子

8077

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
8077
发表于 2018-10-26 20:06:04 | 显示全部楼层 |阅读模式
12c OCM要学会用帮助:
  1. [oracle@station11 ~]$ srvctl add service  -h

  2. Adds a service configuration to the Oracle Clusterware.

  3. Usage: srvctl add service -db <db_unique_name> -service <service_name> {-preferred "<preferred_list>" [-available "<available_list>"] [-tafpolicy {BASIC | NONE | PRECONNECT}] | -serverpool <pool_name> [-cardinality {UNIFORM | SINGLETON}] } [-netnum <network_number>] [-role "[PRIMARY][,PHYSICAL_STANDBY][,LOGICAL_STANDBY][,SNAPSHOT_STANDBY]"] [-policy {AUTOMATIC | MANUAL}] [-notification {TRUE|FALSE}] [-dtp {TRUE|FALSE}] [-clbgoal {SHORT|LONG}] [-rlbgoal {NONE|SERVICE_TIME|THROUGHPUT}] [-failovertype {NONE|SESSION|SELECT|TRANSACTION}] [-failovermethod {NONE|BASIC}] [-failoverretry <failover_retries>] [-failoverdelay <failover_delay>] [-edition <edition>] [-pdb <pluggable_database>] [-global {TRUE|FALSE}] [-maxlag <max_lag_time>] [-sql_translation_profile <sql_translation_profile>] [-commit_outcome {TRUE|FALSE}] [-retention <retention>] [-replay_init_time <replay_initiation_time>] [-session_state {STATIC|DYNAMIC}] [-pqservice <pq_service>] [-pqpool <pq_pool_list>] [-gsmflags <gsm_flags>] [-force] [-eval] [-verbose]
  4.     -db <db_unique_name>           Unique name for the database
  5.     -service <service>             Service name
  6.     -preferred "<preferred_list>"  Comma separated list of preferred instances
  7.     -available "<available_list>"  Comma separated list of available instances
  8.     -serverpool <pool_name>        Server pool name
  9.     -cardinality                   (UNIFORM | SINGLETON) Service runs on every active server in the server pool hosting this service (UNIFORM) or just one server (SINGLETON)
  10.     -netnum  <network_number>      Network number (default number is 1)
  11.     -tafpolicy                     (NONE | BASIC | PRECONNECT)        TAF policy specification
  12.     -role <role>                   Role of the service (primary, physical_standby, logical_standby, snapshot_standby)
  13.     -policy <policy>               Management policy for the service (AUTOMATIC or MANUAL)
  14.     -failovertype                  (NONE | SESSION | SELECT | TRANSACTION)      Failover type
  15.     -failovermethod                (NONE | BASIC)     Failover method
  16.     -failoverdelay <failover_delay> Failover delay (in seconds)
  17.     -failoverretry <failover_retries> Number of attempts to retry connection
  18.     -edition <edition>             Edition (or "" for empty edition value)
  19.     -pdb <pluggable_database>      Pluggable database name
  20.     -maxlag <maximum replication lag> Maximum replication lag time in seconds (Non-negative integer, default value is 'ANY')
  21.     -clbgoal                       (SHORT | LONG)                   Connection Load Balancing Goal. Default is LONG.
  22.     -rlbgoal                       (SERVICE_TIME | THROUGHPUT | NONE)     Runtime Load Balancing Goal
  23.     -dtp                           (TRUE | FALSE)  Distributed Transaction Processing
  24.     -notification                  (TRUE | FALSE)  Enable Fast Application Notification (FAN) for OCI connections
  25.     -global <global>               Global attribute (TRUE or FALSE)
  26.     -preferred <new_pref_inst>     Name of new preferred instance
  27.     -available <new_avail_inst>    Name of new available instance
  28.     -sql_translation_profile <sql_translation_profile> Specify a database object for SQL translation profile
  29.     -commit_outcome                (TRUE | FALSE)          Commit outcome
  30.     -retention <retention>         Specifies the number of seconds the commit outcome is retained
  31.     -replay_init_time <replay_init_time> Seconds after which replay will not be initiated
  32.     -session_state <session_state> Session state consistency (STATIC or DYNAMIC)
  33.     -pqservice <pq_service>        Parallel query service name
  34.     -pqpool <pq_pool>              Parallel query server pool name
  35.     -gsmflags <gsm_flags>          Set locality and region failover values
  36.     -eval                          Evaluates the effects of event without making any changes to the system
  37. Usage: srvctl add service -db <db_unique_name> -service <service_name> -update {-preferred "<new_pref_inst>" | -available "<new_avail_inst>"} [-force] [-verbose]
  38.     -db <db_unique_name>           Unique name for the database
  39.     -service <service>             Service name
  40.     -update                        Add a new instance to service configuration
  41.     -preferred <new_pref_inst>     Name of new preferred instance
  42.     -available <new_avail_inst>    Name of new available instance
  43.     -force                         Force the add operation even though a listener is not configured for a network
  44.     -verbose                       Verbose output
  45.     -help                          Print usage
复制代码

  1. [oracle@station11 ~]$ srvctl stop instance -db racdb -node station12  -force
  2. [oracle@station11 ~]$ srvctl status database -db racdb
  3. Instance RACDB_2 is running on node station11
  4. Instance RACDB_1 is not running on node station12
  5. [oracle@station11 ~]$ srvctl convert database -h

  6. Convert RAC One Node database to RAC database having one instance.

  7. Usage: srvctl convert database -db <db_unique_name> -dbtype RAC [-node <node>]
  8.     -db <db_unique_name>           Unique name of database to convert
  9.     -dbtype <type>                 Type of database to which to convert: RAC
  10.     -node <node>                   Candidate server for administrator-managed RAC database to run on
  11.     -help                          Print usage

  12. Convert RAC database having one instance to RAC One Node database.

  13. Usage: srvctl convert database -db <db_unique_name> -dbtype RACONENODE [-instance <inst_name>] [-timeout <timeout>]
  14.     -db <db_unique_name>           Unique name of database to convert
  15.     -dbtype <type>                 Type of database to which to convert: RACONENODE
  16.     -instance <inst_name>          Instance name prefix; required for administrator-managed RAC One Node database
  17.     -timeout <timeout>             Online relocation timeout in minutes
  18.     -help                          Print usage
复制代码

12c OCMDataguard:
  1. DGMGRL> edit database 'prod5h1' set property TransportLagThreshold=30;
  2. Property "transportlagthreshold" updated
  3. DGMGRL> edit database 'prod5h2' set property TransportLagThreshold=30;
  4. Property "transportlagthreshold" updated
  5. DGMGRL> edit database 'prod5h1' set property ApplyLagThreshold=45;
  6. Property "applylagthreshold" updated
  7. DGMGRL> edit database 'prod5h2' set property ApplyLagThreshold=45;
  8. Property "applylagthreshold" updated
复制代码

12c MAA环境(可以在16G内存的笔记本环境中实现):
Screenshot.png





回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|手机版|Botang唐波's Oracle Station   

GMT+8, 2018-11-18 01:08 , Processed in 0.175802 second(s), 27 queries .

快速回复 返回顶部 返回列表