Configuring default behaviour in the command line

When executed, the dbw command searches the file [user]/.dbwatch/dbw.conf for default values
within its parameters. By setting default values in this file it is possible to greatly increase the
usability of the dbw command.

dbw.conf format

The format of dbw.conf is based on the java property file format.
It consists of multiple lines in the form of

<<key>>=<<value>>

where each line translates into the

-<<key>> <<value>> 

parameter on the commandline.

The authentication used to authenticate to the dbwatch server can either be defined by setting the -url, -login and -password parameters or you can use a named subconfiguration.
This is done by setting the -server <<config name>> and defining -<<config name>>.url, -<<config name>>.login and -<<config name>>.password. When using this technique it is
possible to define a set of server authentications in the configfile hence keeping this information out of your script files.

Example: switch between multiple named dbWatch servers

dbw.conf:

#Connection information for server1
 server1.url=rmi://localhost:7090
 server1.login=admin
 server1.password=mypass

 #Connection information for server2
 server2.url=rmi://localhost:7091
 server2.login=admin
 server2.password=mypass

Enables the following:

dbw get -server server1 -instanceconfig

Example: Define default format

dbw.conf:

#Set default format to myxmlformat
format=myxmlformat

← Formatting output / Discovering Database Instances →

Feedback

Was this helpful?

Yes No
You indicated this topic was not helpful to you ...
Could you please leave a comment telling us why? Thank you!
Thanks for your feedback.

Post your comment on this topic.

Post Comment