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)
%SYS>set db="/opt/irisapp/data"
%SYS>w ##class(SYS.Database).%OpenId(db).Mounted
1
%SYS>w ##class(SYS.Database).%OpenId(db).Dismount()
1
%SYS>w ##class(SYS.Database).%OpenId(db).Mounted
0
%SYS>w ##class(SYS.Database).%OpenId(db).


