GetIsMaster
Description
Returns a Boolean indicating whether this database is a master database.
A schema repository is a master database for one or more user databases. When manipulating the schema repository, you should use the methods of the AdminSession object.
Syntax
Perl
$dbDesc->GetIsMaster();
- Identifier
- Description
- dbDesc
- A DatabaseDesc object containing information about one of the installed databases.
- Return value
- True if this database is a schema repository, otherwise false.
Example
Perl
use CQPerlExt;
#Start a DevOps Plan session
$sessionObj = CQSession::Build();
#Get a list of accessible database description objects
$databases = $sessionObj->GetAccessibleDatabases("MASTR", "", "");
#Get the number of databases
$count = $databases->Count();
#Foreach accessible database that is the master database
for($x=0;$x<$count;$x++){
$db = $databases->Item($x);
if ( $db->GetIsMaster() ) {
#Create an AdminSession and logon to the schema repository
#...
}
else {
#Logon to the database using the regular Session object
#...
}
}
CQSession::Unbuild($sessionObj);