GetInstalledMasterDbs

Description

(Perl only) For Visual Basic, see GetInstalledMasters.

Returns the list of registered schema repositories (master databases).

The value returned is an array reference. The returned values of GetInstalledDbSets and GetInstalledMasterDbsalways contain the same number of strings. The contents of both are ordered so that each schema repository (master database) listed in GetInstalledMasterDbs belongs to the database set at the same index in GetInstalledDbSets.

Syntaxe

Perl

$session->GetInstalledMasterDbs(); 
Identificateur
Description
session
Objet Session représentant la session en cours d'accès à la base de données.
Valeur de retour
Returns a reference to an array of strings for the master database sets.

Exemples

Perl

# This program runs in the context of a
# external  program (not from within a hook)...

use CQPerlExt;

# Create the session object...
$Session = CQSession::Build()
or die "Couldn't create the ClearQuest 'session' object.\n";

# Get the list of master databases and dbsets installed on this
# machine; note that both functions return references to
# arrays...

my($MasterDBsREF) = $Session->GetInstalledMasterDbs();
my(@MasterDBs) = @$MasterDBsREF;
my($DbSetsREF) = $Session->GetInstalledDbSets();
my(@DbSets) = @$DbSetsREF;
my($N) = $#MasterDBs;

printf ("There are %d DbSet(s) installed on this machine.\n", ($N+1));

for (my($i)=0; $i <= $N; $i++) {
print "DbSet #" . $i . ": " .
" DbSet=" . $DbSets[$i] .
" MasterDB=" . $MasterDBs[$i] .
"\n";
}

CQSession::Unbuild($Session); 

Feedback