Click here to jump to Nash!Com Solutions Homepage - Click here to request a test version.


Database Administration


Nash!Com Solutions

Version: 1.4c
Shortname: nshdbadm
Category: Command-Line Tool


Short Description

Nash!Com Database Administration is primary intended to troubleshoot database problems.
It can be used to delete Replication History and/or CutOff Date and for setting some selected database properties.
This program can be used on clients or servers (server console).

If there are additional database properties that are not currently supported and might be of interest please let us know.

Key Features

- Delete Replication History and/or Cutoff Date
- Troubleshoot replication settings and replication
- Set Replication Priority
- Set new template name
- Set/List Database Quota and Warning Threshold
- Delete Agent data

Screen Print



* |  NshDbAdm 1.4c - Notes Database Administration
|\|  (c)1999-2001 NashCom - Daniel Nashed Communication Systems
| *  mailto:info@nashcom.de - http://www.nashcom.de

Syntax:  nshdbadm <database> [action flags] [-f<filename>]

Database Selection Options:

 -s<servername> : server name
 -r             : process directories recursively

Output Options:

 -o<outfile>    : output file
 -m<mailuser>   : send report to
 -k[0,1]        : override client/sever: k1=client, k0=server

Actions:

 -l             : list cutoff date
 -c             : delete cutoff date
 -h             : clear replication history
 -p             : show replication priority
 -p<n>          : set replication priority to l=low, m=medium, h=high
 -e[0|1]        : enable = 1, disable = 0 replication
 -t<name>       : set new template name
 -w[+-%]size    : modify database waring threshold
 -q[+-%]size    : modify database qouta
                  +=increment, -=decrement, %=set % of current size
                  no option (-q -w means display setting
                  non operator sets absolute number in KB
                  you may append MB to specify size in MB

 -i             : check replication settings for all entries
 -x             : check replication settings for server & default entry
 -iY            : fix replication settings for all entries
 -xY            : fix replication settings for server & default entry
 -n<servername> : check remote server for replicas
 -a             : count agent data
 -aD            : delete agent data

Description:


-- Action to perform --

The following actions are currently supported

( -l ) List Cutoff Date

List all specified databases having a cutoff date.

Example: nshdbadm *.nsf -l

( -c ) Delete Cutoff Date

Delete cutoff date from all specified databases

Example: nshdbadm mail/*.nsf -c

( -h ) Clear Replication History

Clear Replication History for all specified databases

Example: nshdbadm mail/dus/*.nsf -h


( -p ) Show/Set Replication Priority

Please note that all option parameters need to be set without a blank!

Show Replication Priority for selected databases

Example:

nshdbadm *.nsf -p --> shows replication priority

Set Replication Priority for selected databases

Example:

nshdbadm *.nsf -pl --> sets replication priorty to low
nshdbadm *.nsf -pm --> sets replication priorty to medium
nshdbadm *.nsf -ph --> sets replication priorty to high

( -e ) Enable/Disable Replication


Enables/Disables Replication Priority for selected databases

Examples:

nshdbadm help/*.nsf -e1 --> enables replication for selected databases

nshdbadm *.ntf -e0 --> temporary disables replication for selected databases.

( -t ) Set new Template Name

This option sets a new Template Name for selected databases.

Please note that blank is the delimiter for the parameter list.
In case you need to use blanks in template names use quotes like -t"template with blank in name"

Example:

nshdbadm mydb.nsf -tAcmeTest

sets template name "AcmeTest" in database mydb.nsf

( -w ) Modify Database Warning Threshold

This option enables you to modify the Warning Threashold of a database.
You can set an absolute value or modify the actual size by using +, - and %.
The default dimension is KB. To specify size in MB add MB without blank to the number you specify.

-w[+-%][MB]

Examples:

nshdbadm *.nsf -w+10mb --> increments the size by 10 MB
nshdbadm *.nsf -w30000 --> sets the size to 30000 KB
nshdbadm *.nsf -w%222 --> sets limit to 222% of the current settings.

( -q ) Modify Database Quota

This option enables you to modify the database Quota.
You can set an absolute value or modify the actual size by using +, - and %.
The default dimension is KB. To specify size in MB add MB without blank to the number you specify.

-q[+-%][MB]

Examples:

nshdbadm *.nsf -q+10mb --> increments the size by 10 MB
nshdbadm *.nsf -q30000 --> sets the size to 30000 KB
nshdbadm *.nsf -q%200 --> doubles the current size.

( -i ) Check/Fix Replication Settings for all Entries
( -x ) Check/Fix Replication Settings for Server & Default Entry

These features can be used to check and fix replication class settings for all entries or just for the entries effecting replication on that specify server or client.
In some cases replication settings for servers and clients are not setup in the right way specially after installation.

Each User can have it's own replication settings (advanced settings). But if he has no own settings default settings are used.
These settings determine the Note Classes (design, data, replication formulas, ... ) replicated from destination servers.

-i checks replication settings for all entries.
-x checks only replication settings for default or the server/user setting if present.

if you want to fix the replication settings for selected database you need to append "Y" to the option.

Example: nshdbadm whatever.nsf -iY fixes replication settings for all entries.

Caution! You should list all databases that might have different settings and analyze the output first before you fix replication settings.
You may have some databases that should not replicate all Notes design classes. Those settings might get overwritten by this fixup routine.
In case you want to skip specific databases create a ASCII file with all databases first and remove files you do not want to change from the list.
Than use the "-f" option specifying this text file to run replication fixup just on those databases.

( -n ) Check Remote Server for Replicas

This feature is intended to check replication between databases on different servers and does an full database scan and compare analyzing sequence timedate and sequence number.

It locates replicas of selected databases on remote servers to check if both replicas are still in sync.
You will receive a detailed list. Currently this features is just for troubleshooting and does not support detailed analysis.
However if you need more detailed analysis on Note Level you could use the debugging option -d to display the comparison in background.

This is just a basis function for checking replicas in order to get an overview. This is not a full detailed analysis tool yet.

( -a ) List and delete Agent data

Some databases contain a large number of Agent data. These documents store agent runtime information on a per user level.
You can list the number of agent data notes in a database using the -a command or to delete all Agent Data from selected databases by -aD.

Examples:

nshdbadm *.nsf -a --> shows agent data for selected databases
nshdbadm *.nsf -aD --> deletes agent data for selected databases


What happens if no flags are used?

If you do not use one of the action flags, the databases are only listed.
You could use this feature to check if your selection is OK or to create a file that you can modify and use via -f option

-- Ways to select databases --

1. specify a database name in the command line
2. specify a list of databases listed in a file via option -f
3. use wildcards (* and ?) for specifying databases and templates including subdirectories if using the ( -r ) option
4. specify a remote server name ( -s ) where to search for databases

you can combine any listed ways

Some examples:

1. specify a database name in the command line

Example:

nshdbadm whatever.nsf

runs on whatever.nsf

2. specify a list of databases in a file via option -f

Example:

nshdbadm whatever.nsf -fdb.txt

runs on whatever.nsf and all databases listed in db.txt
db.txt should contain databases including full path like

names.nsf
mail/jdoe.nsf
info/acme.nsf

3. use wildcards for specifying databases and templates including subdirectories if using the ( -r ) option

Example:

nshdbadm mail/*test*.nsf

runs on all databases that meet the selection within the mail subdirectory
e.g. mail/dus-test.nsf but not mail/dus/old/test.nsf

If you want to include subdiretories use the -r switch.
As soon you have multiple wildcards in different directories you need to use the recurse subdirectory switch

Example:

nshdbadm mail/test?/*.nsf -r

this does match e.g. mail/test1/dnashed.nsf

but also matches mail/test2/hilden/nashcom.nsf because this does also match the pattern.

4. specify a remote server name ( -s ) where to search for databases

-s Option defines the server where databases are searched

Example:

nshdbadm -snotes_acme_01 mail/*.nsf

runs on databases (.nsf files) in directory mail on notes_acme_01

nshdbadm mail/test??xxx*.nsf

runs on databases (.nsf files) that match the pattern "/mail/test??xxx*.nsf"

-- Output options --

In case you want to redirect output you have the following options

( -o ) Redirect output to file

Writes output to a the file specified.

Example: nshdbadm mydb.nsf -ooutfile.txt
writes output to outfile.txt

Comment: this option might help to create a list of databases that can be modified and uses as input for "-f" option.

( -m ) Send output via mail

Sends output to the specified user.

Example: nshdbadm mydb.nsf -m"John Doe"
sends output to John Doe

( -k ) Overwriting Client/Server Settings

Nash!Com Command Line Tools run on Servers or Clients.
However in some cases and environments it can not determine if running on server or as client program using server environment.
Therefore you can override the default settings using this option.
Server and Client functionality does only differ in the way output is logged.



Show details for Installation InstructionsInstallation Instructions
Hide details for Installation InstructionsInstallation Instructions
  1. copy into Notes exe directory
  2. run from command line or server console
    and make sure notes.ini can be found in the directory or is in the path