Monday, May 23, 2016

Simple xDB Replication Server CLI Steps.

Please find below simple xDB Replication Server CLI Steps.


The following on the command line or add it to your profile:


export PATH=/opt/PostgresPlus/9.2AS/jre/bin:$PATH


The following is an example of repsvrfile for a pubrepsvrfile server:


host=localhost

port=9051

user=enterprisedb

# Password is in encrypted form.

password=ygJ9AxoJEX854elcVIJPTw==

The following is an example of repsvrfile for a subrepsvrfile server:


host=localhost

port=9052

user=enterprisedb

# Password is in encrypted form.

password=ygJ9AxoJEX854elcVIJPTw==


These files can be located in any directory as long as they can be

read by the operating system user running the xDB Replication Server

CLI.


In your file, be sure to replace the values of the following fields

with the values for your publication server or subscription server:



-encrypt -input <file> -output <file> Encrypts input file to output file


Example:


/opt/PostgresPlus/9.2AS/jre/bin/java -jar

/opt/PostgresPlus/9.2AS/bin/edb-repcli.jar -encrypt -input

/opt/PostgresPlus/9.2AS/jre/bin/infile -output

/opt/PostgresPlus/9.2AS/bin/pwdfile


Publication:

============

Adds publication database


-addpubdb -repsvrfile <file> -dbtype {oracle | enterprisedb |

postgresql | sqlserver} -dbhost <host> -dbport <port> -dbuser <user>

{-dbpassword <encpassword> | dbpassfile <file>} -database {<database>

| <service>} [-oraconnectiontype {sid | servicename}] [-repgrouptype

{m | s}] [-initialsnapshot] [-nodepriority {1 to 10}]

[-replicatepubschema {true|false}] Adds publication database


Example:

/opt/PostgresPlus/9.2AS/jre/bin/java -jar /opt/PostgresPlus/9.2AS/bin/edb-repcli.jar -addpubdb -repsvrfile

/opt/PostgresPlus/9.2AS/bin/pubrepsvrfile -dbtype enterprisedb -dbhost

localhost -dbport 5444 -dbuser enterprisedb -dbpassword

N7Ryv4TGFInSPnvctbilyg== -database x -repgrouptype S


-printpubdbids -repsvrfile <file>


Example:

/opt/PostgresPlus/9.2AS/jre/bin/java -jar

/opt/PostgresPlus/9.2AS/bin/edb-repcli.jar  -printpubdbids -repsvrfile

/opt/PostgresPlus/9.2AS/bin/pubrepsvrfile


-printpubdbidsdetails -repsvrfile <file>


Example:

/opt/PostgresPlus/9.2AS/jre/bin/java -jar

/opt/PostgresPlus/9.2AS/bin/edb-repcli.jar  -printpubdbidsdetails

-repsvrfile /opt/PostgresPlus/9.2AS/bin/pubrepsvrfile


-removepubdb -repsvrfile <file> -pubdbid <id>


Example:

/opt/PostgresPlus/9.2AS/jre/bin/java -jar

/opt/PostgresPlus/9.2AS/bin/edb-repcli.jar -removepubdb -repsvrfile

/opt/PostgresPlus/9.2AS/bin/pubrepsvrfile -pubdbid 36


-createpub <pubName> -repsvrfile <file> -pubdbid <id> -reptype {T|S}

-tables <schema1>.<table1> [<schema1>.<table2>...] [-views

<schema1>.<view1> [<schema1>.<view2>...]] [-tablesfilterclause

<index1>:<clause> [<index1>:<clause>...]] [-viewsfilterclause

<index1>:<clause> [<index2>:<clause>...]][-conflictresolution

<index1>:<{E|L|N|M}> [<index2>:<{E|L|N|M}>...]]

[-standbyconflictresolution <index1>:<{E|L|N|M}>

[<index2>:<{E|L|N|M}>...]] [-repgrouptype {M|S}]


Example:

/opt/PostgresPlus/9.2AS/jre/bin/java -jar

/opt/PostgresPlus/9.2AS/bin/edb-repcli.jar -createpub pub93

-repsvrfile /opt/PostgresPlus/9.2AS/bin/pubrepsvrfile -pubdbid 36

-reptype T -tables public.x -repgrouptype S


-validatepubs -repsvrfile <file> -pubdbid <id> -repgrouptype {m|s}


Example:

/opt/PostgresPlus/9.2AS/jre/bin/java -jar

/opt/PostgresPlus/9.2AS/bin/edb-repcli.jar -validatepubs -repsvrfile

/opt/PostgresPlus/9.2AS/bin/pubrepsvrfile -pubdbid 36 -repgrouptype s


Subscription:

=============


Adds subscription database


-addsubdb -repsvrfile <file> -dbtype {oracle | enterprisedb |

postgresql | sqlserver} -dbhost <host> -dbport <port> -dbuser <user>

{-dbpassword <encpassword> | -dbpassfile <file>} -database {<database>

| <service>}  [-oraconnectiontype {sid | servicename}]


Example:

/opt/PostgresPlus/9.2AS/jre/bin/java -jar

/opt/PostgresPlus/9.2AS/bin/edb-repcli.jar -addsubdb -repsvrfile

/opt/PostgresPlus/9.2AS/bin/subrepsvrfile -dbtype enterprisedb -dbhost

localhost -dbport 5445 -dbuser enterprisedb -dbpassword

N7Ryv4TGFInSPnvctbilyg== -database y


-printsubdbids -repsvrfile <file>


Example:

/opt/PostgresPlus/9.2AS/jre/bin/java -jar

/opt/PostgresPlus/9.2AS/bin/edb-repcli.jar -printsubdbids -repsvrfile

/opt/PostgresPlus/9.2AS/bin/subrepsvrfile


-printsubdbidsdetails -repsvrfile <file>


Example: Prints subscriptions list

/opt/PostgresPlus/9.2AS/jre/bin/java -jar

/opt/PostgresPlus/9.2AS/bin/edb-repcli.jar -printsubdbidsdetails

-repsvrfile /opt/PostgresPlus/9.2AS/bin/subrepsvrfile


-printsublist -repsvrfile <file> -subdbid <id>


Example:

/opt/PostgresPlus/9.2AS/jre/bin/java -jar

/opt/PostgresPlus/9.2AS/bin/edb-repcli.jar -printsublist -repsvrfile

/opt/PostgresPlus/9.2AS/bin/subrepsvrfile -subdbid 51


-createsub <subname> -subdbid <id> -subsvrfile <file> -pubsvrfile

<file> -pubname <pubName>


Example:

/opt/PostgresPlus/9.2AS/jre/bin/java -jar

/opt/PostgresPlus/9.2AS/bin/edb-repcli.jar -createsub sub93 -subdbid

151 -subsvrfile /opt/PostgresPlus/9.2AS/bin/subrepsvrfile -pubsvrfile

/opt/PostgresPlus/9.2AS/bin/pubrepsvrfile -pubname pub93


-dosnapshot <subname> -repsvrfile <file>


Example:

/opt/PostgresPlus/9.2AS/jre/bin/java -jar

/opt/PostgresPlus/9.2AS/bin/edb-repcli.jar -dosnapshot sub93

-repsvrfile /opt/PostgresPlus/9.2AS/bin/subrepsvrfile


-dosynchronize {<subname> | <pubname>} -repsvrfile {<subsvrfile> |

<pubsvrfile>} [-repgrouptype {s|m}]


Example:

/opt/PostgresPlus/9.2AS/jre/bin/java -jar

/opt/PostgresPlus/9.2AS/bin/edb-repcli.jar -dosynchronize sub93

-repsvrfile /opt/PostgresPlus/9.2AS/bin/subrepsvrfile -repgrouptype s


-removesub <subname> -repsvrfile <file>


Example:

/opt/PostgresPlus/9.2AS/jre/bin/java -jar

/opt/PostgresPlus/9.2AS/bin/edb-repcli.jar -removesub sub93

/opt/PostgresPlus/9.2AS/bin/subrepsvrfile

No comments:

Post a Comment