代码之家  ›  专栏  ›  技术社区  ›  Chris Simpson

如何确定报表服务器上的SQL Server版本

  •  3
  • Chris Simpson  · 技术社区  · 16 年前

    我们所有的ReportingServices生产实例都被拆分为Web服务器组件和报表数据库组件。

    我知道您可以通过以下TSQL检测数据库服务器上的SQL Server实例:

    SELECT SERVERPROPERTY('productversion'), SERVERPROPERTY ('productlevel'),
    SERVERPROPERTY ('edition')
    

    但是,在我们的案例中,报表服务器没有安装数据库服务器组件。那么,如何检测在这种情况下安装了什么服务包呢?

    3 回复  |  直到 11 年前
        1
  •  8
  •   James L    11 年前

    手动或使用Web抓取,浏览到

    http://reportServerName/ReportServer 
    

    版本号在页面的底部。

    或编程:

    using System;
    using System.Collections.Generic;
    using System.IO;
    using System.Text;
    using System.Web;
    using System.Web.Services;
    using System.Web.Services.Protocols;
    
    class Sample
    {
        static void Main(string[] args)
        {
            // Create proxy object and set service 
            // credentials to integrated
            ReportingService2006 rs = new ReportingService2006();
            rs.Url = "http://<Server Name>/_vti_bin/ReportServer/" +
                "ReportService2006.asmx";
            rs.Credentials = 
                System.Net.CredentialCache.DefaultCredentials;
    
            try
            {
                // Set the server info header 
                rs.ServerInfoHeaderValue = new ServerInfoHeader();
    
                // Make a call to the Web service
                CatalogItem[] items = rs.ListChildren("/");
    
                // Output the server version and edition to the console
                Console.WriteLine("Server version: {0}",
                   rs.ServerInfoHeaderValue.ReportServerVersionNumber);
                Console.WriteLine("Server edition: {0}",
                   rs.ServerInfoHeaderValue.ReportServerEdition);
            }
    
            catch (Exception e)
            {
                Console.WriteLine(e.Message);
            }
        }
    }
    
        2
  •  4
  •   adolf garlic    16 年前

    在浏览器中,转到

    http://<reportserverName>/reportserver
    

    看看这页的底部

        3
  •  1
  •   Andy Jones    16 年前

    这个 Reporting Services Configuration Tool 详细说明正在运行的SQL Server版本。