to dismount/mount a database, use Dismount() and Mount() methods in SYS.Database class available in %SYS namespace.
NB: the database ID is its Directory
You'll find some examples of how to dismount/mount and check if a database is mounted (Mounted=1) or not (Mounted=0), and quickly see all the attributes of a database (via zwrite)