MSReportServer_ConfigurationSetting 클래스MSReportServer_ConfigurationSetting Class

보고서 서버 인스턴스의 설치 및 런타임 매개 변수를 나타냅니다.Represents the installation and runtime parameters of a report server instance. 이러한 매개 변수는 보고서 서버의 구성 파일에 저장됩니다.These parameters are stored in the configuration file for the report server.

이 유형의 모든 멤버 목록은 MSReportServer_ConfigurationSetting 멤버를 참조하세요.For a list of all members of this type, see MSReportServer_ConfigurationSetting Members.

구문Syntax

Public Class MSReportServer_ConfigurationSetting  
public class MSReportServer_ConfigurationSetting  

스레드 보안Thread Safety

이 유형의 모든 public static(의 경우 공유 Visual BasicVisual Basic) 멤버는 다중 스레드 작업에 안전합니다.Any public static (Shared in Visual BasicVisual Basic) members of this type are safe for multithreaded operations. 인스턴스 멤버는 스레드로부터의 안전성이 보장되지 않습니다.Any instance members are not guaranteed to be thread-safe.

예제Example

다음 코드를 실행 하려면 각 대신 서버 이름을 추가 < servername> 합니다.To run the following code, add your server name in place of each <servername>. 경로가 기본값이 아니면 설치 위치를 가리키도록 경로를 업데이트합니다.Update the path to point to your installation location, if it is not the default. 다음 코드 예제에서는 MSReportServer_ConfigurationSetting 클래스의 각 속성을 반복하여 각 속성 이름 및 값을 콘솔에 인쇄합니다.The following code example iterates through each property in the MSReportServer_ConfigurationSetting class, printing the name of each property and its value to the console.

Imports System  
Imports System.Management  
Imports System.IO  

Module Module1  

    Sub Main()  
        Const machineWmiNamespace As String = "\\<servername>\root\Microsoft\SqlServer\ReportServer\<InstanceName>\v10"  
        Const wmiNamespace As String = "\\<servername>\root\Microsoft\SqlServer\ReportServer\<InstanceName>\v10:MSReportServer_ConfigurationSetting"  

        Dim connOptions As New ConnectionOptions()  
        connOptions.Authentication = AuthenticationLevel.Default  

        Dim getOptions As New ObjectGetOptions()  
        getOptions.Timeout = New System.TimeSpan(0, 0, 30)  

        Dim machineScope As New ManagementScope(machineWmiNamespace, connOptions)  
        machineScope.Connect()  

        Dim scope As ManagementScope = Nothing  

        scope = New ManagementScope(wmiNamespace, connOptions)  
        scope.Connect()  

        Dim path As New ManagementPath("MSReportServer_Instance")  
        Dim serverClass As New ManagementClass(scope, path, getOptions)  

        serverClass.Get()  

        Dim instances As ManagementObjectCollection = serverClass.GetInstances()  

        For Each instance As ManagementObject In instances  

            Console.WriteLine("\n-----\nSERVER STATUS:\n")  

            Dim serverStatusObject As ManagementBaseObject = instance.InvokeMethod("GetServerStatus", Nothing, Nothing)  

            Dim t As Integer = serverStatusObject("Length")  

            Dim namesArray As Array = serverStatusObject("Names")  
            Dim descArray As Array = serverStatusObject("Descriptions")  
            Dim statusArray As Array = serverStatusObject("Statuses")  
            Dim severityArray As Array = serverStatusObject("Severities")  

            Dim i As Integer  

            For i = 0 To t - 1  
                Console.WriteLine("{0} - {1}", namesArray.GetValue(i), descArray.GetValue(i))  
                Console.WriteLine("Value: {0}, Severity: {1}", statusArray.GetValue(i), severityArray.GetValue(i))  
            Next i  

        Next instance  

    End Sub  

End Module  
using System;  
using System.Management;  
using System.IO;  
[assembly: CLSCompliant(true)]  

class Class1  
{  
   [STAThread]  
   static void Main(string[] args)  
   {  
      const string machineWmiNamespace = @"\\<servername>\root\Microsoft\SqlServer\ReportServer\<InstanceName>\v10";  
        const string wmiNamespace = @"\\<servername>\root\Microsoft\SqlServer\ReportServer\<InstanceName>\v10:MSReportServer_ConfigurationSetting";  

      ConnectionOptions connOptions = new ConnectionOptions();  
      connOptions.Authentication = AuthenticationLevel.Default;  

      ObjectGetOptions getOptions = new ObjectGetOptions();  
      getOptions.Timeout = new System.TimeSpan(0,0,30);  

      ManagementScope machineScope = new ManagementScope(machineWmiNamespace, connOptions);  
      machineScope.Connect();  

      ManagementScope scope = null;  

      scope = new ManagementScope(wmiNamespace, connOptions);  
      scope.Connect();  

      ManagementPath path = new ManagementPath("MSReportServer_Instance");  
      ManagementClass serverClass = new ManagementClass(scope, path, getOptions);  

      serverClass.Get();  

      ManagementObjectCollection instances = serverClass.GetInstances();  

      foreach (ManagementObject instance in instances)  
      {  

         Console.WriteLine("\n-----\nSERVER STATUS:\n");  

         ManagementBaseObject serverStatusObject = instance.InvokeMethod("GetServerStatus", null, null);  

         int t = (int)serverStatusObject["Length"];  

         Array namesArray = (Array)serverStatusObject["Names"];  
         Array descArray = (Array)serverStatusObject["Descriptions"];  
         Array statusArray = (Array)serverStatusObject["Statuses"];  
         Array severityArray = (Array)serverStatusObject["Severities"];  

         for (int i = 0; i < t; i++)  
         {  
            Console.WriteLine("{0} - {1}",  
               (string)namesArray.GetValue(i),(string)descArray.GetValue(i));  
            Console.WriteLine("Value: {0}, Severity: {1}",  
               (string)statusArray.GetValue(i), (int)severityArray.GetValue(i));  
         }  

         Console.ReadKey();  
      }  
   }  
}  

요구 사항Requirements

Namespace: root\Microsoft\SqlServer\ReportServer\<InstanceName>\v13\Adminroot\Microsoft\SqlServer\ReportServer\<InstanceName>\v13\AdminNamespace: root\Microsoft\SqlServer\ReportServer\<InstanceName>\v13\Adminroot\Microsoft\SqlServer\ReportServer\<InstanceName>\v13\Admin

플랫폼: Windows Server 2003, Datacenter Edition; Windows Server 2003, Enterprise Edition; Windows Server 2003, Standard Edition; Windows Vista; Windows XP Professional SP2(서비스 팩 2) 또는 SP1(서비스 팩 1) 또는 Windows 2000(모든 버전)Windows Server 2003, Datacenter Edition; Windows Server 2003, Enterprise Edition; Windows Server 2003, Standard Edition; Windows Vista; Windows XP Professional with Service Pack 2 (SP2) or Service Pack 1 (SP1); or Windows 2000 (all versions)Platform: Windows Server 2003, Datacenter Edition; Windows Server 2003, Enterprise Edition; Windows Server 2003, Standard Edition; Windows Vista; Windows XP Professional SP2(서비스 팩 2) 또는 SP1(서비스 팩 1) 또는 Windows 2000(모든 버전)Windows Server 2003, Datacenter Edition; Windows Server 2003, Enterprise Edition; Windows Server 2003, Standard Edition; Windows Vista; Windows XP Professional with Service Pack 2 (SP2) or Service Pack 1 (SP1); or Windows 2000 (all versions)

관련 항목:See Also

MSReportServer_ConfigurationSetting 멤버MSReportServer_ConfigurationSetting Members