5.3.1 Procedure 5: Start/Stop Replication
Table 5-3 Procedure 5: Start/Stop Replication
| S T E P # | This procedure is used to start/stop replication from OCLSMS to Query Server.Check off ( ✓ ) each step as it is completed. Boxes have been provided for this purpose under each step number. SHOULD THIS PROCEDURE FAIL, CONTACT MY ORACLE SUPPORT AND ASK FOR ASSISTANCE. | |
|---|---|---|
|
1. ☐ |
Linux server: Stop MySQL replication |
|
|
2. |
Linux server: Create Regional Databases |
Databases and tables should be created before restoring data on MySQL 8. Run following command for all regions whose DB needs to be replicated on QS
dbname is the name of regional database. For example: For Canada following command will be run
dbname is the name of regional database. For example: For Canada following command will be run
Note: Repeat these steps for all regional databases |
|
3. |
Linux Server: Create supDB and noreplDB |
Databases and tables should be created before restoring data on MySQL 8. Run following command for supDB, noreplDB and resyncDB before restoring data
|
|
4. ☐ |
Linux server: Stop MySQL |
Stop MySQL. If unable to shutdown mysql using above command, use the following command:
|
|
5. ☐ |
OCLSMS server: Create query server user on OCLSMS |
Note: If using hostname to configure QS on LSMS Associate the names of the query server hosts with their Internet Protocol (IP) addresses: To do this, add an IP address and hostname pair for each query server to the /etc/hosts file on both the primary and secondary LSMS servers. The hostname of the query server will be used to identify each query server when reporting on its status. |
|
6. ☐ |
OCLSMS server: Create and copy the snapshots from the OCLSMS server. |
Please refer to [3]OCLSMS 14.1 Alarms and Maintenance Guide, Current Version, Oracle, Appendix E (Query Server Maintenance Procedures), section “Reload a Query Server Database from the OCLSMS" in the section 1.2.1. |
|
7. ☐ |
Linux server: Extract the snapshot data from the archive tar files copied from OCLSMS. |
In the above commands, replace <regionDB> with the regional database name (for example, CanadaDB). Copy *.MYI and *.MYD files from backup directory to DB directory
For example for CanadaDB
Execute the same commands for supDB and noreplDB snapshot files. |
|
8. ☐ |
Linux server: Verify ownership of database files and directories. |
If any database directories have ownership other than mysql:mysql, change them using this command:
where <region> is the name of an NPAC region. Also change the ownership of snapinfo.sql to mysql:mysql by executing the following command:
|
|
9. ☐ |
Linux server: Open the snapinfo.sql file |
Refer to Appendix A.1 to modify the snapinfo.sql file. |
|
10. ☐ |
Linux server: Verify MySQL tables if following the upgrade procedure, otherwise skip it. |
Note: Please ignore if there is any error in the output of above command and again verify MySQL tables by using step 8 of this procedure. If the output still differs then contact the Oracle Customer Care Center for assistance, otherwise continue to the next step. |
|
11. ☐ |
Linux server: Create replication user |
|
|
12. ☐ |
Linux server: Reset configuration information |
|
|
13. ☐ |
Linux server: Start replication from the correct position on the master |
|
|
14. ☐ |
Linux server: Start mysql slave |
|
|
15. ☐ |
Linux server: Check slave status |
In the output of above command, ensure that values corresponding to columns Slave_IO_Running and Slave_SQL_Running are set to Yes. |
|
16. ☐ |
Linux server: If the column value of both Slave_IO_Running and Slave_SQL_Runnin g are other than Yes, the status is not good and the error will need to be investigated. |
Look at last few lines of error log and record the errors below. Record error here:
Contact the Oracle Customer Care Center and ask for assistance. Continue from step 13 of this procedure after error resolution. |
|
17. ☐ |
OCLSMS server: Login to the OCLSMS Primary server and verify that Query Server is Connected. |
login as: lsmsadm lsmsadm@IP's password:<Enter Password>
Example: [lsmsadm@lsmspri ~]$ lsmsdb -c queryservers pc9091802.labs.nc.tekelec.com (10.75.136.183) Connected You have now completed this procedure. Query Server has started replicating data from OCLSMS. |
|
End of Procedure |
||
