lsreplica
Applicability
Product | Command type |
---|---|
MultiSite | multiutil subcommand |
Platform |
---|
UNIX |
Windows |
Synopsis
- List database replicas:
- lsrep/lica
[ –cl/an clan-name ] [ –site site-name ] –fam/ily family-name
–u/ser username [–p/assword] password [–l/ong | –s/hort |
–fmu_ format ]
[–sib/lings | [ –sib/lings]
–infa/mily family-name | replica ... ]
- List the working schema repository for a family:
- lsrep/lica
[ –cl/an clan-name ] [ –site site-name ] –fam/ily family-name
–u/ser username [–p/assword] password –working/master
Description
This command lists information about all active replicas known to the current replica. You can list all replicas in a clan or in a family within a clan. Other replicas may exist, but the packets that contain their creation information have not yet been imported at the current replica.
Restrictions
You must have Super User privileges.
Options and arguments
Specifying the clan, site, and family
- Default
- Clan: First clan replicated at this site. If there is more than one dbset
connection registered on this host, –clan is required.
Site: Current site. If there is more than one site on this host, –site is required.
Family: No default; you must specify a family.
- –cl/an clan-name
- Name of the replica’s clan.
- –site site-name
- Name of the replica’s site.
- –fam/ily family-name
- User database family: Database name given to the user database when it was created.
Schema repository family: The family name is MASTR.
You can use the –siblings option or the –siblings –infamily options to list the replicas in a specific family within the clan, as known to your schema repository.
Specifying a user name and password
- Default
- You must specify a user name and password.
- –u/ser user
- Name of a user with Super User privileges.
- –p/assword password
- Password associated with the specified user.
Listing format
- Default
- Includes creation event information for each replica.
- –l/ong
- Lists each replica's creation information and synchronization server. If the current replica is in the process of restoration, this option annotates the listings of other replicas from which restoration updates are required.
- –s/hort
- Lists only replica names.
- –fmu_ format-string
- Lists information using the specified format string, which uses
conversion specifications that identify items to display and specify
their display format. The conversion specification format resembles
that of the C-language function printf() a percent sign (%)
and a key letter (lowercase), which indicates the kind of data to
display.
Unlike printf() specifiers, conversion specifications are not replaced by arguments supplied elsewhere on the command line; they are replaced automatically by multiutil with field values extracted from the replica.
format-string is a character string composed of alphanumeric characters, conversion specifications, and escape sequences. It must be enclosed in double quotes ( " ).
Conversion specifications:
- %h
- Host name
- %n
- Name of replica
- %c
- Clan name
- %f
- Family name
- %d
- Description of replica, if any
- %s
- Status of replica
- %%
- % character
- %z
- ID block size
- %t
- ID block threshold
Escape sequences:
- \n
- <NL>
- \t
- <TAB>
- \'
- Single quote
- \\
- Literal (uninterpreted) backslash
- \nnn
- Character specified by octal code
Specifying the replica
- Default
- Lists all known replicas in the current replica's family, including the current replica.
- –working/master
- Lists the working schema repository for the clan you specified.
- –sib/lings
- For a user database, lists the family members of the current replica, but does not list the current replica itself. For a schema repository, lists the family members of all replicas in the site, but not the replicas in the current site. This option is useful when you are writing scripts that process only sibling replicas.
- –infa/mily family
- Lists the replicas in the family of the specified replica. Use the site name to specify the replica. This option can be used only if you specified MASTR with the –family option.
- replica ...
- The –site option specifies the replica that you are querying for information; this argument specifies the site of the replica for which you want to list information. You can only list replicas that are members of the same family.
Examples
In these examples, the lines are broken for readability. You must enter each command on a single physical line. Ignore the NOT CONNECTED status in the listing; this value is for internal use by IBM®.
- List the replicas in the DEV family of the telecomm clan.
multiutil lsreplica -clan telecomm -site boston_hub -family DEV
-user susan -p passwd -long
Name: BOSTON_HUB; Clan: TELECOMM; Family: DEV; Host: minuteman;
Status: NORMAL, NOT CONNECTED;
Description: ; Block Size: 4096; Block Threshold: 1024
Name: SANFRAN_HUB; Clan: TELECOMM; Family: DEV; Host: goldengate;
Status: NORMAL, NOT CONNECTED;
Description: ; Block Size: 4096; Block Threshold: 1024
Name: BANGALORE; Clan: TELECOMM; Family: DEV; Host: ramohalli;
Status: NORMAL, NOT CONNECTED;
Description: ; Block Size: 4096; Block Threshold: 1024 - List the siblings in the DEV family in the telecomm clan, but not
the user database replica at the boston_hub site.
multiutil lsreplica -clan telecomm -site boston_hub -family DEV
-user susan -p passwd -long –siblings
Name: SANFRAN_HUB; Clan: TELECOMM; Family: DEV; Host: goldengate;
Status: NORMAL, NOT CONNECTED;
Description: ; Block Size: 4096; Block Threshold: 1024
Name: BANGALORE; Clan: TELECOMM; Family: DEV; Host: ramohalli;
Status: NORMAL, NOT CONNECTED;
Description: ; Block Size: 4096; Block Threshold: 1024 - List the clan members in the telecomm clan,
but not the replicas at the boston_hub site.
multiutil lsreplica -clan telecomm -site boston_hub -family MASTR
-user susan -p passwd -long -siblings
Name: SANFRAN_HUB; Clan: TELECOMM; Family: MASTR; Host: goldengate;
Status: NORMAL, NOT CONNECTED;
Description: ;Block Size: 4096; Block Threshold: 1024
Name: SANFRAN_HUB; Clan: TELECOMM; Family: DEV; Host: goldengate;
Status: NORMAL, NOT CONNECTED;
Description: ;Block Size: 4096; Block Threshold: 1024
Name: BANGALORE; Clan: TELECOMM; Family: MASTR; Host: ramohalli;
Status: NORMAL, NOT CONNECTED;
Description:; Block Size: 4096; Block Threshold: 1024
Name: BANGALORE; Clan: TELECOMM; Family: DOC; Host: ramohalli;
Status: NORMAL, NOT CONNECTED;
Description: ;Block Size: 4096; Block Threshold: 1024 - List all user databases in the TEST family
of the clan testclan, as known to the working schema repository.
multiutil lsreplica -clan testclan -site sydney -family MASTR
-user bfife -p passwd -long -infamily TEST
Name: TOKYO; Clan: TESTING; Family: TEST; Host: shinjuku;
Status: NORMAL, NOT CONNECTED; Description:
; Block Size: 4096; Block Threshold: 1024
Name: SYDNEY; Clan: TESTING; Family: TEST; Host: taronga;
Status: NORMAL, NOT CONNECTED; Description:
; Block Size: 4096; Block Threshold: 1024 - List the working schema repository for the DEV family
in the testclan clan.
multiutil lsreplica -clan testclan -site sydney -family DEV
-user bfife -workingmaster - Mimic the output from lsreplica
–long.
multiutil lsreplica -clan testing -site tokyo -family TEST
-user masako -password passwd -fmu_ "Name:%n; Clan:%c; Family:%f; Host:%h;
Status:%s;"
Name:TOKYO; Clan:TESTING; Family:TEST; Host:shinjuku; Status:
NORMAL, NOT CONNECTED; Name:SYDNEY; Clan:TESTING; Family:TEST;
Host:taronga; Status:NORMAL, NOT CONNECTED;