다음을 통해 공유


Get-MasterDataServicesDatabase(PowerShell)

Master Data Services 데이터베이스에 대한 정보를 가져옵니다.

구문

Get-MasterDataServicesDatabase [-Server] <Microsoft.MasterDataServices.Configuration.DatabaseServerInformation> [-DatabaseName] <String>

설명

Get-MasterDataServicesDatabase는 지정한 SQL Server 인스턴스의 Master Data Services 데이터베이스에 대한 정보를 포함하는 데이터베이스 정보 개체를 반환합니다. 또한 연결 문자열의 자격 증명이 지정한 데이터베이스에서 읽을 수 있는 사용 권한을 가지고 있는지 확인합니다.

매개 변수

-Server

Server 매개 변수는 Get-MasterDataServicesDatabaseServerInformation의 데이터베이스 서버 정보 개체입니다. 이 개체는 Master Data Services 데이터베이스를 호스팅하는 SQL Server 인스턴스에 연결하는 데 사용됩니다.

필수 여부

true

위치

0

기본값

없음

파이프라인 입력 허용

true(ByValue)

와일드카드 문자 허용

false

-DatabaseName

DatabaseName 매개 변수는 정보를 가져올 Master Data Services 데이터베이스의 이름을 지정하는 문자열입니다.

필수 여부

true

위치

1

기본값

없음

파이프라인 입력 허용

false

와일드카드 문자 허용

false

입력 및 출력

입력 유형은 cmdlet에 파이프할 수 있는 개체 유형입니다. 반환 유형은 cmdlet에서 반환하는 개체 유형입니다.

입력

Microsoft.MasterDataServices.Configuration.DatabaseServerInformation, System.String

입력은 Get-MasterDataServicesDatabaseServerInformation의 데이터베이스 서버 정보 개체이며 정보를 가져올 Master Data Services 데이터베이스를 지정하는 문자열입니다.

출력

Microsoft.MasterDataServices.Configuration.DatabaseInformation

Get-MasterDataServicesDatabase는 지정한 Master Data Services 데이터베이스에 대한 정보를 포함하는 데이터베이스 정보 개체를 반환합니다.

출력

다음은 이 cmdlet을 사용할 때 반환되는 출력의 예입니다.

Name             : MyDatabase
HasAccess        : True
Collation        : SQL_Latin1_General_CP1_CI_AS
ServiceAccount   :
MdsAdministrator :
Server           : Microsoft.MasterDataServices.Configuration.DatabaseServerInformation
IsDatabaseOwner  : True

변수 및 명명된 매개 변수 사용

이 예에서는 Get-MasterDataServicesDatabaseServerInformation cmdlet을 사용하여 Get-MasterDataServicesDatabase cmdlet의 Server 매개 변수에 사용할 변수 $server를 설정합니다. 매개 변수는 명명된 매개 변수입니다.

C:\PS>$server = Get-MasterDataServicesDatabaseServerInformation 
    -ConnectionString 'Data Source=MyServer\MyInstance;Initial catalog=;Integrated Security=True;User ID=;Password='; 
    Get-MasterDataServicesDatabase -Server $server -DatabaseName 'MyDatabase'

출력 파이핑 및 명명된 매개 변수 사용

이 예에서는 Get-MasterDataServicesDatabase의 Server 매개 변수에 대해 Get-MasterDataServicesDatabaseServerInformation에서 Get-MasterDataServicesDatabase로 출력을 파이프합니다. DatabaseName 매개 변수는 명명된 매개 변수입니다.

C:\PS>Get-MasterDataServicesDatabaseServerInformation 
    -ConnectionString 'Data Source=MyServer\MyInstance;Initial catalog=;Integrated Security=True;User ID=;Password=' | 
    Get-MasterDataServicesDatabase -DatabaseName 'MyDatabase'

변수 및 위치 매개 변수 사용

이 예에서는 Get-MasterDataServicesDatabaseServerInformation cmdlet을 사용하여 New-MasterDataServicesDatabase cmdlet의 Server 매개 변수에 사용할 변수 $server를 설정합니다. 매개 변수는 위치 매개 변수입니다.

C:\PS>$server = Get-MasterDataServicesDatabaseServerInformation 
    -ConnectionString 'Data Source=MyServer\MyInstance;Initial catalog=;Integrated Security=True;User ID=;Password='; 
    Get-MasterDataServicesDatabase $server 'MyDatabase'