database synchronizer administration manual

57
J-CORES Database Synchronizer Administration Manual 2008-03 Central Computer Services Co., LTD

Upload: databaseguys

Post on 24-Jun-2015

306 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: Database Synchronizer Administration Manual

J-CORES

Database Synchronizer Administration Manual

2008-03

Central Computer Services Co., LTD

Page 2: Database Synchronizer Administration Manual

Database Synchronizer Administration Manual

2

Revision Information date writer version

revised point

2008-03-31 IIZUKA Yukiko 1.0

first revision

Page 3: Database Synchronizer Administration Manual

Database Synchronizer Administration Manual

―Contents―

1. Introduction.....................................................................................................................5 2. Basic behavior .................................................................................................................6

2.1. Rules to update data.................................................................................................6 2.2. Operation mode, dry-run/go-live ..............................................................................9 2.3. Behaviors on errors...................................................................................................9 2.4. Access restriction ....................................................................................................10 2.5. Treatment of Oracle user integration ....................................................................10

3. J-CORES operational constraints ................................................................................ 11 4. Operational Example ....................................................................................................12 5. How to use .....................................................................................................................13

5.1. Requirement ...........................................................................................................13 5.2. Installing Database Synchronizer .........................................................................13 5.3. Usage of the merge command and the split command .........................................14

5.3.1. Synopses ...........................................................................................................14 5.3.2. Options..............................................................................................................15 5.3.3. Return codes.....................................................................................................18 5.3.4. Execution samples............................................................................................19

5.4. Checking messages of the merge/split command ..................................................20 5.5. Usages of the related commands............................................................................23

5.5.1. The cleanup command .....................................................................................23 5.5.2. A password generator.......................................................................................24

6. Properties ......................................................................................................................26

―Diagrams― Tables

Table 2-1 Data categories.............................................................................................6 Table 2-2 Behaviors on errors......................................................................................9 Table 5-1 Return codes of the merge / split command..............................................19 Table 5-2 Labels of data categories ...........................................................................21 Table 5-3 Return codes of the cleanup command......................................................24

3

Page 4: Database Synchronizer Administration Manual

Database Synchronizer Administration Manual

―Appendixes― Appendix A Correspondences of database tables to data categories of Database

Synchronizer Appendix B Updating rules of selectees, their statuses and data categories Appendix C Database Synchronizer operational example Appendix D The list of errors for the merge / split command

4

Page 5: Database Synchronizer Administration Manual

Database Synchronizer Administration Manual

1. Introduction

This document describes settings and operations of J-CORES Database Synchronizer. Database Synchronizer has been designed for merging/splitting data stored in J-CORES databases. Database Synchronizer is based on the following postulate:

a. “Merging” is that a part (or all) of data in a slave database are integrated into the master database of J-CORES.

b. “Splitting” is that a part (or all) of data in the master database are duplicated to a slave database.

c. The master database is the only database, into which all of J-CORES data are integrated.

d. Some slave databases are deployed onshore, and some are offshore (or on vessel). e. “Merging” and “splitting” are executed only between the master database and a

slave database, and are not executed between slave databases. User interfaces of Database Synchronizer are as follows:

- jcores-dbsync-merge2master; The command to merge - jcores-dbsync-split2slave; The command to split - jcores-dbsync-cleanup; The command to cleanup user lock statuses and

sessions on databases. This command may be used when merging (or splitting) processes failed.

- jcores-dbsync-pgen.sh; A command to generate a password for an Oracle user

5

Page 6: Database Synchronizer Administration Manual

Database Synchronizer Administration Manual

2. Basic behavior

2.1. Rules to update data

The rules to update data are depending on data categories, as follows:

Table 2-1 Data categories

split merge

updating rule when conflicting updating rule when conflicting

A1a. expedition data, expedition indistinguishable

union

act on the parameter, "--masterdb-overwrites-conflict" or "--slavedb-overwrites-conflict" or "--error-on-conflict"

union

act on the parameter, "--masterdb-overwrites-conflict" or "--slavedb-overwrites-conflict" or "--error-on-conflict"

A1b. expedition data, expedition distinguishable(*1)

overwrite(*2) overwrite overwrite(*2) overwrite

A1.

exp

editi

on d

ata,

edi

ted

only

on

sing

le D

B

A1b1. expedition data, VCD selectee excluding basic and defunct on master DB(*3)

overwrite(*2), adjusting the sort key order (local selectees follow basic selectees, and the orders among local selectees should not be changed.)

overwrite(*2), adjusting the sort key order (local selectees follow basic selectees, and the orders among local selectees should not be changed.)

overwrite(*2), adjusting the sort key order (local selectees follow basic selectees, and the orders among local selectees should not be changed.)

overwrite(*2), adjusting the sort key order (local selectees follow basic selectees, and the orders among local selectees should not be changed.)

A2a. expedition, site, hole and core data

union

act on the parameter, "--masterdb-overwrites-expsiteholecore-of-expeditions" or "--slavedb-overwrites-expsiteholecore-of-expeditions" or "--error-on-expsiteholecore-conflict-of-expeditions"

union

act on the parameter, "--masterdb-overwrites-expsiteholecore-of-expeditions" or "--slavedb-overwrites-expsiteholecore-of-expeditions" or "--error-on-expsiteholecore-conflict-of-expeditions"

A. e

xped

ition

dat

a

A2.

exp

editi

on, s

ite, h

ole,

cor

e da

ta a

nd

cura

toria

l mat

eria

l dat

a

A2b. curatorial material data union

act on the parameter, "--masterdb-repositories" or "--slavedb -repositories" (*4)

union

act on the parameter, "--masterdb-repositories" or "--slavedb -repositories" (*4)

B1. master data, editable only on master DB(*3) overwrite overwrite - error

B2. master data, editable on slave DB(*1) union

act on the parameter, "--masterdb-overwrites-conflict" or "--slavedb-overwrites-conflict" or "--error-on-conflict"

union

act on the parameter, "--masterdb-overwrites-conflict" or "--slavedb-overwrites-conflict" or "--error-on-conflict"

B. m

aste

r dat

a

B2a. master data, sequence current value

overwrite only records having the master database location(*5)

overwrite only records having the master database location(*5)

overwrite only records having the slave database location(*5)

overwrite only records having the slave database location(*5)

6

Page 7: Database Synchronizer Administration Manual

Database Synchronizer Administration Manual

split merge

updating rule when conflicting updating rule when conflicting

C. temporary data - - - -

*1: Roles’ categories differ by whether they belong to an expedition as below: The roles belonging to an expedition A1b The roles not belonging to an expedition B2

The roles not belonging to an expedition are: - developer - user administrator - VCD selectee administrator

The other roles belong to an expedition. *2: When not specifying expeditions to process, data in this category will not be merged (or not to be split). *3: Selectees' categories differ by their statuses. Refer to Appendix B for details. *4: If each conflicting data has different repository, a conflicting error occurs. The overwriting rules for conflicting section data are depended on repository values of section halves belonging to the section. Details are as below. (1) When repository values of archive halves and working halves are same, the section

data stored in the database which has a control of the repository overwrites the other. (Example 1)

(2) A case that repository values of archive halves and working halves are different. (a) A case that combinations of SECTION_HALVES.REPOSITORY for the section

halves are same between the master database and the slave database. (Example 2) - About records of the following tables; a case of conflicting, or a case that a

record stored in only one database. SECTION SECTION_COMMENT SUBSECTION SECT_EXPAND_CONTRACT

(i) When one database has controls of both repositories of archive halves and working halves, the record stored in the database which has controls overwrites the other. (Example 3)

(ii) When different databases have each control of repositories of archive halves and working halves, a conflicting error occurs. (Example 4)

- About records of the following tables; a case of conflicting, or a case that a

7

Page 8: Database Synchronizer Administration Manual

Database Synchronizer Administration Manual

record stored in only one database. SECT_HALF_COMMENT SECT_HALF_EXPAND_CONTRACT

The record stored in the database which has a control of its section half repository overwrites the other.

(b) When combinations of SECTION_HALVES.REPOSITORY for the section halves are different between the master database and the slave database, a conflicting error occurs. (Example 5)

Example 1; Master database Slave database Archive half repository CKY CKY Working half repository CKY CKY

Example 2; Master database Slave database Archive half repository KCC KCC Working half repository CKY CKY

Example 3; on the example 2, the master database has both controls of KCC and CKY. Example 4; on example 2, the master database has a control of KCC, and the slave

database has a control of CKY. Example 5;

Master database Slave database Archive half repository KCC CKY Working half repository CKY CKY

*5: The rules for the tables, SEQ_MANAGE and SEQ_NUMBER are as below: - Records of these tables shall have one to one relations each other. - Records of these tables are categorized as B1, excluding

SEQ_NUMBER.SEQ_CURRVAL categorized as C. - The value of SEQ_CURRVAL will be the greater value comparing records

with same SEQ_ID. The same SEQ_ID means the records' LOCATION_CODE, TABLE_NAME, and COLUMN_NAME in SEQ_MANAGE are same. To make this decision, the value of LOCATION_CODE is not considered.

For the lists of database tables, columns, or records belonging to each category, refer to Appendix A. Some data consist of one parent record and some children records. In this case, the

8

Page 9: Database Synchronizer Administration Manual

Database Synchronizer Administration Manual

updating rule of the children records accords with their parent record updating. For example, when A record and B record are conflicting and A is overwritten by B, children records of A would be overwritten by children records of B. By way of exception, updating rules of roles differ by their categories as below:

Roles categorized A1b: overwrite each scientist Roles categorized B2: union each scientist record

2.2. Operation mode, dry-run/go-live

Database Synchronizer employs two operation modes, called “dry-run”, which does not update J-CORES database, and “go-live”, which updates J-CORES database. User can check the results of merging or splitting by “dry-run” mode without updating the database. To check errors and results, executing in the dry-run mode before synchronization in the go-live mode is strongly recommended.

2.3. Behaviors on errors

There are three types of errors: parameter error, runtime error, logical error. The behavior on an error is depended on the current operational mode as blow:

Table 2-2 Behaviors on errors

dry-run mode go-live mode Parameter error Stop processing. No updating has done.

Logical error Continue processing to detect of all logical errors.

Stop processing. And all updating is canceled, i.e. database is not updated.

Runtime error Stop processing, excepting some errors. And when stopping process in the go-live mode, all updating is cancelled. Refer to Appendix D for behavior on each error.

For the list of errors and their details, refer to Appendix D

9

Page 10: Database Synchronizer Administration Manual

Database Synchronizer Administration Manual

2.4. Access restriction

Database Synchronizer connects to the databases as the user “jcores.” To avoid parallel execution of synchronization, when another session of jcores existed on the databases, Database Synchronizer would stop processing. And no editing shall be done to neither the databases during merging (or splitting.) For safety, Database Synchronizer locks the other users, and closes existent sessions forcibly. At the end of merge/split processes, Database Synchronizer unlocks users. But in some cases of unexpected runtime errors, users might remain in locked statuses. And also jcores session used by Database Synchronizer might remain. Although Database Synchronizer would try to reconnect to unlock users on the database, if a database session had closed, locked status and the database session might still remain. In this case, by executing the cleanup command, the users would be unlocked and the remained jcores session would be closed. When an error message prompting to execute the cleanup command is displayed, execute the command.

2.5. Treatment of Oracle user integration

Although Oracle user may be needed to shift to another database with J-CORES user data shifts, there are two problems. One is that Database Synchronizer can’t access passwords of Oracle users. To resolve this problem, Database Synchronizer employs a function to get password of each user from specified external program. The external program should be specified as an option value. A possible external program is jcores-dbsync-pgen.sh. Another one is that Database Synchronizer can’t recognize Oracle user name suffix for J-CORES users (e.g. A J-CORES user named “xxx” has the name “xxx#2Z” as an Oracle user.) To resolve this problem, Database Synchronizer requires specifying the Oracle user name suffix as an option value. And at the end of processing, Database Synchronizer deletes Oracle users whose names end with the specified suffix and who do not exist in the SCIENTIST table.

10

Page 11: Database Synchronizer Administration Manual

Database Synchronizer Administration Manual

3. J-CORES operational constraints

Database Synchronizer performs on the premised J-CORES operational constraints, which are described in the following documents.

- Operational Manual, 4.9. Synchronizing databases - The user manual of VCD Selectee Administrator, 2. Operational Restrictions - The user manual of Operation, 2. Operational Restrictions - The user manual of Curation, 2. Operational Restrictions - The user manual of User, 2. Operational Restrictions

11

Page 12: Database Synchronizer Administration Manual

Database Synchronizer Administration Manual

4. Operational Example

Some operational examples are described in Appendix C. Those examples are based on a premised scenario. Merging can be executed after finishing an expedition and during the expedition repeatedly. And splitting can be executed before starting an expedition and during the expedition repeatedly.

12

Page 13: Database Synchronizer Administration Manual

Database Synchronizer Administration Manual

5. How to use

5.1. Requirement

Environmental requirements for Database Synchronizer are as follows: - Database Synchronizer runs on a UNIX machine with JRE 1.6.0 update 4 and

Bash. - Database Synchronizer requires direct network connections to the master

database and to the slave database to merge or to split. And the speeds of the network connections shall be as fast as a connection inside LAN.

- The slave database shall be a J-CORES database instance and have all object needed (table spaces, roles, tables, indexes, triggers, synonyms, “jcores” user, and master data.)

5.2. Installing Database Synchronizer

Installing steps are as follows: 1. Make one directory to install. And deploy program files and a library file in the

directory as below:

install_directory/ jcores-dbsync-merge2master jcores-dbsync-split2slave jcores-dbsync-cleanup classes/

jcores-dbsync.jar ojdbc14.jar (*)

properties/ dbsync.properties

* The library, ojdbc14.jar can be downloaded from the site of Oracle. (http://www.oracle.com/technology/index.html)

2. Make sure that command shell files have execute permissions. 3. Deploy the file, jcores-dbsync-pgen.sh in any directory you want. 4. Each command can be executed from any directories. If necessary, add the directory

where command files are deployed in to your path.

13

Page 14: Database Synchronizer Administration Manual

Database Synchronizer Administration Manual

5.3. Usage of the merge command and the split command

Variables are underlined.

5.3.1. Synopses

(1) Synopsis of the merge command

To run merge processes:

jcores-dbsync-merge2master [--expeditions-to-merge expedition[,..]] [--masterdb-repositories repository[,..] ]--slavedb -repositories-all-the-others | --masterdb-repositories-all-the-others[ -- slavedb-repositories repository[,..]] [--masterdb-overwrites-conflict | --slavedb-overwrites-conflict | --error-on-conflict] [[--masterdb-overwrites-expsiteholecore-of-expeditions expedition[,..]] [--slavedb-overwrites-expsiteholecore-of-expeditions expedition[,..]] [--error-on-expsiteholecore-conflict-of-expeditions-all-the-others]] | [[--masterdb-overwrites-expsiteholecore-of-expeditions expedition[,..]] [--slavedb-overwrites-expsiteholecore-of-expeditions-all-the-others] [--error-on-expsiteholecore-conflict-of-expeditions expedition[,..]]] | [[--masterdb-overwrites-expsiteholecore-of-expeditions-all-the-others] [--slavedb-overwrites-expsiteholecore-of-expeditions expedition[,..]] [--error-on-expsiteholecore-conflict-of-expeditions expedition[,..]]] --masterdb-connection password-for-user-jcores@hostname-or-ip-address:port:instance --slavedb-connection password-for-user-jcores@hostname-or-ip-address:port:instance [--go-live | --dry-run] --masterdb-loginid-suffix suffix --password-generator passwd-generator-command-with-option [--java java-command] [--option-file file-name]

To see the synopsis:

jcores-dbsync-merge2master --help

(2) Synopsis of the split command

To run split processes:

jcores-dbsync-split2slave [--expeditions-to-split expedition[,..]] [--masterdb-repositories repository[,..] ]--slavedb -repositories-all-the-others | --masterdb-repositories-all-the-others[ -- slavedb-repositories repository[,..]]

14

Page 15: Database Synchronizer Administration Manual

Database Synchronizer Administration Manual

[--masterdb-overwrites-conflict | --slavedb-overwrites-conflict | --error-on-conflict] [[--masterdb-overwrites-expsiteholecore-of-expeditions expedition[,..]] [--slavedb-overwrites-expsiteholecore-of-expeditions expedition[,..]] [--error-on-expsiteholecore-conflict-of-expeditions-all-the-others]] | [[--masterdb-overwrites-expsiteholecore-of-expeditions expedition[,..]] [--slavedb-overwrites-expsiteholecore-of-expeditions-all-the-others] [--error-on-expsiteholecore-conflict-of-expeditions expedition[,..]]] | [[--masterdb-overwrites-expsiteholecore-of-expeditions-all-the-others] [--slavedb-overwrites-expsiteholecore-of-expeditions expedition[,..]] [--error-on-expsiteholecore-conflict-of-expeditions expedition[,..]]] --masterdb-connection password-for-user-jcores@hostname-or-ip-address:port:instance --slavedb-connection password-for-user-jcores@hostname-or-ip-address:port:instance [--go-live | --dry-run] -- slavedb-loginid-suffix suffix --password-generator passwd-generator-command-with-option [--java java-command] [--option-file file-name]

To see the synopsis:

jcores-dbsync-split2slave --help

5.3.2. Options

(1) Note

The notes when specifying an option are as follows. a. The options, --java, --help, and --option-file can be specified only on command line.

The other options can be specified both on command line and in an option file. There is no difference arising from a specification way.

b. The options can be specified in random order. c. Specifying wrong options makes a parameter error. (e.g. same options specified

more than once, undefined option, arguments for an option.) d. When specifying more than one variable, they must be listed separating by a

comma without a space. e. The option suffix, “-all-the-others”, means “all of the values excluding the values

which are specified as arguments for the other options of the same category.” For example, “--masterdb-repositories-all-the-others --slavedb-repositories CKY”

15

Page 16: Database Synchronizer Administration Manual

Database Synchronizer Administration Manual

means the repositories which are controlled by the master database are all of the repositories stored in databases excluding CKY.

f. When specifying options and their arguments on command line, you have to quote a string to pass to the command correctly via your login-shell, if necessary. For example, Bash considers ‘#’ is the beginning character of a comment. Therefore when you would like to specify a string with ‘#’, you need to quote the word. Refer to your login-shell manual for details of its quote rules. Some examples for Bash are below. Example 1: Specifying “#z2” as an argument for “--masterdb-loginid-suffix” option

--masterdb-loginid-suffix "#z2" Example 2: Specifying the password generator command and its option as an argument for “--password-generator” option

--password-generator "./jcores-dbsync-pgen.sh --suffix ¥"abc¥"" g. When specifying options and their arguments in an option file, you should accord

to the rules below: - The character ‘#’ is not considered as a comment, i.e. a quotation for the

character, ‘#’ is not needed and has no influence. - Specifying a string with blanks, you have to quote it. - Specifying a quoted string within quotation marks, you have to use another

quotation mark or to escape them using ‘¥.’ The character ‘¥’ is always considered as the escape character.

Example 1: Specifying “#z2” as an argument for “--masterdb-loginid-suffix” option --masterdb-loginid-suffix #z2

Example 2: Specifying the password generator command and its option as an argument for “--password-generator” option

--password-generator "./jcores-dbsync-pgen.sh --suffix ¥"abc¥""

(2) Option List for the merge command

[--expeditions-to-merge expedition[,..]]

Specify expeditions to process. In the A1b data, only the records belonging to specified expeditions will be processed. By default, Database Synchronizer will merge no expedition data categorized A1b.

[--masterdb-repositories repository[,..] ]--slavedb -repositories-all-the-others |

--masterdb-repositories-all-the-others[ -- slavedb-repositories repository[,..]]

Specify repositories of which master database and/or slave database have controls. In

16

Page 17: Database Synchronizer Administration Manual

Database Synchronizer Administration Manual

the A2b data, the record stored in the database which has control of its repository will overwrite the other when conflicting.

[--masterdb-overwrites-conflict | --slavedb-overwrites-conflict | --error-on-conflict]

Specify the behavior when records in the A1a and B2 excluding B2a categories conflict. The default is the option, --error-on-conflict, which means all conflicts cause errors.

[[--masterdb-overwrites-expsiteholecore-of-expeditions expedition[,..]]

[--slavedb-overwrites-expsiteholecore-of-expeditions expedition[,..]]

[--error-on-expsiteholecore-conflict-of-expeditions-all-the-others]] |

[[--masterdb-overwrites-expsiteholecore-of-expeditions expedition[,..]]

[--slavedb-overwrites-expsiteholecore-of-expeditions-all-the-others]

[--error-on-expsiteholecore-conflict-of-expeditions expedition[,..]]] |

[[--masterdb-overwrites-expsiteholecore-of-expeditions-all-the-others]

[--slavedb-overwrites-expsiteholecore-of-expeditions expedition[,..]]

[--error-on-expsiteholecore-conflict-of-expeditions expedition[,..]]]

Specify which database has controls of what expeditions, for the A2a data. In the A2a data, the record stored in the database which has control of its expedition will overwrite the other when conflicting. By default, conflicts of the A2a data belonging to unspecified expeditions as arguments for the option of the master database and the slave database, (if no option, belonging to all expeditions) will cause logical errors, as same as specifying the option, --error-on-expsiteholecore-conflict-of-expeditions-all-the-others.

--masterdb-connection password-for-user-jcores@hostname-or-ip-address:port:instance

Specify the information to connect the master database.

--slavedb-connection password-for-user-jcores@hostname-or-ip-address:port:instance

Specify the information to connect the slave database to be processed.

[--go-live | --dry-run]

Specify the operational mode. For details of operational modes, refer to the chapter 2.1. The default is the dry-run mode.

--masterdb-loginid-suffix suffix Specify the Oracle user id suffix of the master database to use when creating users. Refer to the chapter 2.5 for the details of the suffix.

--password-generator passwd-generator-command-with-option

Specify the password generator with its option. When creating an Oracle user, Database Synchronizer will call specified command with the specified option and his/her Oracle

17

Page 18: Database Synchronizer Administration Manual

Database Synchronizer Administration Manual

user id. The user id is added as the last argument for the command. You specify the command in an absolute path or in a relative path, or configure the environmental variable, PATH, as you can call the command from any directories. For the usage of the password generator of version 1.3, refer to the chapter 5.5.2(2).

[--java java-command]

Specify the java command to use to execute Database Synchronizer. Its version must be 1.6. By default, the java command found on user path will be used. This option can be specified only as a command line option. Do not include in an option file.

[--option-file file-name]

Specify a file containing options. By default, Database Synchronizer seeks no option file. This option can be specified only as a command line option. Do not include in an option file.

[--help]

Display the usage of the command. When specifying this option, all of the rest options are ignored. This option can be specified only as a command line option. Do not include in an option file.

(3) Option List for the split command

The options for the split command are almost same as the merge command, excluding the options, --expeditions-to-merge, --masterdb-loginid-suffix. Instead of them, the split command supports options below:

[--expeditions-to-split expedition[,..]]

Specify expeditions to process. In the A1b data, only the records belonging to specified expeditions will be processed. By default, Database Synchronizer will split no expedition data categorized A1b.

--slavedb-loginid-suffix suffix

Specify the Oracle user id suffix of the slave database to use when creating users.

5.3.3. Return codes

The merge command and the split command return a code after processing. The meanings of the codes are below:

18

Page 19: Database Synchronizer Administration Manual

Database Synchronizer Administration Manual

Table 5-1 Return codes of the merge / split command

Status Code Situation Success 0 Succeeded. No error has occurred. Failed to start java command

1 Can't find jar file for command execution, jar file was destroyed, or illegal CLASSPATH, etc.

Some errors have occurred.

11 Some runtime errors or logical errors have occurred while processing.

Can't find java command 20 Specified java command is not found, or installed directory is not included in PATH, etc.

Command format error 21 Required option was not specified, illegal command format, or unexpected option was specified, etc.

Can't lock the other users

30 Can't lock the other users at the master database or/and the slave database.

Another Synchronizer might be running

31 The user for this system, jcores has been logging in already. To avoid collisions, the synchronizer doesn't run when another jcores session exists.

Logical error 40 A logical error has occurred. Runtime error 99 Serious runtime error has occurred.

5.3.4. Execution samples

These are examples of executing the merge command. (1) is an example of specifying options both on a command line and in an option file. (2) is an example of specifying options only on a command line. Executions these examples save the standard output of the command as a file, merge_315_316_out.txt, and the standard error output as a file, merge_315_316_err.txt. Both examples are for Bash.

(1) Using an option file

[Executing the command on a command line]

./jcores-dbsync-merge2master --option-file merge_opt.txt ¥ --java /usr/java/jdk1.6.0_04/bin/java ¥ --expeditions-to-merge 315,316 ¥ 1>merge_315_316_out.txt 2> merge_315_316_err.txt

[Option file]

--masterdb-repositories-all-the-others

19

Page 20: Database Synchronizer Administration Manual

Database Synchronizer Administration Manual

--slavedb-repositories CKY --slavedb-overwrites-conflict --masterdb-overwrites-expsiteholecore-of-expeditions-all-the-others --slavedb-overwrites-expsiteholecore-of-expeditions 315,316 --masterdb-connection [email protected]:1521:masterdb --slavedb-connection [email protected]:1521:slavedb --masterdb-loginid-suffix #z2 --password-generator "./jcores-dbsync-pgen.sh --suffix aa"

(2) Specifying all options as command line options

[Executing the command on a command line]

./jcores-dbsync-merge2master --java /usr/java/jdk1.6.0_04/bin/java ¥ --expeditions-to-merge 315,316 ¥ --masterdb-repositories-all-the-others ¥ --slavedb-repositories CKY ¥ --slavedb-overwrites-conflict ¥ --masterdb-overwrites-expsiteholecore-of-expeditions-all-the-others ¥ --slavedb-overwrites-expsiteholecore-of-expeditions 315,316 ¥ --masterdb-connection [email protected]:1521:masterdb ¥ --slavedb-connection [email protected]:1521:slavedb ¥ --masterdb-loginid-suffix “#z2” ¥ --password-generator "./jcores-dbsync-pgen.sh --suffix aa" ¥ 1>merge_315_316_out.txt 2> merge_315_316_err.txt

5.4. Checking messages of the merge/split command

(1) Confirming the option evaluation

Database Synchronizer outputs evaluated options to the standard output. An example is below:

--expeditions-to-merge 315,316 --masterdb-repositories-all-the-others BCR,ECR,KCC,SHIP,OUT,GCR,WCR --slavedb-repositories CKY --slavedb-overwrites-conflict --masterdb-overwrites-expsiteholecore-of-expeditions-all-the-others 116,117,115,195,194,196,191,190,193,118,119,87,125,126,127,128,121,122,123,124,22,2

20

Page 21: Database Synchronizer Administration Manual

Database Synchronizer Administration Manual

3,24,25,26,27,28,29,30,6,31,120,134,135,132,59,133,58,57,56,19,314,179,18,176,21,131,60,90,187,189,180,182,183,184,185,186,902,901 --slavedb-overwrites-expsiteholecore-of-expeditions 315,316 --error-on-expsiteholecore-conflict-of-expeditions (none) --masterdb-connection dbserver.sample.domain:1521:masterdb --slavedb-connection dbserver.sample.domain:1521:slavedb --dry-run --masterdb-loginid-suffix #z2 --password-generator ./jcores-dbsync-pgen.sh --suffix aa --java /usr/java/jdk1.6.0_04/bin/java

(2) Checking how data will be updated

Database Synchronizer outputs messages of data differences and inserting, updating and deleting data to the standard output. But no messages for same data stored in each database are output. The formats of these messages are below. Variables are underlined.

[Differences]

DIFFER;table_name,data_cat_label:masterdb;record_data_or_nonexistent DIFFER;table_name,data_cat_label:slavedb;record_data_or_nonexistent

[Updating, inserting, deleting]

UPDATE;table_name,data_cat_label:master_or_slave_db;record_data INSERT;table_name,data_cat_label:master_or_slave_db;record_data DELETE;table_name,data_cat_label:master_or_slave_db;record_data

[The definitions of variables]

table_name; a table name in processing data_cat_label; a label of the processing data category, listed below.

Table 5-2 Labels of data categories

category label A1a expedition-data-exp-indistinguishable A1b expedition-data A1b1 vcd-selectee-except-basic-and-defunct-in-masterdb A2a exp-site-hole-core A2b curatorial-material-data

21

Page 22: Database Synchronizer Administration Manual

Database Synchronizer Administration Manual

category label B1 master-data B2 master-data-editable B2a master-data-sequence-current-value C stray-data

master_or_slave_db; the database which have updating data originally. For updating inserting, the master database when splitting, and the slave database when ing. For deleting, the slave database when splitting, and the master database merging.

and mergwhenrecord_data_or_nonexistent; record_data or the string, “nonexistent” which means no

record exist. The “nonexistent” would appear only when the processing table is a child table.

record_data; column values to update with. Column values which are not updated are not displayed. A null value would be output as the string “null.” A line code in a column value would begin a new line with a tab code on its head. (Each “¥n” and “¥r” leads one new line, excepting a pair of “¥r¥n”, which leads one new line.)

Database Synchronizer also outputs messages of creating/dropping Oracle users, and granting/revoking roles. The formats of these messages are below. Variables are underlined:

[Creating, dropping a user]

date CREATE-ORACLE-USER;data_cat_label:master_or_slave_db;user...result date DROP-ORACLE-USER;data_cat_label:master_or_slave_db;user...result

[Granting, revoking a role]

date GRANT-ORACLE-ROLE;data_cat_label:master_or_slave_db;user,role...result date REVOKE-ORACLE-ROLE;data_cat_label:master_or_slave_db;user,role...result

[The definitions of variables]

date; processed date. The format is yyyy-mm-ddThh:mm:ss.sssZ. data_cat_label; a label of data category. For creating and deleting user, it is the string

“master-data-editable.” For granting and revoking a role, when the role belongs to an expedition, the string “expedition-data,” when the role does not belong to an expedition, the string “master-data-editable.”

master_or_slave_db; the database to be updated, the slave database when splitting, and the master database when merging.

22

Page 23: Database Synchronizer Administration Manual

Database Synchronizer Administration Manual

user; an Oracle user id to be processed, with a suffix like “#z2.” role; an Oracle role to grant or to revoke. result; a result of processing. In the go-live mode, it is “Succeeded” or “Failed.” In the

dry-run mode, “Skipped,” since SQLs to process these tasks are not published.

(3) Recognizing errors

Database Synchronizer outputs messages to the standard error output when an error occurs. To know what errors occurred and why they occurred, see the error messages. For the list of errors and their messages, refer to Appendix D. And to solve an error, editing database may be needed following Appendix D.

5.5. Usages of the related commands

5.5.1. The cleanup command

(1) Basic behavior

The cleanup command processes the following tasks for every specified database as arguments.

- Unlock all users excluding the user, jcores. - Close existent sessions of the user, jcores.

(2) Synopsis

jcores-dbsync-cleanup [--forcible | --interactive] ¥ [--java java-command] ¥ password-for-user-jcores@hostname-or-ip-address:port:instance [...]

(3) Options and arguments

The options can be specified in random order.

[--forcible | --interactive]

The --forcible option closes the sessions of jcores forcibly. The --interactive option gives a prompt before closing the sessions. The default is -- interactive.

[--java java-command]

Specify the java command to use to execute. Its version must be 1.6. By default, the java command found on user path will be used.

password-for-user-jcores@hostname-or-ip-address:port:instance [ ...]

Specify the information to connect the databases to be cleaned up. You can specify as

23

Page 24: Database Synchronizer Administration Manual

Database Synchronizer Administration Manual

many databases as you want separating by a blank.

(4) Return codes and message outputs

The cleanup command returns a code after processing. The meanings of the codes are below:

Table 5-3 Return codes of the cleanup command

Status Code Situation Success 0 Succeeded cleaning up for all of specified databases.

No error has occurred. Failed to start java command

1 Can't find jar file for command execution, jar file was destroyed, or illegal CLASSPATH, etc.

Failed to clean up 11 Cleaning up for some (or all) databases failed.

Can't find java command 20 Specified java command is not found, or installed directory is not included in PATH, etc.

Command format error 21 Required parameter was not specified, illegal command format, or unexpected option was specified, etc.

Runtime error 99 Serious runtime error has occurred. The cleanup command outputs processing messages to the standard output, and error messages to the standard error output. To know detailed results of processing, or to know causes of errors, refer to these messages. For the list of errors and their messages, refer to Appendix D.

(5) Execution example

jcores-dbsync-cleanup --forcible --java /bin/usr/java ¥ [email protected]:1521:honban [email protected]:1521:ship

5.5.2. A password generator

(1) Basic behavior of a password generator

A password generator is a command which outputs a string to the standard output as a password of specified user. Database Synchronizer calls this command at beginning to confirm execution, and calls when creating a user. A password generator is exchangeable. A generator to be used shall perform as below:

- A created password shall consist of only alphanumeric characters, “_”, “$”, and

24

Page 25: Database Synchronizer Administration Manual

Database Synchronizer Administration Manual

“#.” - The last argument for the command is an Oracle user id, of which a password is

created. - If errors occur, no message is output to the standard output. - If errors occur, error messages indicating causes are output to the standard

error output. - The command exits with status 0 if a password is created successfully, non-zero

if errors occur.

(2) The password generator of version 1.3

A password generator, jcores-dbsync-pgen.sh is bundled in J-CORES version 1.3. This generator satisfies the behaviors written in 5.3.1(1). The password generator outputs a string which connected a specified user name and a specified suffix, e.g. when a suffix is “_suffix”, a password for a user “uname” is “uname_suffix.”

[Synopsis]

jcores-dbsync-pgen.sh --suffix passwd-suffix userid

[Option]

The options shall be specified in the fixed order. --suffix passwd-suffix; Specify a string to be used as a password suffix. The argument,

passwd_suffix shall consist of only alphanumeric characters, “_”, “$”, and “#.” userid; Specify a Oracle user id, whose password will be created.

[Errors]

The password generator outputs error messages to the standard error output. For the list of errors and their messages, refer to Appendix D.

[Execution example]

This is an example to execute from a command line, specifying all arguments. jcores-dbsync-pgen.sh --suffix _tmp “taro#z2”

This is an example to specify as an argument of the “--password-generator” option. jcores-dbsync-pgen.sh --suffix _tmp

25

Page 26: Database Synchronizer Administration Manual

Database Synchronizer Administration Manual

26

6. Properties

Database Synchronizer employs the property mechanism of Java, same as J-CORES client applications. You can change some values which influence on behaviors of Database Synchronizer by editing its property file. The property file is “properties/dbsync.properties” in the installed directory of Database Synchronizer. The editable values are below: default_password; default password to use when creating an Oracle user. This password

would be used when password generating failed. retry_time_second; seconds to wait retrying to connect. When the database session had

closed unexpectedly, Database Synchronizer would try to reconnect to unlock users on the database.

retry_time_count; the maximum counts to retry to connect to the session closed database.

Page 27: Database Synchronizer Administration Manual

Database SynchronizerAdministration ManualAppendix A

Correspondences of database tablesto data categories of Database Synchronizer

2008-03

Central Computer Services Co., LTD

Page 28: Database Synchronizer Administration Manual

Database Synchronizer Administration Manual Appendix A

Most of data are categorized per tables. Some data are categorized per columns, or records.

Tables (parent) Tables (children) condition of records

core_depth_processingdrill_depth_processingmud_depth_processingwireline_depth_processingseismic_depth_processingcore_depth_processing_valdrill_depth_processing_valmud_depth_processing_valwireline_depth_processing_valseismic_depth_processing_valim_csvfile_seriesim_csvfile_data

db_overview_counts

exped_scientist_association Related role_type.expedition_based_role is 1(expedition based).

carb21_analysiscarb21_chnso_rawdatamagnetometer21_resultmagnetometer21_dataim_gaschro_resultim_gaschro_calibrationim_gaschro_attachment

od21_section_photo od21_section_photo_imageams21_measurement_run_result

im_liquidchro_resultim_liquidchro_calibrationim_liquidchro_attachment

im_mad_run im_mad_attachmentim_manual_input_run im_manual_input_attachment

im_massspectro_resultim_massspectro_calibrationim_massspectro_attachmentod21_mscl_thickness_paramsod21_mscl_pwave_paramsod21_mscl_magsus_paramsod21_mscl_resistivity_paramsod21_mscl_thickness_deviationod21_mscl_pwave_travle_timeod21_mscl_pwave_signal_ampod21_mscl_gamma_count_rateod21_mscl_raw_magsusod21_mscl_core_temperatureod21_mscl__ncr_responseod21_mscl_pwave_amplitudeod21_mscl_pwave_velocityod21_mscl_gamma_densityod21_mscl_magsusod21_mscl_acoustic_impedanceod21_mscl_fractional_porosityod21_mscl_registivityod21_mscl_rscim_tcon_resultim_tcon_probe_typeim_tcon_calibration

xrayct21xrflogger21_dotxrflogger21_analyzeim_csvfile_seriesim_csvfile_data

im_xrd_run im_xrd_attachmentvcd21_text_textvcd21_position_interval_nosmpvcd21_direction_directionvcd21_direction_plane

vcd21_graphicrepresent_section vcd21_graphicrepresentvcd_general_commentvcd21_text_text

data categoriesA. expedition data

A1. Expedition data, edited only on single DBA1a. expedition dada, expedition indistinguishable.

A1b. Expedition data, expedition distinguishable

im_csvfile

processed_depth

im_csvfile.shot_point_id is NULL.

vcd21_struct_distribution

magnetometer21_run

im_massspectro_run

im_requidchro_run

im_gaschro_run

im_csvfile

od21_mscl_run

im_csvfile.shot_point_id is not NULL.

carb21_run

vcd_general_comment_object

xrflogger21_xrf

im_tcon_run

2

Page 29: Database Synchronizer Administration Manual

Database Synchronizer Administration Manual Appendix A

Tables (parent) Tables (children) condition of recordsdata categoriesvcd21_lithounit_distributionvcd21_text_textvcd21_position_depth_intervalvcd21_position_vcd_samplevcd21_position_interval_nosmplvcd21_position_depth_horizonvcd21_lithology_distributionvcd21_position_depth_intervalvcd21_position_interval_nosamplevcd21_position_depth_horizonvcd_litho_graded_alt_membervcd_lithology_alternationvcd_lithology_alt_membervcd_litho_massive_alt_membervcd_lithology_gradationvcd_lithology_assign_delegatevcd21_lithology_visualvcd21_lithology_microscopyvcd21_microscopy_photovcd21_lithology_descriptorvcd21_lithology_hardrockvcd21_lithology_hardtexturevcd21_lithology_hardmineralvcd21_lithology_hardmnrimorphvcd21_text_textvcd21_lithology_sedimentvcd21_lithology_sedsizecompvcd21_lithology_sedcomponentvcd21_lithology_dist_boundaryvcd21_direction_directionvcd21_direction_planestr_ref_unitstr_ref_unit_boundarystr_ref_boundary_horizonstr_ref_unit_list_column

str_ref_horizon str_ref_horizon_agestr_ref_literature str_ref_literature_elementsstr_ref_taxon

str_ocr_samplestr_ocr_occurrencestr_ocr_occurrence_generalstr_ocr_microscopeod21_microscope_photography

str_ocr_general_attributestr_ocr_symbol_propertystr_ocr_symbol_property_genstr_ocr_line_propertystr_ocr_line_property_generalstr_ocr_line_property_sample

str_am_depth_valstr_am_processed_depth_valstr_am_misc_material_depth_valstr_am_core_depth_valstr_am_holestr_am_control_pointstr_am_break_horizonstr_am_extra_control_pointstr_am_extra_control_point_agestr_am_depth_valstr_am_processed_depth_valstr_am_misc_material_depth_valstr_am_core_depth_val

mbio_conflower_detect_limitmbio_microscopy_photood21_microscope_photography

str_recog_recognition

str_am_agemodel

mbio_mbio

str_ref_unit_list

str_ocr_registration

vcd21_lithology_assigner

vcd21_lithounit_definition

3

Page 30: Database Synchronizer Administration Manual

Database Synchronizer Administration Manual Appendix A

Tables (parent) Tables (children) condition of recordsdata categories

vcd21_selectee_hierarchyvcd21_selectee_vesicularityvcd21_selectee_sedsortingvcd21_selectee_sedroundnessvcd21_selectee_consolidationvcd21_selectee_hardrockmineralvcd21_selectee_granularityvcd21_selectee_hardfreshnessvcd21_selectee_sedfabricvcd21_selectee_crystalinityvcd21_selectee_hardrocktexturevcd21_selectee_lithoboundaryvcd21_selectee_mnrimorphologyvcd21_selectee_occurrencevcd21_selectee_primarysecondvcd21_selectee_hierarchyvcd21_selectee_lithologyvcd21_selectee_sedgrainsizevcd21_selectee_sedmaterialvcd21_selectee_struct_typevcd21_selectee_struct_subgroup

expeditionsite

hole_commentssurveymudlogginglwd

core core_comments

subsectionsect_expand_contractsection_halvessect_half_expand_contractsect_half_commentsection_commentcore_samplelogging_sample

misc_material misc_material_comment

. db_overview_counts

Related db_overview_keys.compositelog_column isone ofjp.co.ccs.science.od21.compositelog.SectionIndexColumnjp.co.ccs.science.od21.compositelog.CoreRecoveryColumnjp.co.ccs.science.od21.compositelog.MiscMaterialIndexColumnjp.co.ccs.science.od21.compositelog.ScientistSampleIndexColumn

All selectees without selectees on B1.vcd21_selectee

A2. Expedition, site, hole, core data and curatorial material dataA2a. Expedition, site, hole, core data and curatorial material data.

A2b. Curatorial material data.

A2b1. Curatorial material data.

sample

A1b1. Expedition data, VCD selectee excluding basic and defunct on master DB

hole

section

4

Page 31: Database Synchronizer Administration Manual

Database Synchronizer Administration Manual Appendix A

Tables (parent) Tables (children) condition of recordsdata categories

database_location whithout database_location.location_enableseq_managedb_overview_keysrepositorymeasured_depthod21_system_typevcd21_struct_group

vcd21_selectee_hierarchyvcd21_selectee_vesicularityvcd21_selectee_sedsortingvcd21_selectee_sedroundnessvcd21_selectee_consolidationvcd21_selectee_hardrockmineralvcd21_selectee_granularityvcd21_selectee_hardfreshnessvcd21_selectee_sedfabricvcd21_selectee_crystalinityvcd21_selectee_hardrocktexturevcd21_selectee_lithoboundaryvcd21_selectee_mnrimorphologyvcd21_selectee_occurrencevcd21_selectee_primarysecondvcd21_selectee_hierarchyvcd21_selectee_lithologyvcd21_selectee_sedgrainsizevcd21_selectee_sedmaterialvcd21_selectee_struct_typevcd21_selectee_struct_subgroup

str_ref_categorystr_measured_depthseq_number without seq_number.seq_curval.role_typemisc_material_depth

hole_methodhole_typelwd_typecore_typeliner_typeorientation_tool_typecore_comment_typesection_comment_typesubsection_type_codeexpand_contract_causemisc_material_methodsample_codesample_code_labsmcs_sample_requestim_mad_beakercarb21_component_typemagnetometer21_treatment_typeim_manual_input_unitim_manual_input_subjectod21_mscl_calibrationim_tcon_probe_typeod21_microscope_typeod21_micro_observation_methodstr_ref_fossilgroupstr_ref_timescale str_ref_ts_controlpoint_agestr_ref_ts_controlpointmbio_m_preservationmbio_m_stainreagentmbio_m_particle_density_unitscientist exped_scientist_association

seq_number.seq_currval

sample_request.is_activejcores_application_mutexcurrent_expeditiondatabase_location.location_enable

B. Master dataB1. Master data, editable only on master DB

B2. Master data, editable on slave DB

B3. Seq_number.seq_currval

C. temporary data

vcd21_selecteevcd21_selectee.status_code is 2 (basic) or 3 (defunct)and vcd21_selectee.applied_expedition is NULL on themaster database.

5

Page 32: Database Synchronizer Administration Manual

Database SynchronizerAdministration ManualAppendix B

Updating rules of selectees

2008-03

Central Computer Services Co., LTD

Page 33: Database Synchronizer Administration Manual

Database Synchronizer Administration Manual Appendix B - merging rules

1 Merging rules of selectees

No. status ofslave database

status ofmaster database

result(*1)

datacategory comment

1 local (current) - slave A1b12 local (current) local (current) slave A1b13 local (not current) basic (expedition) master B14 local (not current) defunct (expedition) master B15 basic (expedition) basic (expedition) master B16 basic (expedition) defunct (expedition) master B17 basic basic master B18 basic defunct master B19 defunct (expedition) - slave A1b1

10 defunct (expedition) local slave A1b111 defunct (expedition) basic (expedition) master B112 defunct (expedition) defunct (expedition) master B113 defunct basic master B114 defunct defunct master B115 basic (expedition) - error A1b116 basic (expedition) local error A1b117 basic - error A1b118 basic local error A1b119 defunct - error A1b120 defunct local error A1b1

21 local (current) basic (expedition) master B1

If possible, the data on the slavedatabase would overwrite the dataon the master database. Howeverit is indistinguishable whetherthey are current. This shall beprohibited by human operation.

22 local (current) defunct (expedition) master B1

If possible, the data on the slavedatabase would overwrite the dataon the master database. Howeverit is indistinguishable whetherthey are current. This shall beprohibited by human operation.

23 local (not current) - slave A1b124 local (not current) local (not current) slave A1b1

25 - local (current) error A1b1

This state is caused as a result ofthe wrong operation as below:- Try to merge an expedition whichhas not been split.- Delete local selectee by issuingSQL on the slave database.

26 - local (not current) error A1b1

This state is caused as a result ofthe wrong operation as below:- Try to merge an expedition whichhas not been split.- Delete local selectee by issuingSQL on the slave database.

27 - basic (expedition) master B128 - defunct (expedition) master B129 - basic master B130 - defunct master B1

2

Page 34: Database Synchronizer Administration Manual

Database Synchronizer Administration Manual Appendix B - merging rules

*1 "slave" means "after merging, the record in the slave database would be stored in the master database.""master" means "the record in the master database would not be updated.""error" means "a logical error occurs." Refer to "The list of errors for Database Synchronizer", appendix D of "Database Synchronizer Administration Manual" for details of the logical error.

3

Page 35: Database Synchronizer Administration Manual

Database Synchronizer Administration Manual Appendix B - splitting rules

2 Splitting rules of selectees

No. status ofslave database

status ofmaster database

result(*1)

datacategory comment

1 local (current) - master A1b12 local (current) local (current) master A1b13 local (not current) basic (expedition) master B14 local (not current) defunct (expedition) master B15 basic (expedition) basic (expedition) master B16 basic (expedition) defunct (expedition) master B17 basic basic master B18 basic defunct master B19 defunct (expedition) - master A1b1

10 defunct (expedition) local master A1b111 defunct (expedition) basic (expedition) master B112 defunct (expedition) defunct (expedition) master B113 defunct basic master B114 defunct defunct master B1

15 basic (expedition) - error A1b1 This state is caused as a result ofthe wrong operation.

16 basic (expedition) local error A1b1 This state is caused as a result ofthe wrong operation.

17 basic - error A1b1 This state is caused as a result ofthe wrong operation.

18 basic local error A1b1 This state is caused as a result ofthe wrong operation.

19 defunct - error A1b1 This state is caused as a result ofthe wrong operation.

20 defunct local error A1b1 This state is caused as a result ofthe wrong operation.

21 local (current) basic (expedition) master B1

If possible, the data on the slavedatabase would overwrite the dataon the master database. Howeverit is indistinguishable whetherthey are current. This shall beprohibited by human operation.

22 local (current) defunct (expedition) master B1

If possible, the data on the slavedatabase would overwrite the dataon the master database. Howeverit is indistinguishable whetherthey are current. This shall beprohibited by human operation.

23 local (not current) - master A1b124 local (not current) local (not current) master A1b125 - local (current) master A1b126 - local (not current) master A1b127 - basic (expedition) master B128 - defunct (expedition) master B129 - basic master B130 - defunct master B1

*1 "slave" means "after merging, the record in the slave database would be stored in the master database.""master" means "the record in the master database would not be updated.""error" means "a logical error occurs." Refer to "The list of errors for Database Synchronizer", appendix D of "Database Synchronizer Administration Manual" for details of the logical error.

4

Page 36: Database Synchronizer Administration Manual

Database SynchronizerAdministration ManualAppendix C

Database Synchronizer operational example

2008-03

Central Computer Services Co., LTD

Page 37: Database Synchronizer Administration Manual

Database Synchronizer Administration Manual Appendix C

mas

ter

data

base

CK

Y sl

ave

data

base

KC

C s

lave

data

base

1 Prepares expedition320.

Create new records forexpedition 320. +

2 Splits expedition 316 and 320 tothe CKY slave database on theR/V Chikyu. Expedition 316 isrequired to reffer from theexpedition 320.

+ +

jcores-dbsync-split2slave--go-live--expeditions-to-split 316,320--masterdb-repositories-all-the-others--masterdb-overwrites-conflict--masterdb-overwrites-expsiteholecore-of-expeditions-all-the-others--masterdb-connectionpassword_for_jcores@url.to.the.masterdb:1521:masterdb--slavedb-connectionpassword_for_jcores@url.to.cky.slavedb:1521:slavecky--slavedb-loginid-suffix #z2--password-generator "jcores-dbsync-pgen.sh --suffix pw"

3 Adds J-CORES users andgrants roles to users for theexpedition 320.

+

4 Operates expedition320.

Adds sites, holes, cores,curatorial data and expeditionaldata to the slave database(CKY) using with J-CORES

li ti

+

5 Updates ripository oftransported curational data to +

6 Merges intermediate result ofthe expedition 320 on the CKYslave database to the masterdatabase.

+ +

jcores-dbsync-merge2master--go-live--expeditions-to-merge 320--slavedb-repositories CKY--masterdb-repositories-all-the-others--slavedb-overwrites-conflict--slavedb-overwrites-expsiteholecore 320--masterdb-overwrites-expsiteholecore-of-expeditions-all-the-others--masterdb-connectionpassword_for_jcores@url.to.the.masterdb:1521:masterdb--slavedb-connectionpassword_for_jcores@url.to.cky.slavedb:1521:slavecky--masterdb-loginid-suffix #z2--password-generator "jcores-dbsync-pgen.sh --suffix pw"

7 Splits data to KCC slavedatabase at Kochi Core Centerto refrect intermediatecuratorial result of currentexpedition.

+ +

jcores-dbsync-split2slave--go-live--slavedb-repositories KCC--masterdb-repositories-all-the-others--masterdb-overwrites-conflict--masterdb-overwrites-expsiteholecore-of-expeditions-all-the-others--masterdb-connectionpassword_for_jcores@url.to.the.masterdb:1521:masterdb--slavedb-connectionpassword_for_jcores@url.to.kcc.slavedb:1521:slavekcc--slavedb-loginid-suffix #z2--password-generator "jcores-dbsync-pgen.sh --suffix pw"

8 Samples at Kochi corecenter.

Adds sample data using with J-CORES sample application. +

9 Operates expedition320.

Adds sites, holes, cores,curatorial data, expeditionaldata to the CKY slave databaseusing with J-CORES

li ti

+

command and options

working database

Starts the expedition320.

Transports certainsections, samples andmiscelinousematerials to Kochicore center from R/VChikyu.

Activity operation

2

Page 38: Database Synchronizer Administration Manual

Database Synchronizer Administration Manual Appendix C

mas

ter

data

base

CK

Y sl

ave

data

base

KC

C s

lave

data

base command and optionsActivity operation

10 Merges sample data taken atKochi core center.

+ +

jcores-dbsync-merge2master--go-live--slavedb-repositories KCC--masterdb-repositories-all-the-others--masterdb-overwrites-conflict--masterdb-overwrites-expsiteholecore-of-expeditions-all-the-others--masterdb-connectionpassword_for_jcores@url.to.the.masterdb:1521:masterdb--slavedb-connectionpassword_for_jcores@url.to.kcc.slavedb:1521:slavekcc--masterdb-loginid-suffix #z2--password-generator "jcores-dbsync-pgen.sh --suffix pw"

11 Splits sample data taken atKochi core center to CKY slavedatabase.

+ +

jcores-dbsync-split2slave--go-live--slavedb-repositories CKY--masterdb-repositories-all-the-others--slavedb-overwrites-conflict--slavedb-overwrites-expeiditionsiteholecore-of-expeditions 320--masterdb-overwrites-expsiteholecore-of-expeditions-all-the-others--masterdb-connectionpassword_for_jcores@url.to.the.masterdb:1521:masterdb--slavedb-connectionpassword_for_jcores@url.to.cky.slavedb:1521:slavecky--slavedb-loginid-suffix #z2--password-generator "jcores-dbsync-pgen.sh --suffix pw"

12 Updates basic selectee set. +13 Splits updated basic selectee set

to the CKY slave database.

+ +

jcores-dbsync-split2slave--go-live--slavedb-repositories CKY--masterdb-repositories-all-the-others--slavedb-overwrites-conflict--slavedb-overwrites-expeiditionsiteholecore-of-expeditions 320--masterdb-overwrites-expsiteholecore-of-expeditions-all-the-others--masterdb-connectionpassword_for_jcores@url.to.the.masterdb:1521:masterdb--slavedb-connectionpassword_for_jcores@url.to.cky.slavedb:1521:slavecky--slavedb-loginid-suffix #z2--password-generator "jcores-dbsync-pgen.sh --suffix pw"

14 Descripts lithology distributionsand structure distributionsusing with updated basic

l

+

15 Other expeditions 314and 315 are requiredto reffer from thecurrent expedition320.

Splits expedition 314, 315.

+ +

jcores-dbsync-split2slave--go-live--expeditions-to-split 314,315--slavedb-repositories CKY--masterdb-repositories-all-the-others--slavedb-overwrites-conflict--slavedb-overwrites-expsiteholecore-of-expeditions 320--masterdb-overwrites-expsiteholecore-of-expeditions-all-the-others--masterdb-connectionpassword_for_jcores@url.to.the.masterdb:1521:masterdb--slavedb-connectionpassword_for_jcores@url.to.cky.slavedb:1521:slavecky--slavedb-loginid-suffix #z2--password-generator "jcores-dbsync-pgen.sh --suffix pw"

16 Operates expedition320.

Adds sites, holes, cores,curatorial data, expeditionaldata to the slave database(CKY) using with J-CORES

li ti

+

Refrects sample datato the slave databaseon R/V Chikyu.

Updates basic selecteeset (B1 data).

3

Page 39: Database Synchronizer Administration Manual

Database Synchronizer Administration Manual Appendix C

mas

ter

data

base

CK

Y sl

ave

data

base

KC

C s

lave

data

base command and optionsActivity operation

17 Updates ripository of curationaldata fron CKY to KCC. +

18 Merges expedition 320 to themaster database.

+ +

jcores-dbsync-merge2master--go-live--expeditions-to-merge 320--slavedb-repositories CKY--masterdb-repositories-all-the-others--slavedb-overwrites-conflict--slavedb-overwrites-expsiteholecore-of-expeditions 320--masterdb-overwrites-expsiteholecore-of-expeditions-all-the-others--masterdb-connectionpassword_for_jcores@url.to.the.masterdb:1521:masterdb--slavedb-connectionpassword_for_jcores@url.to.cky.slavedb:1521:slavecky--masterdb-loginid-suffix #z2--password-generator "jcores-dbsync-pgen.sh --suffix pw"

Curatorial materialson the R/V Chikyu aredischarged to theKochi Core Center.Completes expeidition320.

4

Page 40: Database Synchronizer Administration Manual

Database Synchronizer Administration Manual Appendix D

J-CORES

The list of errors for Database Synchronizer

2008-03

Central Computer Services Co., LTD

Page 41: Database Synchronizer Administration Manual

Database Synchronizer Administration Manual Appendix D

2

―Contents―

1. Parameter errors on the merge command .....................................................................3 2. Parameter errors on the split command ........................................................................8 3. Logical errors on the merge command and on the split command ...............................9 4. Runtime errors on the merge command and on the split command...........................12 5. Parameter errors on the cleanup command.................................................................15 6. Runtime errors on the cleanup command ....................................................................17 7. Parameter errors on a password generator..................................................................18

―Diagrams― Tables

Table 1-1 Parameter errors on the merge command ..................................................3 Table 2-1 Difference between the merge command and the split command .............8 Table 3-1 Logical errors on the merge/split command................................................9 Table 4-1 Runtime errors on the merge/split command...........................................12 Table 5-1 Parameter errors on the cleanup command .............................................15 Table 6-1 Runtime errors on the cleanup command.................................................17 Table 7-1 Parameter errors on a password generator ..............................................18

Page 42: Database Synchronizer Administration Manual

Database Synchronizer Administration Manual Appendix D

1. Parameter errors on the merge command

These are parameter errors on the merge command. When one of these errors occurs, a error message is displayed, and the merge process stops.

Table 1-1 Parameter errors on the merge command

option cause example of error message

No argument for the option.

Option `--expeditions-to-merge' requires an argument. Try `jcores-dbsync-merge2master --help' for more information.

Wrong formatted argument was specified. (Well formatted argument consist of three figures and commas)

Invalid argument for option `--expeditions-to-merge'. Try `jcores-dbsync-merge2master --help' for more information.

Expeditions specified more than once.

In the case that 901 and 902 are specified more than once: Invalid argument for option `--expeditions-to-merge': 901,902 are given more than once. Try `jcores-dbsync-merge2master --help' for more information.

[--expeditions-to-merge expedition[,..]]

Specified expeditions do not exist in the slave database.

In the case that 314 and 315 do not exist in the slave database: Invalid argument for option `--expeditions-to-merge': 314, 315 do not exist.

Required option, --slavedb-repositories-all-the-others or --masterdb-repositories-all-the-others, is not specified.

Missing options either `--masterdb-repositories-all-the-others' or `--slavedb-repositories-all-the-others'. Try `jcores-dbsync-merge2master --help' for more information.

Combination of specified options is illegal. (e.g. combination of --slavedb-repositories-all-the-others and --masterdb-repositories-all-the-others)

In the case of specifying --slavedb -repositories-all-the-others and --masterdb-repositories-all-the-others: Option conflict: Both of `--slavedb -repositories-all-the-others' and `--masterdb-repositories-all-the-others'. Try `jcores-dbsync-merge2master --help' for more information.

Combination of specified options is illegal, and required option is not specified. (e.g. specified only "--slavedb-repositories" and "--masterdb-repositories")

Missing options either `--masterdb-repositories-all-the-others' or `--slavedb-repositories-all-the-others'. Option conflict: Both of `--masterdb-repositories' and `--slavedb-repositories'. Try `jcores-dbsync-merge2master --help' for more information.

[--masterdb-repositories repository[,..] ]--slavedb-repositories-all-the-others | --masterdb-repositories-all-the-others[ -- slavedb-repositories repository[,..]]

No argument for the option '--masterdb-repositories' or '--slavedb-repositories'

In the case of `--masterdb-repositories': Option `--masterdb-repositories' requires an argument. Try `jcores-dbsync-merge2master --help' for more information.

3

Page 43: Database Synchronizer Administration Manual

Database Synchronizer Administration Manual Appendix D

option cause example of error message

Wrong formatted argument was specified.(Well formatted argument consist of the character sequence of four or less characters, and commas)

In the case of `--masterdb-repositories':Invalid argument for option `--masterdb-repositories'.Try `jcores-dbsync-merge2master --help' for more information.

Same repositories specified for the same option more than once.

In the case that KCC was specified more than once as arguments for `--masterdb-repositories': Invalid argument for option `--masterdb-repositories': KCC are given more than once. Try `jcores-dbsync-merge2master --help' for more information.

Repositories specified as arguments for --masterdb-repositories or --slavedb-repositories are not exist in specified database.

In the case that AAA is not exist in the master database, when specifying "--masterdb-repositories AAA": Invalid argument for option `--masterdb-repositories': AAA do not exist.

[--masterdb-overwrites-conflict | --slavedb-overwrites-conflict | --error-on-conflict]

Combination of specified options is illegal. (e.g. combination of --slavedb-overwrites-conflict and --masterdb-overwrites-conflict)

In the case of specifying --slavedb-overwrites-conflict and --masterd-boverwrites-conflict: Option conflict: Both of `--slavedb-overwrites-conflict' and `--masterdb-overwrites-conflict'. Try `jcores-dbsync-merge2master --help' for more information.

[--masterdb-overwrites-expsiteholecore-of-expeditions expedition[,..]] [--slavedb-overwrites-expsiteholecore-of-expeditions expedition[,..]] [--error-on-expsiteholecore-conflict-of-expeditions-all-the-others] | [--masterdb-overwrites-expsiteholecore-of-expeditions expedition[,..]] [--slavedb-overwrites-expsiteholecore-of-expeditions-all-the-others] [--error-on-expsiteholecore-conflict-of-expeditions expedition[,..]] | [--masterdb-overwrites-expsiteholecore-of-expeditions-all-the-others] [--slavedb-overwrites-expsiteholecore-of-expeditions expedition[,..]] [--error-on-expsiteholecore-conflict-of-expeditions expedition[,..]]

No argument for the option '--masterdb-overwrites-expsiteholecore-of-expeditions' or '--slavedb-overwrites-expsiteholecore-of-expeditions' or '--error-on-expsiteholecore-conflict-of-expeditions.'

In the case of `--masterdb-overwrites-expsiteholecore-of-expeditions': Option `--masterdb-overwrites-expsiteholecore-of-expeditions' requires an argument. Try `jcores-dbsync-merge2master --help' for more information.

4

Page 44: Database Synchronizer Administration Manual

Database Synchronizer Administration Manual Appendix D

option cause example of error message

One expedition was specified for plural options.

In the case that 314 and 315 were specified for master db and slave db: Option conflict: Both of `--masterdb-overwrites-expsiteholecore-of-expeditions' and `--slavedb-overwrites-expsiteholecore-of-expeditions' have the same arguments 314, 315. Try `jcores-dbsync-merge2master --help' for more information.

Combination of specified options is illegal.(e.g. combination of --masterdb-overwrites-expsiteholecore-of-expeditions-all-the-others and --slavedb-overwrites-expsiteholecore-of-expeditions-all-the-others)

In the case of specifying --masterdb-overwrites-expsiteholecore-of-expeditions-all-the-others and --slavedb-overwrites-expsiteholecore-of-expeditions-all-the-others:Option conflict: Both of `--masterdb-overwrites-expsiteholecore-of-expeditions-all-the-others' and `--slavedb-overwrites-expsiteholecore-of-expeditions-all-the-others'.Try `jcores-dbsync-merge2master --help' for more information.

Expeditions specified as arguments are not exist in specified database. For --error-on-expsiteholecore-conflict-of-expeditions, expeditions stored in either database can be specified.

In the case that 314 and 315 do not exist neither the master database nor the slave database, when specifying "--error-on-expsiteholecore-conflict-of-expeditions 314,315": Invalid argument for option `--error-on-expsiteholecore-conflict-of-expeditions': 314, 315 do not exist.

Required option, --masterdb-connection, is not specified.

Missing option `--masterdb-connection'. Try `jcores-dbsync-merge2master --help' for more information.

No argument for the option.

Option `--masterdb-connection' requires an argument. Try `jcores-dbsync-merge2master --help' for more information.

Wrong formatted argument was specified. (Well format is "string@string:number:string")

Invalid argument for option `--masterdb-connection'. Try `jcores-dbsync-merge2master --help' for more information.

Failed in connecting to the specified database instance.

Failed in connecting to the master database. (if existent, contents of exception are output.)

--masterdb-connection password-for-user-jcores@hostname-or-ip-address:port:instance

Failed in logging in the specified database. This might occur by specifying incorrect password.

Access denied for user jcores by the master database, e.g. incorrect password.

Required option, --slavedb-connection, is not specified.

Missing option `--slavedb-connection'. Try `jcores-dbsync-merge2master --help' for more information.

--slavedb-connection password-for-user-jcores@hostname-or-ip-address:port:instance

No argument for the option.

Option `--slavedb-connection' requires an argument. Try `jcores-dbsync-merge2master --help' for more information.

5

Page 45: Database Synchronizer Administration Manual

Database Synchronizer Administration Manual Appendix D

option cause example of error message

Wrong formatted argument was specified. (Well format is "string@string:number:string")

Invalid argument for option `--slavedb-connection'. Try `jcores-dbsync-merge2master --help' for more information.

Failed in connecting to the specified database instance.

Failed in connecting to the slave database.(if existent, contents of exception are output.)

Failed in logging in the specified database. This might occur by specifying incorrect password.

Access denied for user jcores by the slave database, e.g. incorrect password.

[--go-live | --dry-run] Both options, --go-live and --dry-run, were specified together.

Option conflict: Both of `--go-live' and `--dry-run'. Try `jcores-dbsync-merge2master --help' for more information.

Required option, --masterdb-loginid-suffix, is not specified.

Missing option `--masterdb-loginid-suffix'.Try `jcores-dbsync-merge2master --help' for more information.

No argument for the option.

Option `--masterdb-loginid-suffix'' requires an argument. Try `jcores-dbsync-merge2master --help' for more information.

--masterdb-loginid-suffix suffix

Specified argument contains illegal character(s). (e.g. quotation marks.)

Invalid argument for option `--masterdb-loginid-suffix'. Try `jcores-dbsync-merge2master --help' for more information.

Required option, --password-generator, is not specified.

Missing option `--password-generator'. Try `jcores-dbsync-merge2master --help' for more information.

No argument for the option.

Option `--password-generator' requires an argument. Try `jcores-dbsync-merge2master --help' for more information.

Failed in executing the specified command. To check the argument, Database Synchronizer issues the command with specified option and argument, adding a test user name.

In the case that the specified argument is "./jcores-dbsync-pgen.sh --suffix aaa" and a test user name is test#z2: Failed in executing password generator: ./jcores-dbsync-pgen.sh --suffix aaa test#z2 (if existent, contents of exception are output.)

The execution of the password generator for testing was interrupted. This might occur when other process killed the process of the generator.

In the case that the specified argument is "./jcores-dbsync-pgen.sh --suffix aaa" and a test user name is test#z2: Password generator interrupted: ./jcores-dbsync-pgen.sh --suffix aaa test#z2 (if existent, contents of exception are output.)

--password-generator passwd-generator-command-with-option

Error has occurred in generating password by the specified command, i.e. the command has returned a non-zero value, which means some errors occurred in processing.

In the case that the specified argument is "./jcores-dbsync-pgen.sh --suffix aaa" and a test user name is test#z2:Failed in generating password: ./jcores-dbsync-pgen.sh --suffix aaa test#z2(error messages from the password generator command are output.)

6

Page 46: Database Synchronizer Administration Manual

Database Synchronizer Administration Manual Appendix D

option cause example of error message

The option, --java, is specified in an option file. The option can be specified only as a command line option.

Option file can not contain option `--java'. [--java java-command]

No argument for the option. Option `--java' requires an argument. Try `jcores-dbsync-merge2master --help' for more information.

No argument for the option.

Option `--option-file' requires an argument. Try `jcores-dbsync-merge2master --help' for more information.

The specified option file can not be found.

Invalid argument for option `--option-file': file `./option.txt' does not exist.

The specified option file does not contain any options.

Invalid argument for option `--option-file': file `./option.txt' has no option.

The option, --option-file, is specified in the option file. The option can be specified only as a command line option.

Option file can not contain option `--option-file'.

[--option-file file-name]

The option file contains an illegal argument. This might occur when a blank character was used as separator of an argument list.

In the case that an illegal argument "wrong_arg" was written at line 3 in the option file: Illegal argument at line 3 in option file: wrong_arg

--help

The option, --help, is specified in an option file. The option can be specified only as a command line option.

Option file can not contain option `--help'.

Undefined option was specified. The difference between an option and an argument is whether the first letter is -.

In the case of specifying "-a": Illegal option `-a'. Try `jcores-dbsync-merge2master --help' for more information.

Same option was specified more than once. (--help can be specified more than once, but no meaning.)

In the case of specifying "--dry-run" more than once: Option conflict: Option `--dry-run' is given more than once. Try `jcores-dbsync-merge2master --help' for more information.

An illegal argument is specified on command line. This might occur when a blank character was used as separator of an argument list.

In the case of specifying "--masterdb-repositories KCC, YES": Illegal argument `YES'. Try `jcores-dbsync-merge2master --help' for more information.

Failed in executing the command, java. This might occur when the specified java command is not exist, or when JRE is not installed.

Unable to exec J-CORES Database Synchronizer (if existent, returned error messages from the call are output.)

common

Failed in executing the Database Synchronizer. This might occur when the jar file is corrupted, or the jar file is not exist.

(If existent, returned error messages from the call are output.) Unable to exec J-CORES Database Synchronizer.

7

Page 47: Database Synchronizer Administration Manual

Database Synchronizer Administration Manual Appendix D

2. Parameter errors on the split command

In principle, the errors on the split command are almost same as the errors on the merge command. However, followings are substituted:

Table 2-1 Difference between the merge command and the split command

merge command split command comment

jcores-dbsync-merge2master jcores-dbsync-split2slave The command name in the messages

to prompt to see the command usage.

--expeditions-to-merge --expeditions-to-split

The option to specify expeditions to

process. Specified expeditions should

be exist in the master database when

splitting.

--masterdb-loginid-suffix --slavedb-loginid-suffix The Oracle user id suffix in the

database to be updated.

8

Page 48: Database Synchronizer Administration Manual

Database Synchronizer Administration Manual Appendix D

3. Logical errors on the merge command and on the split command

These are logical errors on the merge command and on the split command. When one of these errors occurs, a error message is displayed, and when on the go-live mode, the process stops. When on the dry-run mode, the process continues.

Table 3-1 Logical errors on the merge/split command

cause example of error message(*1)

There is a reference which refers to nonexistent data. When this error occurs, possibly data were corrupted.

Data inconsistent. Referring record does not exist.NONEXISTENT-REFERENCE;table_name.column_name,data_cat_label:master_or_slave_db;all_column_record_data

There is a difference in the B1 data between the master database and the slave database, i.e. the B1 data must be same between the master database and the slave database. This error does not occur when splitting, because the B1 data will be overwritten by the master database.

Conflict of data_cat_label. CONFLICT;table_name,data_cat_label:masterdb;record_data_or_nonexistent CONFLICT;table_name,data_cat_label:slavedb;record_data_or_nonexistent

There are the conflicting data in the A1a or A2 or B2 categories. And option values which indicate conflicting causes a logical error have been specified. (e.g. specifying the option, --error-on-conflict for the data of A1a and B2)

Same as above.

There are section data or scientist data supposed duplication, but having different primary keys. Same as above.

There are age model data or recognition data supposed duplication, but belonging different expedition, in the following statuses: - When splitting, the data in the master database belong to expeditions to split, but the data in the slave database do not. - When merging, the data in the slave database belong to expeditions to merge, but the data in the master database do not. In these cases, the data to be updated belong to an expedition not to be processed. This error occurs to avoid updating other expedition data.

Same as above.

There are data supposed different, but having same unique keys, e.g. primary keys, values of columns with a unique constraint.

When the column violating unique constraint can be distinguished: Same as above When the column violating unique constraint cannot be distinguished: Maybe a Bug. Unexpected conflict of data_cat_label. Unique constraint was violated when inserting a record. CONFLICT;table_name,data_cat_label:master_or_slave_db;record_data

9

Page 49: Database Synchronizer Administration Manual

Database Synchronizer Administration Manual Appendix D

cause example of error message(*1)

There is an age model employing a recognition of another expedition which is not being processed, e.g. when an expedition to be merged is only 316, there is a age model employing recognitions belong to expeditions 314, 315, and 316. By way of exception, when the recognitions exist in the database to be updated, this error does not occur.

Failed in merging_or_splitting age model employing a recognitions of another expedition which is not being merged_or_splitted: expeditionsCONFLICT;STR_AM_CONTROL_POINT,expedition-data:master_or_slave_db;age_model_id,recognition_id

There is an undeletable recognition to be deleted. This might occur when the recognition is refered from an age model belongs to another expedition not to be processed.

Failed in merging_or_splitting the recognition employed by some age models of other expeditions which are not being merged_or_splitted: expeditions CONFLICT;STR_RECOG_RECOGNITION;expedition-data:master_or_slave_db;recognition_id,horizon_id,expedition,top_depth,bottom_depth,inversion_flag

A local selectee of merging expedition on the master database does not exist on the slave database. A basic selectee on the slave database is local on the master database. A basic selectee on the slave database does not exist on the master database. A defunct (ex-basic) selectee on the slave database is local on the master database. A defunct (ex-basic) selectee on the slave database does not exist on the master database.

A local selectee of merging expedition expedition on the master database does not exist on the slave database. A basic selectee on the slave database is local on the master database. A basic selectee on the slave database does not exist on the master database. A defunct (ex-basic) selectee on the slave database is local on the master database. A defunct (ex-basic) selectee on the slave database does not exist on the master database. CORRUPT-SELECTEE;vcd-selectee-except-basic-and-defunct-in-masterdb:masterdb;selectee_id,status_code CORRUPT-SELECTEE;vcd-selectee-except-basic-and-defunct-in-masterdb:slavedb;selectee_id,status_code_or_nonexistent

During merging or splitting, data was updated by another process unexpectedly.

Unexpected updating table table_name by another session.

*1: In the example of error messages, variables are underlined. Variables are almost

same as processing messages. Refer to the "Database Synchronizer Administration Manual" for details. table_name; a table name in processing column_name; a column name having problem data_cat_label; a processing data category label

A1a expedition-data-exp-indistinguishable A1b expedition-data A1b1 vcd-selectee-except-basic-and-defunct-in-masterdb A2a exp-site-hole-core A2b curatorial-material-data B1 master-data

10

Page 50: Database Synchronizer Administration Manual

Database Synchronizer Administration Manual Appendix D

B2 master-data-editable B2a master-data-sequence-current-value C stray-data

master_or_slave_db; the database, which has updating data originally. record_data_or_nonexistent; record_data or the string, “nonexistent” which means

record exist. The “nonexistent” would appear only when the processing table is a ld table.

no chirecord_data; column values to update with. Column values which are not updated

not displayed. areall_column_record_data; all column values of the record in the processing table. merging_or_splitting, merged_or_splitted; the process to be done. expeditions; expedition numbers. age_model_id,recognition_id,horizon_id,expedition,top_depth,bottom_depth,inversion_flag; values of the record. selectee_id,status_code; values of the record. status_code_or_nonexistent; status_code or the string "nonexistent"

11

Page 51: Database Synchronizer Administration Manual

Database Synchronizer Administration Manual Appendix D

4. Runtime errors on the merge command and on the split command

These are runtime errors on the merge command and on the split command. Some errors occur for environmental reason or Oracle errors.

Table 4-1 Runtime errors on the merge/split command

cause example of error message(*1) action after messaging

Other sessions of user jcores are on the master database. To avoid parallel execution of synchronization, when another session of jcores existed on the databases, Database Synchronizer would stop processing. This error occurs when specifying same database instance for --masterdb-connection and --slavedb-connection.

Other sessions of user jcores are on the master_or_slave database. Another synchronizer may be already running.

Stop processing.

Failed in terminating other session. At the beginning, to prohibit editing during database synchronization, Database Synchronizer kills other sessions to the master database and the slave database.

Failed in terminating session sid on the master_or_slave database. (if existent, contents of exception are output.)

Stop processing.

Failed in locking users, since listing user failed. At the beginning, to prohibit editing during database synchronization, Database Synchronizer locks all users excepting user jcores.

Could not list users of the master_or_slave database. Can not lock the users. (if existent, contents of exception are output.)

Stop processing.

Failed in locking a user at the beginning of processing.

Failed in locking user oracle_userid of the master database. (if existent, contents of exception are output.)

Stop processing.

Failed in creating Oracle user. Because failed in executing password generator.

Failed in executing password generator: ./jcores-dbsync-pgen.sh --suffix pass_suffix oracle_userid (if existent, contents of exception are output.)

Stop processing when on the go-live mode. Continue processing when on the dry-run mode.

Failed in creating Oracle user. Because a process to generate password for the user was interrupted.

Password generator interrupted: ./jcores-dbsync-pgen.sh --suffix pass_suffix oracle_userid (if existent, contents of exception are output.)

Stop processing when on the go-live mode. Continue processing when on the dry-run mode.

Failed in creating Oracle user. Because password generator failed in generating password.

Failed in generating password: ./jcores-dbsync-pgen.sh --suffix pass_suffix oracle_userid (error messages from the password generator command are output.)

Stop processing when on the go-live mode. Continue processing when on the dry-run mode.

Password generator returned a password including illegal characters. Password can contain only alphanumeric characters, “_”, “$”, and “#.”

Password generator returned a password including illegal characters: ./jcores-dbsync-pge.sh --suffix pass_suffix oracle_userid. Password must consist[a-zA-Z0-9_$#]. User

of oracle_userid wo

be created with password `

uld

default_password' instead.

Continue processing with a default password.

Failed in creating an Oracle user.

Failed in creating oracle user oracle_userid. (if existent, contents of exception are output.)

Stop processing.

12

Page 52: Database Synchronizer Administration Manual

Database Synchronizer Administration Manual Appendix D

cause example of error message(*1) action after messaging

Failed in dropping an Oracle user.

Failed in dropping oracle user oracle_userid. (if existent, contents of exception are output.)

Stop processing.

Failed in granting a role to an Oracle user.

Failed in granting role role to user oracle_userid. (if existent, contents of exception are output.)

Stop processing.

Failed in revoking a role from an Oracle user.

Failed in revoking role role from user oracle_userid. (if existent, contents of exception are output.)

Stop processing.

Although Database Synchronizer tried to reconnect to the database, could not. The database session was closed, and users on the database may remain being locked. When this error occurs, to unlock users and to terminate the database session, execution of the cleanup command is required.

Gave up after number_of_times attempts to reconnect to the master_or_slave database. Can not unlock the users. (display the message prompting to cleanup) (*2)

Stop processing.

Failed in terminating remaining sessions of user jcores on the master_or_slave database, when reconnecting. When the first session was closed, Database Synchronizer reconnects to the database to unlock other users, and terminates its first session if it exists. When this error occurs, to terminate the database session, execution of the cleanup command is required.

Failed in terminating sessions of user jcores on the master_or_slave database. (display the message prompting to cleanup) (*2)

Continue processing.

Failed in unlocking users, since listing user failed. Users on the database may remain being locked. When this error occurs, to unlock users, execution of the cleanup command is required.

Could not list users of the master_or_slave database. Can not unlock the users. (display the message prompting to cleanup) (*2) (if existent, contents of exception are output.)

Stop processing.

Failed in unlocking a locked user. Users on the database may remain being locked. When this error occurs, to unlock users, execution of the cleanup command is required.

Failed in unlocking user oracle_userid of the master_or_slave database. (display the message prompting to cleanup) (*2) (if existent, contents of exception are output.)

Stop processing.

Failed in disconnecting from the database. When this error occurs, to terminate the database session, execution of the cleanup command is required.

Failed in disconnecting from the master_or_slave database. (display the message prompting to cleanup) (*2) (if existent, contents of exception are output.)

Stop processing.

An unexpected error occurs for some reasons, e.g. database session was closed externally, hard disk is full, table Space is full, rollback segment is full, an error caused Oracle or JRE has occurred, etc.

Unexpected error (if existent, contents of exception are output.)

Stop processing.

Failed in committing changes. Failed in committing changes. (if existent, contents of exception are output.)

Stop processing.

13

Page 53: Database Synchronizer Administration Manual

Database Synchronizer Administration Manual Appendix D

cause example of error message(*1) action after messaging

Failed in roll backing changes. Failed in rollbacking changes. (if existent, contents of exception are output.)

Stop processing.

*1: In the example of error messages, variables are underlined.

master_or_slave; the master database or the slave database. sid; Oracle session id oracle_userid; Oracle user id, with suffix like "#z2" ./jcores-dbsync-pgen.sh --suffix pass_suffix; password generator command and its

options. This is a value specified as an argument for --password-generator option.

default_password; default password used when password generator returns an illegal password.

role; Oracle role number_of_times; number of attempting times merge_or_split_command; jcores-dbsync-merge2master or jcores-dbsync-split2slave --specifying_expedition_option; --expeditions-to-merge or --expeditions-to-split --database_loginid_suffix; --masterdb-loginid-suffix or --slavedb-loginid-suffix

*2: The message prompting to cleanup is as below.

Execute jcores-dbsync-cleanup before writing to the master_or_slave database by using any J-CORES applications including Database Synchronizer.

14

Page 54: Database Synchronizer Administration Manual

Database Synchronizer Administration Manual Appendix D

5. Parameter errors on the cleanup command

These are parameter errors on the cleanup command.

Table 5-1 Parameter errors on the cleanup command

option and argument cause example of error message action after

messaging

[--forcible | --interactive]

Both options, --forcible and --interactive, were specified together.

Option conflict: Both of `--forcible' and `--interactive'. Usage: jcores-dbsync-cleanup [--forcible | --interactive] [--java java-command] password-for-user-jcores@hostname-or-ip-address:port:instance [...]

Stop processing.

[--java java-command]

No argument for the option.

Option `--java' requires an argument. Usage: jcores-dbsync-cleanup [--forcible | --interactive] [--java java-command] password-for-user-jcores@hostname-or-ip-address:port:instance [...]

Stop processing.

No argument for the option.

Missing database connection. Usage: jcores-dbsync-cleanup [--forcible | --interactive] [--java java-command] password-for-user-jcores@hostname-or-ip-address:port:instance [...]

Stop processing.

Wrong formatted argument was specified. (Well format is "string@string:number:string")

In the case of specifying "wrong@arg": Invalid argument: `wrong@arg' Usage: jcores-dbsync-cleanup [--forcible | --interactive] [--java java-command] password-for-user-jcores@hostname-or-ip-address:port:instance [...]

Stop processing. Before processing, Database Synchonizer checks all arguments. So when specifying wrong arguments, no cleanup processes won't be done.

Failed in connecting to one of specified databases instance.

Failed in connecting to database host:port:instance. (if existent, contents of exception are output.)

Stop processing for the database. And continue to cleanup other databases, if specified.

password-for-user-jcores@hostname-or-ip-address:port:instance [...]

Failed in logging in one of specified databases. This might occur by specifying incorrect password.

Access denied for user jcores by database host:port:instance, e.g. incorrect password.

Stop processing for the database. And continue to cleanup other databases, if specified.

common

Undefined option was specified. The difference between an option and an argument is whether the first letter is -.

In the case of specifying "-a": Illegal option `-a'. Usage: jcores-dbsync-cleanup [--forcible | --interactive] [--java java-command] password-for-user-jcores@hostname-or-ip-address:port:instance [...]

Stop processing.

15

Page 55: Database Synchronizer Administration Manual

Database Synchronizer Administration Manual Appendix D

option and action after cause example of error message argument messaging

Same option was specified more than once.

In the case of specifying "--forcible" more than once: Option conflict: Option `--forcible' is given more than once. jcores-dbsync-cleanup [--forcible | --interactive] [--java java-command] password-for-user-jcores@hostname-or-ip-address:port:instance [...]

Stop processing.

Failed in executing the command, java. This might occur when the specified java command is not exist, or when JRE is not installed.

Unable to exec Cleanup for J-CORES Database Synchronizer. (if existent, returned error messages from the call are output.)

Stop processing.

Failed in executing the Database Synchronizer. This might occur when the jar file is corrupted, or the jar file is not exist.

(if existent, returned error messages from the call are output.) Unable to exec Cleanup for J-CORES Database Synchronizer.

Stop processing.

16

Page 56: Database Synchronizer Administration Manual

Database Synchronizer Administration Manual Appendix D

6. Runtime errors on the cleanup command

These are runtime errors on the cleanup command. Some errors occur for environmental reason or Oracle errors.

Table 6-1 Runtime errors on the cleanup command

cause example of error message (*1) action after messagingAn unexpected error occurs for some reasons, e.g. database session was closed externally, an error caused Oracle has occurred, etc.

Unexpected error has occurred while cleanup for database host:port:instance. (if existent, contents of exception are output.)

Stop processing for the database. And continue to cleanup other databases, if specified.

Failed in unlocking users on a database, since listing user failed. Users on the database may remain being locked.

Could not list users of database host:port:instance. Can not unlock the users. (if existent, contents of exception are output.)

Continue processing.

Failed in unlocking a locked user on a database. Users on the database may remain being locked.

Failed in unlocking user oracle_userid of database host:port:instance. (if existent, contents of exception are output.)

Continue processing.

Failed in terminating sessions on a database. Cleanup command terminates all jcores sessions excluding the session for cleanup.

Failed in terminating session sid on database host:port:instance. (if existent, contents of exception are output.)

Continue processing.

Failed in disconnecting from the database. When this error occurs, the database session of jcores to process the cleanup may remain.

Failed in disconnecting from database host:port:instance. jcores session to the database may be remained. (if existent, contents of exception are output.)

Stop processing for the database. And continue to cleanup other databases, if specified.

Other errors, e.g. an error caused JRE has occurred, etc.

Unexpected error (if existent, contents of exception are output.)

Stop processing.

*1: In the example of error messages, variables are underlined.

sid; Oracle session id oracle_userid; Oracle user id, with suffix like "#z2" host:port:instance; information of current processing database

17

Page 57: Database Synchronizer Administration Manual

Database Synchronizer Administration Manual Appendix D

18

7. Parameter errors on a password generator

These are parameter errors on a password generator bundled in J-CORES version 1.3. When an error occurs, the password generator stops processing.

Table 7-1 Parameter errors on a password generator

option and argument cause example of error message

No argument specified, or the first option is not “--suffix”.

Missing option `--suffix'. Usage: jcores-dbsync-pgen.sh --suffix passwd-suffix userid

--suffix No argument for “--suffix.” (Executed as “jcores-dbsync-pgen.sh --suffix”)

Option `--suffix' requires an argument. Usage: jcores-dbsync-pgen.sh --suffix passwd-suffix userid

userid

The third argument is not specified. (Executed as “jcores-dbsync-pgen.sh --suffix #z2”)

Missing userid. Usage: jcores-dbsync-pgen.sh --suffix passwd-suffix userid

common The fourth argument or more arguments were specified.

In the case of execution by “jcores-dbsync-pgen.sh --suffix #z2 foo bar fooo”: Invalid arguments: bar fooo Usage: jcores-dbsync-pgen.sh --suffix passwd-suffix userid