RenameDatabase @Command (Formula Language)
For a particular database on the user's workspace, RenameDatabase locates a replica of that database (based on its replica ID) on the specified server, and replaces the database icon with that of the replica. The only change the user sees is that the server name has changed on the database icon.
Syntax
@Command( [RenameDatabase] ; server : database ; newServer )
Parameters
server
Text. The name of the server where the database is.
database
Text. The path and file name of the database. Specify the database's name and location using the appropriate format for the operating system.
newServer
Text. The name of the server where a replica of the database is.
Usage
You can only use this for replicas of a database, not copies. You cannot use this command to change the name of a server.
If the workspace has stacked replica icons for the database on both server and newServer, RenameDatabase brings the icon for newServer to the front.
This command does not work on the Web.
Examples
- This formula replaces the database icon pointing to the STATUSRP.NSF
database on the CENTRAL server to that on the WEST server. To the
user, the only change is that the database icon now displays WEST
as the server name.
@Command([RenameDatabase]; "CENTRAL" : "Statusrp.NSF"; "WEST")
- This formula brings the database icon pointing to the WEST server
to the front, if the workspace already has stacked icons for STATUSRP.NSF
on both CENTRAL and WEST. The icon pointing to the CENTRAL server
is stacked underneath.
@Command([RenameDatabase]; "CENTRAL" : "Statusrp.NSF"; "WEST")