botang 发表于 2020-3-23 19:43:00

课程第23次:2020-03-23星期一

在客户端上做:RACDB =
(DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = scan4.example.com)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = racdb.example.com)
    )
)


SRV1 =
(DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = scan4.example.com)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = srv1.example.com)
    )
)




Usage: srvctl add service -d -s {-r "" [-a ""] [-P {BASIC | NONE | PRECONNECT}] | -g [-c {UNIFORM. SINGLETON}] } [-k   ] [-l [,PHYSICAL_STANDBY][,LOGICAL_STANDBY][,SNAPSHOT_STANDBY]] [-y {AUTOMATIC | MANUAL}] [-q {TRUE|FALSE}] [-x {TRUE|FALSE}] [-j {SHORT|LONG}] [-B {NONE|SERVICE_TIME|THROUGHPUT}] [-e {NONE|SESSION|SELECT}] [-m {NONE|BASIC}] [-z ] [-w ] [-t ] [-f]
    -d       Unique name for the database
    -s            Service name
    -r ""    Comma separated list of preferred instances
    -a ""    Comma separated list of available instances
    -g            Server pool name
    -c {UNIFORM. SINGLETON} Service runs on every active server in the server pool hosting this service (UNIFORM) or just one server (SINGLETON)
    -k            network number (default number is 1)
    -P {NONE | BASIC | PRECONNECT}      TAF policy specification
    -l               Role of the service (primary, physical_standby, logical_standby, snapshot_standby)
    -y               Management policy for the service (AUTOMATIC or MANUAL)
    -e      Failover type (NONE, SESSION, or SELECT)
    -m      Failover method (NONE or BASIC)
    -w            Failover delay
    -z            Failover retries
    -t            Edition (or "" for empty edition value)
    -j   Connection Load Balancing Goal (SHORT or LONG). Default is LONG.
    -B      Runtime Load Balancing Goal (SERVICE_TIME, THROUGHPUT, or NONE)
    -x   Distributed Transaction Processing (TRUE or FALSE)
    -q AQ HA notifications (TRUE or FALSE)
Usage: srvctl add service -d -s -u {-r "" | -a ""} [-f]
    -d       Unique name for the database
    -s            Service name
    -u                     Add a new instance to service configuration
    -r      Name of new preferred instance
    -a       Name of new available instance
    -f                     Force the add operation even though a listener is not configured for a network
    -h                     Print usage


srvctl add service -s srv1 -d racdb-serverpool srvpool1
srvctl modify service -s srv1 -q TRUE -P BASIC -e SELECT -z 180 -w 5 -j LONG-d racdb -y automatic
srvctl start service -s srv1 -d racdb
selectinst_id , machine, statusfrom gv$session where username='HR';
selectinst_id, host_namefrom gv$instance;

1. FIREWALLD的zone匹配

---对classroom.example.com启用防火墙:

页: [1]
查看完整版本: 课程第23次:2020-03-23星期一