INST_A_SP =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = node1-vip)(PORT = 1521))
CREATE TABLESPACE SPLEXDAT DATAFILE SIZE 50M AUTOEXTEND ON NEXT 100M MAXSIZE 5G
LOGGING EXTENT MANAGEMENT LOCAL AUTOALLOCATE BLOCKSIZE 8K
SEGMENT SPACE MANAGEMENT AUTO FLASHBACK ON;
CREATE TABLESPACE SPLEXIDX DATAFILE SIZE 50M AUTOEXTEND ON NEXT 100M MAXSIZE 5G
LOGGING EXTENT MANAGEMENT LOCAL AUTOALLOCATE BLOCKSIZE 8K
SEGMENT SPACE MANAGEMENT AUTO FLASHBACK ON;
INST_A_SP =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = node1-vip)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = node2-vip)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcc)
(INSTANCE_NAME = orcc1)
)
)
INST_A_SP =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = node1-vip)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = node2-vip)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcc)
(INSTANCE_NAME = orcc2)
)
)
[root@node1 bin]# cat /etc/hosts
127.0.0.1 localhost
192.168.1.155 node1
192.168.1.156 node2
192.168.1.157 node1-vip
192.168.1.158 node2-vip
192.168.1.159 node-scan
10.10.5.155 node1-priv
10.10.5.156 node2-priv
192.168.1.10 inst_a-splex_vip
Utah Silo A (only on one of the nodes)
as root:
$ORACLE_HOME/bin/appvipcfg create -network=1 -ip=192.168.1.10 -vipname=shareplex.vip -user=orardbms -group=DBA
as oracle:
crsctl start resource shareplex.vip
[orardbms@node1 ~]$ ifconfig
bond0 Link encap:Ethernet HWaddr 00:0C:29:01:5E:6C
inet addr:192.168.1.155 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:fe01:5e6c/64 Scopeink
UP BROADCAST RUNNING MASTER MULTICAST MTU:1500 Metric:1
RX packets:239084 errors:0 dropped:0 overruns:0 frame:0
TX packets:235235 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:263041312 (250.8 MiB) TX bytes:171239478 (163.3 MiB)
bond0:1 Link encap:Ethernet HWaddr 00:0C:29:01:5E:6C
inet addr:192.168.1.157 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MASTER MULTICAST MTU:1500 Metric:1
bond0:2 Link encap:Ethernet HWaddr 00:0C:29:01:5E:6C
inet addr:192.168.1.10 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MASTER MULTICAST MTU:1500 Metric:1
bond1 Link encap:Ethernet HWaddr 00:0C:29:01:5E:80
inet addr:10.10.5.155 Bcast:10.10.5.255 Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:fe01:5e80/64 Scopeink
UP BROADCAST RUNNING MASTER MULTICAST MTU:1500 Metric:1
RX packets:114190 errors:0 dropped:0 overruns:0 frame:0
TX packets:86618 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:81530237 (77.7 MiB) TX bytes:43836253 (41.8 MiB)
bond1:1 Link encap:Ethernet HWaddr 00:0C:29:01:5E:80
inet addr:169.254.107.172 Bcast:169.254.255.255 Mask:255.255.0.0
UP BROADCAST RUNNING MASTER MULTICAST MTU:1500 Metric:1
eth0 Link encap:Ethernet HWaddr 00:0C:29:01:5E:6C
inet6 addr: fe80::20c:29ff:fe01:5e6c/64 Scopeink
UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1
RX packets:238815 errors:0 dropped:0 overruns:0 frame:0
TX packets:235229 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:263017683 (250.8 MiB) TX bytes:171239010 (163.3 MiB)
eth1 Link encap:Ethernet HWaddr 00:0C:29:01:5E:6C
inet6 addr: fe80::20c:29ff:fe01:5e6c/64 Scopeink
UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1
RX packets:269 errors:0 dropped:0 overruns:0 frame:0
TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:23629 (23.0 KiB) TX bytes:468 (468.0 b)
eth2 Link encap:Ethernet HWaddr 00:0C:29:01:5E:80
UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1
RX packets:114004 errors:0 dropped:0 overruns:0 frame:0
TX packets:86612 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:81497458 (77.7 MiB) TX bytes:43835785 (41.8 MiB)
eth3 Link encap:Ethernet HWaddr 00:0C:29:01:5E:80
inet6 addr: fe80::20c:29ff:fe01:5e80/64 Scopeink
UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1
RX packets:186 errors:0 dropped:0 overruns:0 frame:0
TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:32779 (32.0 KiB) TX bytes:468 (468.0 b)
lo Link encapocal Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:22735 errors:0 dropped:0 overruns:0 frame:0
TX packets:22735 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:15039669 (14.3 MiB) TX bytes:15039669 (14.3 MiB)
[orardbms@node1 ~]$ cat /etc/hosts
127.0.0.1 localhost
192.168.1.155 node1
192.168.1.156 node2
192.168.1.157 node1-vip
192.168.1.158 node2-vip
192.168.1.159 node-scan
10.10.5.155 node1-priv
10.10.5.156 node2-priv
192.168.1.10 inst_a-splex_vip
[orardbms@node1 ~]$ ping inst_a-splex_vip
PING inst_a-splex_vip (192.168.1.10) 56(84) bytes of data.
64 bytes from inst_a-splex_vip (192.168.1.10): icmp_seq=1 ttl=64 time=0.020 ms
64 bytes from inst_a-splex_vip (192.168.1.10): icmp_seq=2 ttl=64 time=0.019 ms
^C
--- inst_a-splex_vip ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1867ms
rtt min/avg/max/mdev = 0.019/0.019/0.020/0.004 ms
[orardbms@node1 ~]$
[oragrid@node2 ~]$ crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora.ARCH.dg ora....up.type ONLINE ONLINE node1
ora.DATA.dg ora....up.type ONLINE ONLINE node1
ora....ER.lsnr ora....er.type ONLINE ONLINE node1
ora....N1.lsnr ora....er.type ONLINE ONLINE node2
ora.OCRVOTE.dg ora....up.type ONLINE ONLINE node1
ora.asm ora.asm.type ONLINE ONLINE node1
ora.cvu ora.cvu.type ONLINE ONLINE node2
ora.gsd ora.gsd.type OFFLINE OFFLINE
ora....network ora....rk.type ONLINE ONLINE node1
ora....SM1.asm application ONLINE ONLINE node1
ora....E1.lsnr application ONLINE ONLINE node1
ora.node1.gsd application OFFLINE OFFLINE
ora.node1.ons application ONLINE ONLINE node1
ora.node1.vip ora....t1.type ONLINE ONLINE node1
ora....SM2.asm application ONLINE ONLINE node2
ora....E2.lsnr application ONLINE ONLINE node2
ora.node2.gsd application OFFLINE OFFLINE
ora.node2.ons application ONLINE ONLINE node2
ora.node2.vip ora....t1.type ONLINE ONLINE node2
ora.oc4j ora.oc4j.type ONLINE ONLINE node2
ora.ons ora.ons.type ONLINE ONLINE node1
ora.orcc.db ora....se.type ONLINE ONLINE node1
ora....ry.acfs ora....fs.type ONLINE ONLINE node1
ora.scan1.vip ora....ip.type ONLINE ONLINE node2
shareplex.vip app....t1.type ONLINE ONLINE node1
[root@node2 ~]# su - orardbms
[orardbms@node2 ~]$ cat .bash_profile
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
PATH=$PATHHOME/bin
export PATH
export TMP=/tmp
export TMPDIR=$TMP
export ORACLE_HOSTNAME=node2
export ORACLE_UNQNAME=orcc
export ORACLE_BASE=/oracle/oracle_base
export ORACLE_HOME=/oracle/oracle_home
export ORACLE_SID=orcc2
export PATH=/usr/sbinPATH
export PATH=$ORACLE_HOME/binPATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export CLASSPATH=$ORACLE_HOME/JREORACLE_HOME/jlibORACLE_HOME/rdbms/jlib
SP_SYS_HOST_NAME="inst_a-splex_vip" ; export SP_SYS_HOST_NAME
SP_INSTALL_DIR="/u02/app/quest"; export SP_INSTALL_DIR
SP_SYS_VARDIR="${SP_INSTALL_DIR}/vardir" ; export SP_SYS_VARDIR
SP_SYS_PRODDIR="${SP_INSTALL_DIR}/sp" ; export SP_SYS_PRODDIR
SP_OCT_ASM_SID="+ASM2" ; export SP_OCT_ASM_SID
export PATH=/u02/app/quest/sp/binPATH
# ---------------------------------------------------
# UMASK
# ---------------------------------------------------
# Set the default file mode creation mask
# (umask) to 022 to ensure that the user performing
# the Oracle software installation creates files
# with 644 permissions.
# ---------------------------------------------------
umask 022
SP_SYS_HOST_NAME="inst_a-splex_vip" ; export SP_SYS_HOST_NAME
SP_INSTALL_DIR="/u02/app/quest"; export SP_INSTALL_DIR
SP_SYS_VARDIR="${SP_INSTALL_DIR}/vardir" ; export SP_SYS_VARDIR
SP_SYS_PRODDIR="${SP_INSTALL_DIR}/sp" ; export SP_SYS_PRODDIR
SP_OCT_ASM_SID="+ASM1" ; export SP_OCT_ASM_SID
SP_SYS_HOST_NAME="inst_a-splex_vip" ; export SP_SYS_HOST_NAME
SP_INSTALL_DIR="/u02/app/quest"; export SP_INSTALL_DIR
SP_SYS_VARDIR="${SP_INSTALL_DIR}/vardir" ; export SP_SYS_VARDIR
SP_SYS_PRODDIR="${SP_INSTALL_DIR}/sp" ; export SP_SYS_PRODDIR
SP_OCT_ASM_SID="+ASM2" ; export SP_OCT_ASM_SID
[orardbms@node2 ~]$ cat /etc/oratab
#Backup file is /oracle/oracle_home/srvm/admin/oratab.bak.node2 line added by Agent
#
# This file is used by ORACLE utilities. It is created by root.sh
# and updated by either Database Configuration Assistant while creating
# a database or ASM Configuration Assistant while creating ASM instance.
# A colon, ':', is used as the field terminator. A new line terminates
# the entry. Lines beginning with a pound sign, '#', are comments.
#
# Entries are of the form:
# $ORACLE_SIDORACLE_HOME:<N|Y>:
#
# The first and second fields are the system identifier and home
# directory of the database respectively. The third filed indicates
# to the dbstart utility that the database should , "Y", or should not,
# "N", be brought up at system boot time.
#
# Multiple entries with the same $ORACLE_SID are not allowed.
#
#
+ASM2:/grid/grid_home:N # line added by Agent
orcc:/oracle/oracle_home:N # line added by Agent
inst_a_sp:/oracle/oracle_home:N
create acfs filesystem on the rac.mount point /u02.调整权限及属组
[root@node1 bin]# export DISPLAY=192.168.1.1:0.0
[root@node1 bin]# xhost +
access control disabled, clients can connect from any host
xhost: must be on local machine to enable or disable access control.
[root@node1 bin]# su - oragrid
[oragrid@node1 ~]$ xhost +
access control disabled, clients can connect from any host
xhost: must be on local machine to enable or disable access control.
[oragrid@node1 ~]$ asmca
[oragrid@node1 ~]$ export LANG=C
[oragrid@node1 ~]$
[root@node1 bin]# id orardbms
uid=1101(orardbms) gid=1200(oinstall) 组=1200(oinstall),1204(asmdba),1201(dba),1202(oper)
[root@node1 bin]# chown -R orardbmsinstall /u02
[root@node1 bin]# chmod -R 775 /u02/
[root@node1 bin]# cd /
[root@node1 /]# ls -l | grep u02
drwxrwxr-x 4 orardbms oinstall 4096 11月 16 01:53 u02
[root@node1 /]# su - orardbms
[orardbms@node1 ~]$ mkdir -p /u02/app/quest/sp
[orardbms@node1 ~]$ mkdir -p /u02/app/quest/vardir
[orardbms@node1 ~]$
###########################rac node1 install shareplex
[BEGIN] 2016/11/15 18:00:54
[orardbms@node1 tmp]$ tar -xf shareplex-8.6.3-b171-oracle110-rh-40-amd64-m64.tar
[orardbms@node1 tmp]$ ls -ltr
??? 193740
-rwxr-xr-x 1 orardbms oinstall 99055976 1? 12 2016 SharePlex-8.6.3-b171-oracle110-rh-40-amd64-m64.tpm
-rw-------. 1 root root 0 7? 15 03:42 yum.log
-rw-r--r--. 1 root root 206806 7? 15 03:44 modules.dep
drwx------. 2 root root 4096 7? 15 06:25 keyring-yrDUkF
drwx------. 2 orardbms oinstall 4096 7? 16 09:10 yum-orardbms-aoY3Hz
drwx------. 2 root root 4096 7? 16 23:10 pulse-KsqRSipl4QlT
drwxr-xr-x 2 oragrid oinstall 4096 7? 16 23:37 logs
drwxr-xr-x 2 oragrid oinstall 4096 7? 16 23:39 Logs
drwxr-x--- 2 oragrid oinstall 4096 7? 16 23:49 OraInstall2016-07-16_11-49-09PM
drwxr-xr-x 4 oragrid oinstall 4096 7? 16 23:52 CVU_11.2.0.4.0_oragrid_fixup
-rwxr-xr-x 1 orardbms oinstall 2411 7? 17 00:05 acfsutil
drwxr-xr-x 3 oragrid oinstall 4096 7? 17 00:17 CVU_11.2.0.4.0_oragrid
-rw------- 1 root root 3096 7? 17 00:24 yum_save_tx-2016-07-17-00-24Hcg2Oy.yumtx
drwxr-x--- 2 orardbms oinstall 4096 7? 17 00:50 dbca
drwxr-xr-x 3 orardbms oinstall 4096 7? 17 01:36 CVU_11.2.0.4.0_orardbms
drwx------ 2 gdm gdm 4096 11? 16 00:55 orbit-gdm
drwx------. 2 gdm gdm 4096 11? 16 00:55 pulse-I0itRPt8I2b3
drwxr-xr-x 2 oragrid oinstall 4096 11? 16 01:52 hsperfdata_oragrid
-rwxrwxrwx 1 orardbms oinstall 99061760 11? 16 01:59 shareplex-8.6.3-b171-oracle110-rh-40-amd64-m64.tar
[orardbms@node1 tmp]$ ./SharePlex-8.6.3-b171-oracle110-rh-40-amd64-m64.tpm
Unpacking ..................................................................
..........................................................................
..........................................................................
..........................................................................
..........................................................................
..........................................................................
..........................................................................
..........................................................................
..........................................................................
..........................................................................
..........................................................................
..........................................................................
..........................................................................
..........................................................................
..........................................................................
..........................................................................
..........................................................................
..........................................................................
..........................................................................
..........................................................................
..........................................................................
....................................................
SharePlex installation program:
SharePlex Version: 8.6.3
Build platform: rh-40-amd64
Target platform: rh-40-amd64
Please enter the product directory location? /u02/app/quest/sp
Please enter the variable data directory location? /u02/app/quest/vardir
Please specify the SharePlex Admin group (select a number):
1. [oinstall]
2. asmdba
3. dba
4. oper
? 1
Please wait while the installer obtains Oracle information ...
Please specify the ORACLE_SID that corresponds to this installation (select a number):
1. [current => orcc1]
2. inst_a_sp
3. <Other ...>
? 2
Please enter the ORACLE_HOME directory that corresponds to this ORACLE_SID? [/oracle/oracle_home]
Please enter the TCP/IP port number for SharePlex communications? [2100]
Preparing to install SharePlex for Oracle v.8.6.3:
User: orardbms
Admin Group: oinstall
Product Directory: /u02/app/quest/sp
Variable Data Directory: /u02/app/quest/vardir
ORACLE_SID: inst_a_sp
ORACLE_HOME: /oracle/oracle_home
Proceed with installation? [yes] yes
Installing ................................................................
.........................................................................
.........................................................................
.........................................................................
.........................................................................
.........................................................................
.........................................................................
.........................................................................
.........................................................................
.........................................................................
.........................................................................
.........................................................................
.........................................................................
.........................................................................
.........................................................................
.........................................................................
.........................................................................
.........................................................................
.........................................................................
.........................................................................
.........................................................................
.........................................................................
.........................................................................
.........................................................................
........................
Setting file ownerships ...................................................
.........................................................................
.........................................................................
.........................................................................
.........................................................................
.........................................................................
.........................................................................
.........................................................................
.........................................................................
.........................................................................
.........................................................................
.........................................................................
.........................................................................
.........................................................................
.........................................................................
.........................................................................
.........................................................................
.........................................................................
.........................................................................
.........................................................................
.........................................................................
.........................................................................
.........................................................................
.........................................................................
.....................................
Setting file permissions ..................................................
.........................................................................
.........................................................................
.........................................................................
.........................................................................
.........................................................................
.........................................................................
.........................................................................
.........................................................................
.........................................................................
.........................................................................
.........................................................................
.........................................................................
.........................................................................
.........................................................................
.........................................................................
.........................................................................
.........................................................................
.........................................................................
.........................................................................
.........................................................................
.........................................................................
.........................................................................
.........................................................................
......................................
Do you have a valid SharePlex v. 8.6.3 license? [yes]
Please enter the License key? CU40GU35J56Y7YH2MFLGA23ZRGN27F81JW
Please enter the customer name associated with this license key? taiji
WARNING: Invalid license key: The license expired on Jun 13, 2016: License "CU40GU35J56Y7YH2MFLGA23ZRGN27F81JW": Customer "taiji"
NOTE: Installation will continue. You may add license keys by executing utility
/u02/app/quest/sp/install/splex_add_key
Installation log saved to: /home/oracle/.shareplex/INSTALL-SharePlex-8.6.3-1611160201.log
SharePlex for Oracle v.8.6.3 installation successful.
####################### rac node2 add lincense
[orardbms@node1 tmp]$ ssh node2
[orardbms@node2 ~]$ /u02/app/quest/sp/util/splex_uname
Dell Inc. splex_uname version 8.6.3.171-m64-oracle110
Local system info:
Host Name = node2
Host ID = 61688
Operating System = Linux
OS Version = 2.6.32-573.el6.x86_64
Machine Model = x86_64
CPU Type = 6666
CPU Speed =
[orardbms@node2 ~]$ /u02/app/quest/sp/install/splex_add_key
gethostbyname(inst_a-splex-vip) failed
SharePlex License Utility
1) Read license key from file
2) Enter license key manually
3) Add license key for alternate host
q) Quit License Utility
Enter option: 3
Enter hostID returned by util/splex_uname program: 61688
SharePlex License Utility
Adding license for machine ID : 61688
1) Read license key from file
2) Enter license key manually
q) Quit License Utility
Enter option: 2
Enter Key: CU40GU35J56Y7YH2MFLGA23ZRGN27F81JW
Enter Customer Name: taiji
The SharePlex license has been successfully added for host 61688.
SharePlex License Utility
1) Read license key from file
2) Enter license key manually
3) Add license key for alternate host
q) Quit License Utility
Enter option: q
[orardbms@node2 ~]$
[orardbms@node2 ~]$
[orardbms@node2 ~]$
[orardbms@node1 bin]$ pwd
/u02/app/quest/sp/bin
[orardbms@node1 bin]$ ./ora_setup
Welcome to the Oracle SharePlex setup process for port 2100.
This process creates tables and user accounts needed to run
Oracle SharePlex replication.
Will the SharePlex install be using a BEQUEATH connection? (Entering 'n' implies a SQL*net connection) [y] : n
Please note the following:
** In response to prompts, a carriage return will choose the default
given in brackets. If there is no default, a reply must be entered.
** To exit the program while the program is waiting for input, use the
CTRL-C key sequence.
This sequences can be entered by holding down the CONTROL key and
pressing the C key.
Enter the TNS alias for which SharePlex should be installed [orcc1] : inst_a_sp
Verifying TNS supplied ... done.
In order to create the SharePlex tables and user account, we must
connect to the database as a DBA user
Enter a DBA user for inst_a_sp : system
NOTE: Appending the tns alias to the password via @ sign is not needed.
Enter password for the DBA account, which will not echo :
NOTE: @ was detected in the password for TNS connection. It is no longer needed.
connecting--This may take a few seconds.
validating user name and password. . . This may take a few seconds.
SharePlex objects will need to be created under a special
account. You can pick an existing user or create a new one.
Current SharePlex user is : SPLEX
Warning: Changing SharePlex user requires
reactivating the current configuration.
Would you like to create a new SharePlex user ? [y] : y
NOTE: Appending the tns alias to the password via @ sign is not needed.
Enter username for new user [splex/splex] : splex
Enter password for new user :
Re-enter password for new user :
Warning: This user is now being granted unlimited tablespace.
This privilege will remain in effect until it is explicitly changed.
Do you want to enable replication of tables with TDE? [n] :
To enable replication of tables with TDE in the future, please rerun ora_setup.
Setup will now install SharePlex objects.
These are the existing tablespaces.
SYSTEM SYSAUX UNDOTBS1 TEMP UNDOTBS2 USERS SPLEXDAT SPLEXIDX
EXAMPLE
Enter the default tablespace for use by SharePlex [USERS] : SPLEXDAT
Enter the temporary tablespace for use by SharePlex [TEMP] :
Enter the index tablespace for use by SharePlex [ ] : SPLEXIDX
Creating SharePlex objects [Installation type: Fresh]. . .
Creating SharePlex Oracle-timezone-region map . . . Done.
Creating Conflict Resolution Package . . . Done.
Creating SharePlex Dataequator package . . .
Loading Compare Package from "/u02/app/quest/sp/util/sp_deq_pkg.plb"...Done.
Loading Compare Varray Package from "/u02/app/quest/sp/util/sp_deq_v_pkg.plb"...Done.
Will the current setup for sid: [inst_a_sp] be used as source (including cases as source for failover or master-master setups)? [y] : y
ASM detected. Do you wish to connect to ASM using BEQUEATH connection? [y] :
Enter the ASM Sid to be used by SharePlex: [+ASM1] :
Make sure that $SP_SYS_PRODDIR/.app-modules/adminize is owned by a user who also belongs in the ASM admin group.
SharePlex ASM support enabled.
Setup of SharePlex objects successful . . .
Changing SharePlex connection database . . .
Setup completed successfully
#####################单实例节点安装shareplex
create tablespace splexdat datafile '/u01/app/oracle/oradata/orcl/splexdat.dbf' SIZE 50M AUTOEXTEND ON NEXT 100M MAXSIZE 5G
Tablespace created.
create tablespace splexidx datafile '/u01/app/oracle/oradata/orcl/splexidx.dbf' SIZE 50M AUTOEXTEND ON NEXT 100M MAXSIZE 5G;
Tablespace created.
SQL>
[oracle@node3 ~]$ cat /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.1.7 node3
[oracle@node3 ~]$ cat .bash_profile
# ---------------------------------------------------
# OS User: oracle
# Application: Oracle Database Software Owner
# Version: Oracle 11g release 2
# ---------------------------------------------------
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
ORACLE_SID=orcl; export ORACLE_SID #another is dgh2
ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1; export ORACLE_HOME
ORACLE_TERM=xterm; export ORACLE_TERM
NLS_DATE_FORMAT="DD-MON-YYYY HH24:MI:SS"; export NLS_DATE_FORMAT
TNS_ADMIN=$ORACLE_HOME/network/admin; export TNS_ADMIN
PATH=.{JAVA_HOME}/bin{PATH}HOME/bin:$ORACLE_HOME/bin
PATH=${PATH}:/usr/bin:/bin:/usr/bin/X11:/usr/local/bin
PATH=${PATH}:/u01/app/common/oracle/bin
export PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib
LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:$ORACLE_HOME/oracm/lib
LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/lib:/usr/lib:/usr/local/lib
export LD_LIBRARY_PATH
CLASSPATH=$ORACLE_HOME/JRE
CLASSPATH=${CLASSPATH}:$ORACLE_HOME/jlib
CLASSPATH=${CLASSPATH}:$ORACLE_HOME/rdbms/jlib
CLASSPATH=${CLASSPATH}:$ORACLE_HOME/network/jlib
export CLASSPATH
THREADS_FLAG=native; export THREADS_FLAG
export TEMP=/tmp
export TMPDIR=/tmp
SP_SYS_HOST_NAME="node3" ; export SP_SYS_HOST_NAME
SP_INSTALL_DIR="/u02/app/quest"; export SP_INSTALL_DIR
SP_SYS_VARDIR="${SP_INSTALL_DIR}/vardir" ; export SP_SYS_VARDIR
SP_SYS_PRODDIR="${SP_INSTALL_DIR}/sp" ; export SP_SYS_PRODDIR
# ---------------------------------------------------
# UMASK
# ---------------------------------------------------
# Set the default file mode creation mask
# (umask) to 022 to ensure that the user performing
# the Oracle software installation creates files
# with 644 permissions.
# ---------------------------------------------------
umask 022
[oracle@node3 ~]$ exit
logout
[root@node3 ~]# cd /
[root@node3 /]# mkdir -p /u02/app/quest
[root@node3 /]# mkdir -p /u02/app/quest/vardir
[root@node3 /]# mkdir -p /u02/app/quest/sp
[root@node3 /]# chown oracleinstall /u02
[root@node3 /]# chown -R oracleinstall /u02
[root@node3 /]# chmod -R 775 /u02
[oracle@node3 admin]$ cat tnsnames.ora
# tnsnames.ora Network Configuration File: /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.
ORCL =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.7)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = orcl)
)
)
INST_B_SP =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.7)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl)
(INSTANCE_NAME = orcl)
)
)
[oracle@node3 admin]$ tail -2 /etc/oratab
orcl:/u01/app/oracle/product/11.2.0/dbhome_1:N
inst_b_sp:/u01/app/oracle/product/11.2.0/dbhome_1:N
#####单实例安装shareplex
[root@node3 ~]# su - oracle
[oracle@node3 ~]$ cat .bash_profile
# ---------------------------------------------------
# OS User: oracle
# Application: Oracle Database Software Owner
# Version: Oracle 11g release 2
# ---------------------------------------------------
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
ORACLE_SID=orcl; export ORACLE_SID #another is dgh2
ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1; export ORACLE_HOME
ORACLE_TERM=xterm; export ORACLE_TERM
NLS_DATE_FORMAT="DD-MON-YYYY HH24:MI:SS"; export NLS_DATE_FORMAT
TNS_ADMIN=$ORACLE_HOME/network/admin; export TNS_ADMIN
PATH=.:${JAVA_HOME}/bin:${PATH}:$HOME/bin:$ORACLE_HOME/bin
PATH=${PATH}:/usr/bin:/bin:/usr/bin/X11:/usr/local/bin
PATH=${PATH}:/u01/app/common/oracle/bin
export PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib
LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:$ORACLE_HOME/oracm/lib
LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/lib:/usr/lib:/usr/local/lib
export LD_LIBRARY_PATH
CLASSPATH=$ORACLE_HOME/JRE
CLASSPATH=${CLASSPATH}:$ORACLE_HOME/jlib
CLASSPATH=${CLASSPATH}:$ORACLE_HOME/rdbms/jlib
CLASSPATH=${CLASSPATH}:$ORACLE_HOME/network/jlib
export CLASSPATH
THREADS_FLAG=native; export THREADS_FLAG
export TEMP=/tmp
export TMPDIR=/tmp
SP_SYS_HOST_NAME="node3" ; export SP_SYS_HOST_NAME
SP_INSTALL_DIR="/u02/app/quest"; export SP_INSTALL_DIR
SP_SYS_VARDIR="${SP_INSTALL_DIR}/vardir" ; export SP_SYS_VARDIR
SP_SYS_PRODDIR="${SP_INSTALL_DIR}/sp" ; export SP_SYS_PRODDIR
export PATH=/u02/app/quest/sp/bin:$PATH
# ---------------------------------------------------
# UMASK
# ---------------------------------------------------
# Set the default file mode creation mask
# (umask) to 022 to ensure that the user performing
# the Oracle software installation creates files
# with 644 permissions.
# ---------------------------------------------------
umask 022
[BEGIN] 2016/11/15 18:44:02
[oracle@node3 admin]$ cd /tmp
[oracle@node3 tmp]$ ls -l| grep shareplex
-rw-r--r--. 1 root root 99061760 Nov 15 05:43 shareplex-8.6.3-b171-oracle110-rh-40-amd64-m64.tar
[oracle@node3 tmp]$ chmod 777 shareplex-8.6.3-b171-oracle110-rh-40-amd64-m64.tar
chmod: changing permissions of `shareplex-8.6.3-b171-oracle110-rh-40-amd64-m64.tar': Operation not permitted
[oracle@node3 tmp]$ exit
logout
[root@node3 /]# cd /tmp
[root@node3 tmp]# chmod 777 shareplex-8.6.3-b171-oracle110-rh-40-amd64-m64.tar
[root@node3 tmp]# su - oracle
[oracle@node3 ~]$ cd /tmp
[oracle@node3 tmp]$ tar -xf shareplex-8.6.3-b171-oracle110-rh-40-amd64-m64.tar
[oracle@node3 tmp]$ ls -l | grep Share
-rwxr-xr-x. 1 oracle oinstall 99055976 Jan 11 2016 SharePlex-8.6.3-b171-oracle110-rh-40-amd64-m64.tpm
[oracle@node3 tmp]$ ./SharePlex-8.6.3-b171-oracle110-rh-40-amd64-m64.tpm
Unpacking ..................................................................
..........................................................................
..........................................................................
..........................................................................
..........................................................................
..........................................................................
..........................................................................
..........................................................................
..........................................................................
..........................................................................
..........................................................................
..........................................................................
..........................................................................
..........................................................................
..........................................................................
..........................................................................
..........................................................................
..........................................................................
..........................................................................
..........................................................................
..........................................................................
....................................................
SharePlex installation program:
SharePlex Version: 8.6.3
Build platform: rh-40-amd64
Target platform: rh-40-amd64
Please enter the product directory location? /u02/app/quest/sp
Please enter the variable data directory location? /u02/app/quest/vardir
Please specify the SharePlex Admin group (select a number):
1. [oinstall]
2. dba
3. oper
? 1
Please wait while the installer obtains Oracle information ...
Please specify the ORACLE_SID that corresponds to this installation (select a number):
1. [current => orcl]
2. inst_b_sp
3. <Other ...>
? 2
Please enter the ORACLE_HOME directory that corresponds to this ORACLE_SID? [/u01/app/oracle/product/11.2.0/dbhome_1]
Please enter the TCP/IP port number for SharePlex communications? [2100]
Preparing to install SharePlex for Oracle v.8.6.3:
User: oracle
Admin Group: oinstall
Product Directory: /u02/app/quest/sp
Variable Data Directory: /u02/app/quest/vardir
ORACLE_SID: inst_b_sp
ORACLE_HOME: /u01/app/oracle/product/11.2.0/dbhome_1
Proceed with installation? [yes]
Installing ................................................................
.........................................................................
.........................................................................
.........................................................................
.........................................................................
.........................................................................
.........................................................................
.........................................................................
.........................................................................
.........................................................................
.........................................................................
.........................................................................
.........................................................................
.........................................................................
.........................................................................
.........................................................................
.........................................................................
.........................................................................
.........................................................................
.........................................................................
.........................................................................
.........................................................................
.........................................................................
.........................................................................
........................
Setting file ownerships ...................................................
.........................................................................
.........................................................................
.........................................................................
.........................................................................
.........................................................................
.........................................................................
.........................................................................
.........................................................................
.........................................................................
.........................................................................
.........................................................................
.........................................................................
.........................................................................
.........................................................................
.........................................................................
.........................................................................
.........................................................................
.........................................................................
.........................................................................
.........................................................................
.........................................................................
.........................................................................
.........................................................................
.....................................
Setting file permissions ..................................................
.........................................................................
.........................................................................
.........................................................................
.........................................................................
.........................................................................
.........................................................................
.........................................................................
.........................................................................
.........................................................................
.........................................................................
.........................................................................
.........................................................................
.........................................................................
.........................................................................
.........................................................................
.........................................................................
.........................................................................
.........................................................................
.........................................................................
.........................................................................
.........................................................................
.........................................................................
.........................................................................
......................................
Do you have a valid SharePlex v. 8.6.3 license? [yes]
Please enter the License key? CU40GU35J56Y7YH2MFLGA23ZRGN27F81JW
Please enter the customer name associated with this license key? taiji
WARNING: Invalid license key: The license expired on Jun 13, 2016: License "CU40GU35J56Y7YH2MFLGA23ZRGN27F81JW": Customer "taiji"
NOTE: Installation will continue. You may add license keys by executing utility
/u02/app/quest/sp/install/splex_add_key
Installation log saved to: /home/oracle/.shareplex/INSTALL-SharePlex-8.6.3-1611150545.log
SharePlex for Oracle v.8.6.3 installation successful.
rac
cd /u02/app/quest/vardir/data
view paramdb
SP_COP_TPORT 2100
SP_COP_UPORT 2100
SP_OCT_TDE_SHARED_SECRET "" # SPO TDE Shared Secret
SP_OCT_ASM_SUPPORT "1" # ASM support on or off
SP_OCT_ASM_USE_OCI "1"
SP_ORD_LOGIN_O.inst_a_SP "77bff9a39a0c2bb430c6c013e35ba8617cc4521279ff"
SP_ORD_OWNER_O.inst_a_SP "SPLEX"
SP_SYS_LIC_61688 "CN0DW1WAVEJG3NCMC4647K0YMEB0SXBJYW:XINJIANG ELECTRIC POWER CORP"
SP_SYS_LIC_35426 "CN0DW1WAVEJG3NCMC4647K0YMEB0SXBJYW:XINJIANG ELECTRIC POWER CORP"
SP_SHS_SHMSIZE "33554432" # Statistics shared-memory Size
SP_OCT_USE_DST "0" # If 1, factor in DST when computing REDOLOG_ENSURE
SP_OCT_REPLICATE_SEQUENCES 0
SP_OCT_REPLICATE_DDL 0
SP_OCT_AUTOADD_ENABLE 1
SP_DEQ_THREADS "1" # Number of compare threads to run
SP_SYS_API_KEY "18188a00-ab7a-11e6-9512-091373480034" #SPO Encryption Salt
单实例
cd /u02/app/quest/vardir/data
view paramdb
SP_COP_TPORT 2100
SP_COP_UPORT 2100
SP_OCT_TDE_SHARED_SECRET "" # SPO TDE Shared Secret
SP_ORD_LOGIN_O.inst_b_SP "77bff9a39a0c2bb430c6e89c013ba8617cc4511279ff"
SP_ORD_OWNER_O.inst_b_SP "SPLEX"
SP_SYS_LIC_8737 "CN0DW1WAVEJG3NCMC4647K0YMEB0SXBJYW:XINJIANG ELECTRIC POWER CORP"
SP_SHS_SHMSIZE "33554432" # Statistics shared-memory Size
SP_OCT_USE_DST "0" # If 1, factor in DST when computing REDOLOG_ENSURE
SP_OCT_REPLICATE_DDL 0
SP_OCT_AUTOADD_ENABLE 1
SP_DEQ_THREADS "1" # Number of compare threads to run
rac
[orardbms@node1 data]$ sqlplus /nolog
SQL*Plus: Release 11.2.0.4.0 Production on Wed Nov 16 03:54:27 2016
Copyright (c) 1982, 2013, Oracle. All rights reserved.
SQL> connect /as sysdba
Connected.
SQL> archive log list;
Database log mode Archive Mode
Automatic archival Enabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 88
Next log sequence to archive 89
Current log sequence 89
SQL> select force_logging from v$database;
FOR
---
NO
SQL> alter database force logging;
Database altered.
SQL>alter database add supplemental log data (primary key, unique index) columns;
Database altered.
SQL> alter system switch logfile;
System altered.
SQL> /
System altered.
SQL>
rac:
cd /u02/app/quest/vardir/config
vi schema_name_all
datasource.inst_a_sp
#source tables target tables routing map
expand hr.% hr.% node3@o.inst_b_sp
单实例:
cd /u02/app/quest/vardir/config
[oracle@node3 config]$ more schema_name_all
datasource.inst_b_SP
#source tables target tables routing map
expand hr.% hr.% node3@o.inst_a_SP
############
[root@node2 u02]# cat /etc/hosts
127.0.0.1 localhost
192.168.1.155 node1
192.168.1.156 node2
192.168.1.157 node1-vip
192.168.1.158 node2-vip
192.168.1.159 node-scan
10.10.5.155 node1-priv
10.10.5.156 node2-priv
192.168.1.10 inst_a-splex_vip
192.168.1.7 node3
[root@node3 tmp]# cat /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.1.7 node3
192.168.1.10 inst_a-splex_vip
Start SharePlex:
On silo A and silo B (on the host with SP VIP):
sp_cop &
Stop Target Post:
On silo B ONLY (on the host with SP VIP):
sp_ctrl
stop post
Activate Config:
On the Silo A (on the host with the SP VIP):
sp_ctrl
activate config schema_name_all
[orardbms@node1 bin]$ ./sp_ctrl
*******************************************************
* SharePlex for Oracle Command Utility
* Copyright 2016 Dell, Inc.
* ALL RIGHTS RESERVED.
* Protected by U.S. Patents: 7,461,103 and 7,065,538
*******************************************************
sp_ctrl (inst_a-splex_vip:2100)> status
Brief Status for inst_a-splex_vip
Process State PID Running Since
--------------- ------------------------------ -------- --------------------
Cop Running 13596 16-Nov-16 05:32:48
Capture Running 13622 16-Nov-16 05:33:03
Read Running 13641 16-Nov-16 05:33:04
Export Running 13765 16-Nov-16 05:34:49
Cmd & Ctrl Running 15359 16-Nov-16 06:00:31
System is used as a source machine
There is 1 active configuration file
sp_ctrl (inst_a-splex_vip:2100)> status
Brief Status for inst_a-splex_vip
Process State PID Running Since
--------------- ------------------------------ -------- --------------------
Cop Running 13596 16-Nov-16 05:32:48
Capture Running 13622 16-Nov-16 05:33:03
Read Running 13641 16-Nov-16 05:33:04
Export Running 13765 16-Nov-16 05:34:49
Cmd & Ctrl Running 15359 16-Nov-16 06:00:31
System is used as a source machine
There is 1 active configuration file
sp_ctrl (node3:2100)> status
Brief Status for node3
Process State PID Running Since
--------------- ------------------------------ -------- --------------------
Cop Running 3499 15-Nov-16 08:34:14
Cmd & Ctrl Running 3501 15-Nov-16 08:34:21
Import Running 3505 15-Nov-16 08:34:50
Post Stopped by user
There are no active configuration files
[orardbms@node1 bin]$ sqlplus /nolog
SQL*Plus: Release 11.2.0.4.0 Production on Wed Nov 16 06:03:44 2016
Copyright (c) 1982, 2013, Oracle. All rights reserved.
SQL> connect /as sysdba
Connected.
SQL> select current_scn from v$database;
CURRENT_SCN
-----------
1056866
SQL>
expdp system/oracle DUMPFILE=hr.dmp DIRECTORY=dir1 SCHEMAS=hr flashback_scn=1056866
[orardbms@node1 ~]$ expdp system/oracle DUMPFILE=hr.dmp DIRECTORY=dir1 SCHEMAS=hr flashback_scn=1056866
Export: Release 11.2.0.4.0 - Production on Wed Nov 16 06:07:06 2016
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options
FLASHBACK automatically enabled to preserve database integrity.
Starting "SYSTEM"."SYS_EXPORT_SCHEMA_01": system/******** DUMPFILE=hr.dmp DIRECTORY=dir1 SCHEMAS=hr flashback_scn=1056866
Estimate in progress using BLOCKS method...
Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
Total estimation using BLOCKS method: 448 KB
Processing object type SCHEMA_EXPORT/USER
Processing object type SCHEMA_EXPORT/SYSTEM_GRANT
Processing object type SCHEMA_EXPORT/ROLE_GRANT
Processing object type SCHEMA_EXPORT/DEFAULT_ROLE
Processing object type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA
Processing object type SCHEMA_EXPORT/SEQUENCE/SEQUENCE
Processing object type SCHEMA_EXPORT/TABLE/TABLE
Processing object type SCHEMA_EXPORT/TABLE/COMMENT
Processing object type SCHEMA_EXPORT/PROCEDURE/PROCEDURE
Processing object type SCHEMA_EXPORT/PROCEDURE/ALTER_PROCEDURE
Processing object type SCHEMA_EXPORT/TABLE/INDEX/INDEX
Processing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/CONSTRAINT
Processing object type SCHEMA_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS
Processing object type SCHEMA_EXPORT/VIEW/VIEW
Processing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/REF_CONSTRAINT
Processing object type SCHEMA_EXPORT/TABLE/TRIGGER
Processing object type SCHEMA_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
. . exported "HR"."COUNTRIES" 6.367 KB 25 rows
. . exported "HR"."DEPARTMENTS" 7.007 KB 27 rows
. . exported "HR"."EMPLOYEES" 16.80 KB 107 rows
. . exported "HR"."JOBS" 6.992 KB 19 rows
. . exported "HR"."JOB_HISTORY" 7.054 KB 10 rows
. . exported "HR"."LOCATIONS" 8.273 KB 23 rows
. . exported "HR"."REGIONS" 5.476 KB 4 rows
Master table "SYSTEM"."SYS_EXPORT_SCHEMA_01" successfully loaded/unloaded
******************************************************************************
Dump file set for SYSTEM.SYS_EXPORT_SCHEMA_01 is:
/tmp/hr.dmp
Job "SYSTEM"."SYS_EXPORT_SCHEMA_01" successfully completed at Wed Nov 16 06:07:32 2016 elapsed 0 00:00:26
[root@node1 tmp]# cd /tmp
[root@node1 tmp]# scp -pr hr.dmp node3:/tmp/
The authenticity of host 'node3 (192.168.1.7)' can't be established.
RSA key fingerprint is 28:5d:76:19:60:ac:26:ca:3e:84:83:5e:fe:7e:51:3d.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'node3,192.168.1.7' (RSA) to the list of known hosts.
root@node3's password:
hr.dmp 100% 504KB 504.0KB/s 00:00
[root@node1 tmp]#
impdp system/oracle DIRECTORY=dir1 DUMPFILE=hr.dmp
[root@node3 ~]# cd /tmp
[root@node3 tmp]# chmod 777 hr.dmp
[root@node3 tmp]# impdp system/oracle DIRECTORY=dir1 DUMPFILE=hr.dmp
-bash: impdp: command not found
[root@node3 tmp]# su - oracle
[oracle@node3 ~]$ impdp system/oracle DIRECTORY=dir1 DUMPFILE=hr.dmp
Import: Release 11.2.0.4.0 - Production on Tue Nov 15 09:10:02 2016
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Master table "SYSTEM"."SYS_IMPORT_FULL_01" successfully loaded/unloaded
Starting "SYSTEM"."SYS_IMPORT_FULL_01": system/******** DIRECTORY=dir1 DUMPFILE=hr.dmp
Processing object type SCHEMA_EXPORT/USER
Processing object type SCHEMA_EXPORT/SYSTEM_GRANT
Processing object type SCHEMA_EXPORT/ROLE_GRANT
Processing object type SCHEMA_EXPORT/DEFAULT_ROLE
Processing object type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA
Processing object type SCHEMA_EXPORT/SEQUENCE/SEQUENCE
Processing object type SCHEMA_EXPORT/TABLE/TABLE
Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
. . imported "HR"."COUNTRIES" 6.367 KB 25 rows
. . imported "HR"."DEPARTMENTS" 7.007 KB 27 rows
. . imported "HR"."EMPLOYEES" 16.80 KB 107 rows
. . imported "HR"."JOBS" 6.992 KB 19 rows
. . imported "HR"."JOB_HISTORY" 7.054 KB 10 rows
. . imported "HR"."LOCATIONS" 8.273 KB 23 rows
. . imported "HR"."REGIONS" 5.476 KB 4 rows
Processing object type SCHEMA_EXPORT/TABLE/COMMENT
Processing object type SCHEMA_EXPORT/PROCEDURE/PROCEDURE
Processing object type SCHEMA_EXPORT/PROCEDURE/ALTER_PROCEDURE
Processing object type SCHEMA_EXPORT/TABLE/INDEX/INDEX
Processing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/CONSTRAINT
Processing object type SCHEMA_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS
Processing object type SCHEMA_EXPORT/VIEW/VIEW
Processing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/REF_CONSTRAINT
Processing object type SCHEMA_EXPORT/TABLE/TRIGGER
Processing object type SCHEMA_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
Job "SYSTEM"."SYS_IMPORT_FULL_01" successfully completed at Tue Nov 15 09:10:08 2016 elapsed 0 00:00:05
禁用查找相关JOB
select job_name from dba_scheduler_jobs where OWNER='HR';
禁用触发器
select 'alter trigger '||owner||'.'||object_name||' disable'
from dba_objects
where object_type='TRIGGER' and owner='HR';
查找外键及约束
select 'alter table '||t.owner||'.'||t.table_name||' disable constraint '||t.constraint_name||';'
From dba_constraints t
where owner='HR' and constraint_type='R';
[oracle@node3 bin]$ ./ora_setup
Welcome to the Oracle SharePlex setup process for port 2100.
This process creates tables and user accounts needed to run
Oracle SharePlex replication.
Will the SharePlex install be using a BEQUEATH connection? (Entering 'n' implies a SQL*net connection) [y] : n
Please note the following:
** In response to prompts, a carriage return will choose the default
given in brackets. If there is no default, a reply must be entered.
** To exit the program while the program is waiting for input, use the
CTRL-C key sequence.
This sequences can be entered by holding down the CONTROL key and
pressing the C key.
Enter the TNS alias for which SharePlex should be installed [orcl] : inst_b_sp
Verifying TNS supplied ... done.
In order to create the SharePlex tables and user account, we must
connect to the database as a DBA user
Enter a DBA user for inst_b_sp : system
NOTE: Appending the tns alias to the password via @ sign is not needed.
Enter password for the DBA account, which will not echo :
NOTE: @ was detected in the password for TNS connection. It is no longer needed.
connecting--This may take a few seconds.
validating user name and password. . . This may take a few seconds.
SharePlex objects will need to be created under a special
account. You can pick an existing user or create a new one.
Current SharePlex user is : SPLEX
Warning: Changing SharePlex user requires
reactivating the current configuration.
Would you like to create a new SharePlex user ? [y] : n
NOTE: Appending the tns alias to the password via @ sign is not needed.
Enter username of an existing user : splex
'splex' is not a current SharePlex user.Would you like to create a new SharePlex user ? [y] : n
NOTE: Appending the tns alias to the password via @ sign is not needed.
Enter username of an existing user : splex
'splex' is not a current SharePlex user.Would you like to create a new SharePlex user ? [y] : y
NOTE: Appending the tns alias to the password via @ sign is not needed.
Enter username for new user [splex/splex] : splex
Enter password for new user :
Re-enter password for new user :
Warning: This user is now being granted unlimited tablespace.
This privilege will remain in effect until it is explicitly changed.
Do you want to enable replication of tables with TDE? [n] : n
To enable replication of tables with TDE in the future, please rerun ora_setup.
Setup will now install SharePlex objects.
These are the existing tablespaces.
SYSTEM SYSAUX UNDOTBS1 TEMP USERS EXAMPLE SPLEXDAT SPLEXIDX
Enter the default tablespace for use by SharePlex [USERS] : SPLEXDAT
Enter the temporary tablespace for use by SharePlex [TEMP] :
Enter the index tablespace for use by SharePlex [ ] : SPLEXIDX
Creating SharePlex objects [Installation type: Fresh]. . .
Creating SharePlex Oracle-timezone-region map . . . Done.
Creating Conflict Resolution Package . . . Done.
Creating SharePlex Dataequator package . . .
Loading Compare Package from "/u02/app/quest/sp/util/sp_deq_pkg.plb"...Done.
Loading Compare Varray Package from "/u02/app/quest/sp/util/sp_deq_v_pkg.plb"...Done.
Will the current setup for sid: [inst_b_sp] be used as source (including cases as source for failover or master-master setups)? [y] : n
Setup of SharePlex objects successful . . .
Changing SharePlex connection database . . .
Setup completed successfully
[oracle@node3 bin]$ ./sp_ctrl
*******************************************************
* SharePlex for Oracle Command Utility
* Copyright 2016 Dell, Inc.
* ALL RIGHTS RESERVED.
* Protected by U.S. Patents: 7,461,103 and 7,065,538
*******************************************************
sp_ctrl (node3:2100)> status
Brief Status for node3
Process State PID Running Since
--------------- ------------------------------ -------- --------------------
Cop Running 3499 15-Nov-16 08:34:14
Import Running 3505 15-Nov-16 08:34:50
Post Stopped by user
Cmd & Ctrl Running 3744 15-Nov-16 09:15:03
There are no active configuration files
sp_ctrl (node3:2100)>
reconcile queue inst_a-splex_vip for o.INST_A_SP-o.INST_B_SP scn 1056866
单实例启动post:
[oracle@node3 bin]$ ./sp_ctrl
*******************************************************
* SharePlex for Oracle Command Utility
* Copyright 2016 Dell, Inc.
* ALL RIGHTS RESERVED.
* Protected by U.S. Patents: 7,461,103 and 7,065,538
*******************************************************
sp_ctrl (node3:2100)> status
Brief Status for node3
Process State PID Running Since
--------------- ------------------------------ -------- --------------------
Cop Running 3499 15-Nov-16 08:34:14
Import Running 3505 15-Nov-16 08:34:50
Post Stopped by user
Cmd & Ctrl Running 3778 15-Nov-16 09:22:02
There are no active configuration files
sp_ctrl (node3:2100)> start post
sp_ctrl (node3:2100)> status
Brief Status for node3
Process State PID Running Since
--------------- ------------------------------ -------- --------------------
Cop Running 3499 15-Nov-16 08:34:14
Import Running 3505 15-Nov-16 08:34:50
Post Running 3779 15-Nov-16 09:22:08
Cmd & Ctrl Running 3778 15-Nov-16 09:22:02
There are no active configuration files
rac :
[orardbms@node2 ~]$ sp_ctrl
*******************************************************
* SharePlex for Oracle Command Utility
* Copyright 2016 Dell, Inc.
* ALL RIGHTS RESERVED.
* Protected by U.S. Patents: 7,461,103 and 7,065,538
*******************************************************
sp_ctrl (inst_a-splex_vip:2100)> qstatus
Queues Statistics for inst_a-splex_vip
Name: o.inst_a_sp (Capture queue)
Number of messages: 0 (Age 0 min; Size 65 mb)
Backlog (messages): 0 (Age 0 min)
Name: inst_a-splex_vip (Export queue)
Number of messages: 0 (Age 0 min; Size 65 mb)
Backlog (messages): 0 (Age 0 min)
单实例:
[oracle@node3 log]$ sp_ctrl
*******************************************************
* SharePlex for Oracle Command Utility
* Copyright 2016 Dell, Inc.
* ALL RIGHTS RESERVED.
* Protected by U.S. Patents: 7,461,103 and 7,065,538
*******************************************************
sp_ctrl (node3:2100)> status
Brief Status for node3
Process State PID Running Since
--------------- ------------------------------ -------- --------------------
Cop Running 2778 16-Nov-16 04:04:12
Post Stopped by user
Import Running 2890 16-Nov-16 04:16:23
Cmd & Ctrl Running 3017 16-Nov-16 04:47:35
There are no active configuration files
sp_ctrl (node3:2100)> reconcile queue inst_a_sp for o.inst_a_sp-o.inst_b_sp scn 1736488
internal error -- see event log
sp_ctrl (node3:2100)> qstatus
Queues Statistics for node3
Name: inst_a-splex_vip (o.inst_a_sp-o.inst_b_sp) (Post queue)
Number of messages: 0 (Age 0 min; Size 35 mb)
Backlog (messages): 0 (Age 0 min)
sp_ctrl (node3:2100)> reconcile queue inst_a-splex_vip for o.inst_a_sp-o.inst_b_sp scn 1736488
If this Process hangs it is likely related to no activity on the source. Log into the source database and create at least one transaction, then force a log switch.
sp_ctrl (node3:2100)> reconcile queue inst_a-splex_vip for o.inst_a_sp-o.inst_b_sp scn 1736488
sp_ctrl (node3:2100)>
sp_ctrl (node3:2100)>
sp_ctrl (node3:2100)>
sp_ctrl (node3:2100)>
sp_ctrl (node3:2100)>
sp_ctrl (node3:2100)> qstatus
Queues Statistics for node3
Name: inst_a-splex_vip (o.inst_a_sp-o.inst_b_sp) (Post queue)
Number of messages: 19 (Age 0 min; Size 88 mb)
Backlog (messages): 18 (Age 0 min)
sp_ctrl (node3:2100)> show
Process Source Target State PID
---------- ------------------------------------ ---------------------- -------------------- ------
Post o.inst_a_sp-inst_a-splex_vip o.inst_b_sp Stopped by user
Import inst_a-splex_vip node3 Running 2890
sp_ctrl (node3:2100)> status
Brief Status for node3
Process State PID Running Since
--------------- ------------------------------ -------- --------------------
Cop Running 2778 16-Nov-16 04:04:12
Post Stopped by user
Import Running 2890 16-Nov-16 04:16:23
Cmd & Ctrl Running 3017 16-Nov-16 04:47:35
Cmd & Ctrl Running 3317 16-Nov-16 05:00:41
There are no active configuration files
sp_ctrl (node3:2100)> start post
sp_ctrl (node3:2100)> status
Brief Status for node3
Process State PID Running Since
--------------- ------------------------------ -------- --------------------
Cop Running 2778 16-Nov-16 04:04:12
Post Running 3348 16-Nov-16 05:06:09
Import Running 2890 16-Nov-16 04:16:23
Cmd & Ctrl Running 3017 16-Nov-16 04:47:35
Cmd & Ctrl Running 3317 16-Nov-16 05:00:41
There are no active configuration files
Cleanup Target Tables:
Run the cleanup.sql script to truncate all of the SharePlex internal tables.
Only run this on Silo B:
cd?/u02/app/quest/sp/bin
sqlplus splex/<pass>@inst_b_sp
@cleanup.sql
On rac (as root):
su - orardbms
cd /u02/app/quest/vardir/
mkdir tmp
第一次调用脚本后调整下面两个文件的权限
cd /u02/app/quest
chown orardbmsinstall startsplex
chown orardbmsinstall stopsplex
chmod 777 startsplex
chmod 777 stopsplex
[orardbms@node1 scripts]$ pwd
/u02/app/quest/scripts
[root@node2 scripts]# more spctl.sh
#!/bin/sh
export SP_SYS_PRODDIR=/u02/app/quest/sp
export TOUCH=/bin/touch
export RM=/bin/rm
export PATH_NAME=/u02/app/quest/vardir/tmp/splexagent_`hostname`
export SP_COP_TPORT=2100
export SP_COP_UPORT=2100
export SP_SYS_HOST_NAME="inst_a-splex_vip"
export SP_SYS_VARDIR=/u02/app/quest/vardir
export SP_SYS_PRODDIR=/u02/app/quest/sp
export LOG=/u02/app/quest
case "$1" in
'start')
echo "Creating the file: $PATH_NAME"
$TOUCH $PATH_NAME
chmod 777 $PATH_NAME
echo `date` > $LOG/startsplex
echo `ps -ef|grep pmon` >> $LOG/startsplex
$SP_SYS_PRODDIR/bin/sp_cop -u2100 >> $LOG/startsplex &
exit 0
;;
'stop')
echo "Deleting the file: $PATH_NAME"
$RM $PATH_NAME
echo "issue shareplex stop command ......."
echo "shutdown" |$SP_SYS_PRODDIR/bin/sp_ctrl > $LOG/stopsplex
echo `date`>> $LOG/stopsplex
echo `ps -ef|grep pmon` >> $LOG/stopsplex
exit 0
;;
'check')
echo "CHECK entry point has been called.."
if [ -e $PATH_NAME ]; then
echo "Check -- SUCCESS"
exit 0
else
echo "Check -- FAILED"
exit 1
fi
;;
'clean')
echo "CLEAN entry point has been called.."
echo "Deleting the file: $PATH_NAME"
$RM -f $PATH_NAME
exit 0
;;
esac
自动启动还是有问题:
状态显示正常,但是为未启动,
手动启动:
VIP 在那台机器上就在那台机器上启动 su - orardbms
sp_cop &
sp_ctrl
root:
#/grid/grid_home/bin/crsctl add resource shareplex -type cluster_resource -attr "ACTION_SCRIPT=/u02/app/quest/scripts/spctl.sh, CHECK_INTERVAL=30, START_DEPENDENCIES='hard(ora.registry.acfs,ora.orcc.db) pullup(shareplex.vip)', STOP_DEPENDENCIES='hard(shareplex.vip,ora.orcc.db)'"
#/grid/grid_home/bin/crsctl add resource shareplex -type cluster_resource -attr "ACTION_SCRIPT=/u02/app/quest/scripts/spctl.sh, CHECK_INTERVAL=30, START_DEPENDENCIES='hard(ora.registry.acfs) pullup(shareplex.vip)', STOP_DEPENDENCIES='hard(shareplex.vip)'"
#/grid/grid_home/bin/crsctl add resource shareplex -type cluster_resource -attr "ACTION_SCRIPT=/u02/app/quest/scripts/spctl.sh,CHECK_INTERVAL=30, START_DEPENDENCIES='hard(shareplex.vip) pullup(shareplex.vip)', STOP_DEPENDENCIES='hard(shareplex.vip)'"
/grid/grid_home/bin/crsctl add resource shareplex -type cluster_resource -attr "ACTION_SCRIPT=/u02/app/quest/scripts/spctl.sh,CHECK_INTERVAL=30, START_DEPENDENCIES='hard(shareplex.vip,ora.asm) pullup(shareplex.vip)', STOP_DEPENDENCIES='hard(shareplex.vip)'"
root:
/grid/grid_home/bin/crsctl setperm resource shareplex -o orardbms
4: Start the application
$ORA_CRS_HOME/bin/crsctl start resource shareplex
问题1:
sp_ctrl (inst_a-splex_vip:2100)> status
Brief Status for inst_a-splex_vip
Process State PID Running Since
--------------- ------------------------------ -------- --------------------
Cop Running 13141 16-Nov-16 05:26:31
Cmd & Ctrl Running 13145 16-Nov-16 05:26:41
Capture Stopped - due to error
日志:
otice 2016-11-16 05:27:04.367557 13215 1594824544 Capture: The database supplemental logging state = Enabled, primary_key = Disabled, unique_key = Disabled (capturing from inst_a_sp) [module oct]
Error 2016-11-16 05:27:04.818307 13215 1301313280 Capture: Error reading block 0 from file +DATA/orcc/onlinelog/group_2.258.917398465: ASMreadBlock: ASMFileReadBlock: ASMFileReadExtent: ASMDgroupReadDisk: ASMDgroupDiskRead: Open Error 13 on disk 0, path /dev/mapper/data: Permission denied. (group 2 DATA). (extent number 0, file +DATA/orcc/onlinelog/group_2.258.917398465). (block number 0, file +DATA/orcc/onlinelog/group_2.258.917398465). (capturing from inst_a_sp) [module oct]
Error 2016-11-16 05:27:04.819812 13215 1301313280 Capture: If this setup is on an Exadata environment or if capture is reading logs located on a remote server, make sure that the parameter SP_OCT_ASM_USE_OCI is set to 1. Restart the capture process after setting the parameter. (capturing from inst_a_sp) [module oct]
Error 2016-11-16 05:27:04.837847 13215 1301313280 Capture stopped: Internal error encountered; cannot continue (capturing from inst_a_sp)
Error 2016-11-16 05:27:04.893314 13215 1290823424 Capture: Error reading block 0 from file +DATA/orcc/onlinelog/group_3.265.917400205: ASMreadBlock: ASMFileReadBlock: ASMFileReadExtent: ASMDgroupReadDisk: ASMDgroupDiskRead: Open Error 13 on disk 0, path /dev/mapper/data: Permission denied. (group 2 DATA). (extent number 0, file +DATA/orcc/onlinelog/group_3.265.917400205). (block number 0, file +DATA/orcc/onlinelog/group_3.265.917400205). (capturing from inst_a_sp) [module oct]
Error 2016-11-16 05:27:04.898349 13215 1290823424 Capture: If this setup is on an Exadata environment or if capture is reading logs located on a remote server, make sure that the parameter SP_OCT_ASM_USE_OCI is set to 1. Restart the capture process after setting the parameter. (capturing from inst_a_sp) [module oct]
Error 2016-11-16 05:27:04.901108 13215 1290823424 Capture stopped: Internal error encountered; cannot continue (capturing from inst_a_sp)
Notice 2016-11-16 05:27:05.857330 13215 1594824544 Capture: shutting down by request (capturing from inst_a_sp) [module oct]
Info 2016-11-16 05:27:05.865166 13141 266577760 Capture exited normally, pid = 13215 (capturing from inst_a_sp)
event_log (60/60)
解决:
[orardbms@node1 data]$ pwd
/u02/app/quest/vardir/data
[orardbms@node1 data]$ cat paramdb
#
# User Parameter Database
#
# This file contains any parameter values which are different from
# their default values. The customer may changes to this file
# as they see fit - HOWEVER, certain parameters such as SP_ORD_LOGIN
# and SP_ORD_OWNER are NOT user manageable and should only be changed
# by ora_setup.
#
# The format of this file is:
#
# key value pending # desc
#
# key The unique name for this parameter. It should be of the format
# module.name
#
# value The current value of this parameter.
#
# pending The pending value of this parameter. This change will take
# effect at the next reboot.
#
# desc Description for this parameter.
#
#
#SP_COP_TPORT 2100
#SP_COP_UPORT 2100
#SP_SYS_LIC_61688 "CN0DW1WAVEJG3NCMC4647K0YMEB0SXBJYW:XINJIANG ELECTRIC POWER CORP"
#SP_SYS_LIC_35426 "CN0DW1WAVEJG3NCMC4647K0YMEB0SXBJYW:XINJIANG ELECTRIC POWER CORP"
SP_COP_TPORT 2100
SP_COP_UPORT 2100
SP_OCT_TDE_SHARED_SECRET "" # SPO TDE Shared Secret
SP_OCT_ASM_SUPPORT "1" # ASM support on or off
SP_OCT_ASM_USE_OCI "1" ######添加此参数
SP_ORD_LOGIN_O.inst_a_SP "77bff9a39a0c2bb430c6c013e35ba8617cc4521279ff"
SP_ORD_OWNER_O.inst_a_SP "SPLEX"
SP_SYS_LIC_61688 "CN0DW1WAVEJG3NCMC4647K0YMEB0SXBJYW:XINJIANG ELECTRIC POWER CORP"
SP_SYS_LIC_35426 "CN0DW1WAVEJG3NCMC4647K0YMEB0SXBJYW:XINJIANG ELECTRIC POWER CORP"
SP_SHS_SHMSIZE "33554432" # Statistics shared-memory Size
SP_OCT_USE_DST "0" # If 1, factor in DST when computing REDOLOG_ENSURE
SP_OCT_REPLICATE_SEQUENCES 0
SP_OCT_REPLICATE_DDL 0
SP_OCT_AUTOADD_ENABLE 0
SP_DEQ_THREADS "1" # Number of compare threads to run
SP_SYS_API_KEY "18188a00-ab7a-11e6-9512-091373480034" #SPO Encryption Salt
|
|