CORBA 2.6.1 Programmer's Guide for Java
Another way is to bind a new context TextCtx1 "" into the TestCtx test context by using the -ior option to specify the TestCtx test
naming context as the base naming context for this operation. To do this action, you need the stringified IOR of the TestCtx test
context, which is returned by ns_browse when that context is created.
ns_browse -ior IOR:004532... bind_new_context TestCtx1 ""
5. Run ns_browse to list the contents of the naming context with name TestCtx test:
ns_browse list TestCtx test
6. Run ns_browse to remove a naming context with name TestCtx1 "" from the naming context with name TestCtx test. Again, assuming
that the TestCtx test context is bound to the root naming context, you can issue the following command:
ns_browse remove_context TestCtx test TestCtx1 ""
7. Run ns_browse to remove a naming context with name TestCtx1 test from the root naming context.
ns_browse remove_context TestCtx test
Using NamingDBCleanupTool
The naming database cleanup tool (NamingDBCleanupTool) allows interactive clean up or batch cleanup of orphaned contexts in the naming-
service database. In interactive mode, the tool presents information about each orphaned context. The user can choose to delete the orphaned
context or leave it.
In batch mode, the user first runs the tool to gather information about orphaned contexts. This information is written to the specified file. This file
can be modified using a text editor, so the file contains only those contexts to be deleted. On a subsequent run of the tool, the modified file is
read and the indicated contexts are deleted. Prior to deleting a context, the tool confirms that the indicated context is valid, and that it is indeed
an orphaned context.
< For either batch mode or interactive mode, the user must specify a "grace" period for contexts. No context younger than the specified number
of days will be deleted. The "grace" period avoids disturbing recent entries that could be actively modified. Alternatively, the user can specify a
date range that limits the contexts that are candidates for deletion.
< For either batch mode or interactive mode, the following identifying information is presented for each naming context that is a candidate for
deletion:
Creation timestamp for the context
Name and kind strings of the context (if available)
Path showing ancestor contexts (if available) [shows only path one when there is more than one possible path]
The number of objects and the number of contexts bound in this context
The tool cannot determine whether an orphaned context is actually in use. The user must accept responsibility for inadvertently deleting an in-
use naming context. This tool does not have an undo option.
Usage:
NamingDBCleanupTool -p <db location> [ -i | -w <file> | -r <file> ] [ -t <number> | -d <date1> [<date2>] ]
Options:
-i
Interactively query the user who indicates which orphaned contexts to delete.
-w <file>
Write information about orphaned contexts to the indicated ASCII file on OSS.
-r <file>
Read information about which context to delete from the indicated ASCII file from OSS.
-t <number>
Indicate number of days old a context must be to be considered for deletion (default 30).
-d <date1> [<date2>]
Specify a date or date range in the format mm/dd/yyyy. When a date is specified, contexts created prior to that date are candidates for
deletion. When two dates are specified contexts created between the two dates are candidates for deletion.
-p
<dblocation>
Specify the naming database on which to operate (identifies an enscribe file in the Guardian file space:
$<Volume>.<subvolume>.<dbfile>).