GetIsMaster

설명

이 데이터베이스가 마스터 데이터베이스인지 여부를 표시하는 부울을 리턴합니다.

스키마 저장소는 하나 이상의 사용자 데이터베이스에 대한 마스터 데이터베이스입니다. 스키마 저장소를 조작할 경우 AdminSession 오브젝트의 메소드를 사용해야 합니다.

구문

VBScript

dbDesc.GetIsMaster 

Perl

$dbDesc->GetIsMaster(); 
ID
설명
dbDesc
설치된 데이터베이스 중 하나에 대한 정보를 포함하는 DatabaseDesc 오브젝트입니다.
Return value
해당 데이터베이스가 스키마 저장소이면 True, 그렇지 않으면 False입니다.

예제

VBScript

다음 예제에 Visual Basic 애플리케이션으로부터 데이터베이스에 로그온하는 방법이 나와 있습니다.

set sessionObj = CreateObject("CLEARQUEST.SESSION") 
' Login to each database successively. 
databases = sessionObj.GetAccessibleDatabases("MASTR","","") 
For Each db in databases 
   If db.GetIsMaster Then 
      ' Create an AdminSession object and logon to the schema 
      ' repository.
      ' ... 
   ElseIf 
      'Logon to the database using the regular Session object. 
      ' ... 
   End If 
Next

Perl

use CQPerlExt;
#Start a Rational ClearQuest 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);

피드백