This command creates a text file containing a list of all the databases in the catalogue.
createdatabaselist <prefix> <server_id> <filename> {true|false}
|
Create a list of databases and save it to a text file.
<prefix>
|
A string that will be prefixed to the database path if it is a relative path.
When you add a database to the catalogue, you can choose either to specify an absolute path to the SXV4 file (e.g. D:\databases\mydb.sxv4) or a path relative to the location of the SuperSERVER program data directory (e.g. databases\mydb.sxv4). You can use the prefix to convert those relative paths to absolute paths.
For example, if you have installed SuperSERVER to the default location and you have some databases installed using relative paths, you might set the prefix to "C:\ProgramData\STR\SuperSERVER SA\".
The prefix will not be added to any database paths that are already absolute paths (if you have a mixture of databases installed with relative and absolute paths then the prefix will only be added to the relative ones).
This parameter is required, but if you do not want to use a prefix, simply specify "" in place of this parameter.
|
---|
<server_id>
| The ID of the server to list the databases for. You can find out the server IDs by using the server command. |
---|
<filename>
|
The filename to save the text file as. This can either be an absolute path or a relative path.
If you specify a relative path the file will be saved to a location relative to the SuperADMIN console export directory (C:\ProgramData\STR\SuperADMIN\console\export by default)
|
---|
true|false
|
This is optional; it controls whether to overwrite the existing file:
- If you specify
true , SuperADMIN will overwrite any existing file with the same name as the output file. - If you specify
false or omit the parameter, and there is an existing file with the same name, SuperADMIN will append the output to the existing file.
|
---|
|
For example:
CODE
> createdatabaselist "C:\ProgramData\STR\SuperSERVER SA\" "superserver" D:\DBs\DatabaseList.txt
bank|Retail Banking|C:\ProgramData\STR\SuperSERVER SA\databases/RetailBanking
people|people|C:\ProgramData\STR\SuperSERVER SA\databases/People
Total databases listed:2
>
If you have a multi-host deployment with multiple SuperSERVERs, then you can use this command to create a list of all the databases across all hosts. Simply run the command multiple times, specifying each host one at a time. When you run the command again, SuperADMIN will append the output to the file created by the previous command.
For example:
CODE
> createdatabaselist "" "superserverhost1" D:\DBs\DatabaseList.txt true
> createdatabaselist "" "superserverhost2" D:\DBs\DatabaseList.txt false
> createdatabaselist "" "superserverhost3" D:\DBs\DatabaseList.txt false