NetAdmin is a tool that makes life easier to people that have to set up and maintain several database tables at once. NetAdmin does it by letting remote users start, stop, create, delete audit and modify properties for all of the db tables on a given machine (the one where NetAdmin itself is running).
NetAdmin uses a text-based, output-only UI on the server (and even that is completely optional), therefore it can be used also on computers that don´t have a GUI running (such as most Unix machines). Since you can´t interact directly with NetAdmin on the console, you need to access NetAdmin with its own GUI, RemoteAdmin -- more on the subject later.
Usage of NetAdmin is as follows:
java nrio.NetAdmin [-f:opt_file] [opts]
Options can be either read from a file using the followin parameter: -f:options_file or they can be specified on the command line: -n:name Name/description of this NetAdmin instance.['_' are substituted with spaces in <name>,spaces are not allowed]. -d:file uses db list file <file>. A db list file is a file that contains information about the database tables to be managed by NetAdmin. A default dblist.ini file is created when you shutdown NetAdmin (therefore you shouldn´t need this option). -l:file logs all activities to file <file>. -p:port specifies a port for listening. -q operates in quiet mode (no output on stdout). -a:password grant Admin Access to requests made with <password>. -e:name@domain sends concise daily reports (and "starting/stopping activity" messages) to name@domain. -s:host.domain uses host.domain SMTP server to send e-mail-based daily reports.
Most of the times you won´t need to set up options directly from the command line (nor it is desirable: other people could get a list of running processes and find out which passwords you are using), since you can do that anyway by using the client counterpart of NetAdmin, RemoteAdmin. Let´s get into it.
First off you should know that you can launch the RemoteAdmin application either from the command line (by issueing `java nrio.RemoteAdmin´) or from MaxBase (`Tools´ menu, then choose `Remote Admin´). The application looks like this at startup:
Notice that there are two tabs: the first is the one where the NetAdmin properties are presented, while in the second you will find information about the database tables that the NetAdmin computer you´ve logged to is controlling.
In order to start working with RemoteAdmin you need to have a running copy of NetAdmin somewhere on the network; please enter both the name of the host where NetAdmin is running on (RemoteAdmin presents localhost as a default) and the Tcp/Ip port (6700 is the default and is presented as such), then press the `Connect´ button.
If you´ve done all this correctly, the blue label on the bottom of the window will turn into yellow at first (with a `please wait´ message shown on it) and then back to blue. In case of errors, the label will turn red and will sport the error message in it.
After having retrieved NetAdmin properties, they will be shown on screen by RemoteAdmin; you can change them (and commit changes by pressing the `Store config´ button), refresh information or stop the metaserver (warning: it will exit to the operating system! This is useful when doing maintenance on the server). Note: the `Store config´ button also saves information for the database tables that are being served (basically it stores the configuration of NetAdmin as a whole, not just the properties on the first page).
A note about E-mail and SMTP fields: when you fill up these text fields, NetAdmin will send you daily activity reports (small e-mail messages summarizing which database tables are up and running) and it will notify you also about important events, such as NetAdmin being stopped or started. Of course, E-mail refers to your E-mail address, while SMTP is a valid SMTP host that the remote NetAdmin can use to send e-mails.
The database properties page contains information about all of the database tables that are being controlled by NetAdmin, and looks like this:
As soon as you have connected to a NetAdmin server, the `database´ choice widget will be filled up with many items; available slots (a slot is occupied by a database server) are presented with an array of asterisks, `* * * * *´, while a slot that´s been occupied is presented with the database file name without the .dat extension. When you select a slot with the choice widget, information about that slot is retrieved and presented to you in the text fields of the page.
Again, please note how all of the information presented in this page closely resembles the parameters for RXDBServer: in fact the purpose of NetAdmin and RemoteAdmin is to let you control and change on the fly properties for RXDBServer database tables.
How to change information for database tables hosted in NetAdmin slots
As a rule of thumb, in order to modify parameters for the db tables you need to type in the changes in the text fields/check boxes and press the `Store´ button. Soon thereafter network activity will occur and you will be notified by the bottom status line of the outcome of the operation. Be warned that if you change the Tcp/Ip port at which the RXDBServer is listening to, the change will be immediate and therefore all MaxBase/RXDBClient users that are connected will not be able to continue working.
Note: in order to remove a database from its slot (without deleting it from the hard disk, of course) you need to select it, set its file name to empty (no file name) and then press `Store´. If you want to delete the DB table from the remote computer instead (and you don´t have an undo for this operation) simply press the `Delete DB´ button.
Note2: as you may have guessed, you can stop/start db tables serving in either one of two ways: by clicking on the `Stop/Start DB´ buttons or by checking/unchecking the `Active?´ check box and pressing the `Store´ button.
Creating a database from within RemoteAdmin
As you may have seen looking at the documentation for RXDBServer, you cannot physically create database tables with it (but you can modify the database tables structure); if you want to create a new table on the remote server you can use Remote Admin. How? First off select an empty slot (one with asterisks as its name), then type a name for the table (without any directory separator character) in the "db name" text field and a port (optional) in the "port" text field. If you don´t specify a port, a default one (not clashing with other ports) will be assigned to your new db.
A note about the db name: a new directory will be created on the server (as a subdirectory of the one where NetAdmin is in execution) named after the db you have created; inside of it you will have your db created. Therefore, if you specify `mydb´ as the db name, you will then have `mydb\mydb´ as the database name. This was done to reduce clutter on the NetAdmin execution directory. |