如何在带有Dashboard Stats的ASP.Net网页上显示SQL Server 2008(服务器仪表板性能)?

时间:2020-12-13 03:30:36

Is there a way to bring and display the Server Dashboard report of SQL Server instance, configurations, and activities on a ASP.Net web page? I know that SQL Server 2008 R2 has that built-in feature to generate a standard report, any ideas on how to replicate and bring that report for end-user view in ASP.Net/C#? Thanks a lot for the help.

有没有办法在ASP.Net网页上显示和显示SQL Server实例,配置和活动的服务器仪表板报告?我知道SQL Server 2008 R2具有生成标准报告的内置功能,有关如何在ASP.Net/C#中为最终用户视图复制和提供该报告的任何想法?非常感谢您的帮助。

1 个解决方案

#1


2  

These are the steps to configure and display a Server Dashboard Performance with an external URL link and within MS SQL Server 2008 R2:

以下是使用外部URL链接在MS SQL Server 2008 R2中配置和显示服务器仪表板性能的步骤:

Display the Performance Dashboard Report within MS SQL Server 2008 R2:

在MS SQL Server 2008 R2中显示性能仪表板报告:

1- Download the Microsoft SQL Server 2012 Performance dashboard Reports from: http://www.microsoft.com/en-us/download/details.aspx?id=29063 Run the script from SSMS by executing setup.sql

1-从以下位置下载Microsoft SQL Server 2012性能仪表板报告:http://www.microsoft.com/en-us/download/details.aspx?id = 29063通过执行setup.sql从SSMS运行脚本

2- Once downloaded, you can run the report by going to SQL Server Management Studio and connect to your local server. Under Object Explorer right click (local)(SQL Server) > Reports > Custom Reports… locate C:\Program Files (x86)\Microsoft SQL Server\110\Tools\Performance Dashboard\performance_dashboard_main.rdl and Run. You should get the report.

2-下载后,您可以通过转到SQL Server Management Studio并连接到本地服务器来运行报告。在对象资源管理器下右键单击(本地)(SQL Server)>报告>自定义报告...找到C:\ Program Files(x86)\ Microsoft SQL Server \ 110 \ Tools \ Performance Dashboard \ performance_dashboard_main.rdl并运行。你应该得到报告。

Display the Performance Dashboard Report with an external URL link:

使用外部URL链接显示Performance Dashboard Report:

1- Under MS SQL Server 2008 R2 go to Configuration Tools > Reporting Services Configuration Manager and connect to your local Server or click to find it (Start the Report Server).

1-在MS SQL Server 2008 R2下,转到配置工具> Reporting Services配置管理器并连接到本地服务器或单击以查找它(启动报表服务器)。

Specification tips:

规格提示:

  • Service Account = Use built-in Account: Network Service (Default)

    服务帐户=使用内置帐户:网络服务(默认)

  • Web Service URL = Leave Default for all configurations

    Web服务URL =保留所有配置的默认值

  • Database = [Current Report Server db] / Click - Change Database

    数据库= [当前报表服务器数据库] /单击 - 更改数据库

    • Action: choose existing report server db

      操作:选择现有报表服务器db

    • Database Server:
      Server Name = Same as your local server name that you connected
      Authentication Type = Current-User Integrated Security (Test Connection)

      数据库服务器:服务器名称=与您连接的本地服务器名称相同身份验证类型=当前用户集成安全性(测试连接)

    • Database:
      SQL Server Instance = Same as your local server name that you connected
      Report Server db = ReportServer
      Report Server Mode = Native
      Credentials/Login-Password = Leave default/AdministratorAccount to access the external link. (Recommended)
      Authentication Type = Service Credentials
      [Current Report Server db Credentials] / Leave Default

      数据库:SQL Server实例=与您连接的本地服务器名称相同报表服务器db = ReportServer报表服务器模式=本机凭据/登录密码=保留默认值/ AdministratorAccount以访问外部链接。 (推荐)身份验证类型=服务凭据[当前报告服务器数据库凭据] /保留默认值

  • Report Manager URL = http://<ComputerName>:80/<YourReportName>

    报表管理器URL = http:// :80 /

  • Email Settings = Optional

    电子邮件设置=可选

  • Execution Account = Default (Blank)

    执行帐户=默认(空白)

  • Encryption Keys = Default

    加密密钥=默认

  • Scale-out Deployment = Default

    横向扩展部署=默认

2- Click the Home link of the Report Manager URL and upload: C:\Program Files (x86)\Microsoft SQL Server\110\Tools\Performance Dashboard\performance_dashboard_main.rdl

2-单击报告管理器URL的主页链接并上载:C:\ Program Files(x86)\ Microsoft SQL Server \ 110 \ Tools \ Performance Dashboard \ performance_dashboard_main.rdl

3- Once uploaded, click on it and under Data Sources check on Custom data source and check Windows integrated security > test connection. Now, it should work.

3-上传后,单击它并在数据源下选中自定义数据源,然后检查Windows集成安全性>测试连接。现在,它应该工作。

Note: If you are using Chrome or Safari, the page is not going to display anything; so, you have to locate: C:\Program Files\Microsoft SQL Server\MSRS10_50.MSSQLSERVER\Reporting Services\ReportManager\js\ReportingServices.js ...And, add to the file the following script:

注意:如果您使用的是Chrome或Safari,则该页面不会显示任何内容;所以,你必须找到:C:\ Program Files \ Microsoft SQL Server \ MSRS10_50.MSSQLSERVER \ Reporting Services \ ReportManager \ js \ ReportingServices.js ...并且,向该文件添加以下脚本:

function pageLoad() {
var element = document.getElementById("ctl31_ctl09");
if (element) {
    element.style.overflow = "visible";    }
}

var jQueryScriptOutputted = false;
function initJQuery() {

//if the jQuery object isn't available
if (typeof (jQuery) == 'undefined') {


    if (!jQueryScriptOutputted) {
        //only output the script once..
        jQueryScriptOutputted = true;

        //output the script 
        document.write("<scr" + "ipt type=\"text/javascript\" src=\"../js/jquery- 1.6.2.min.js\"></scr" + "ipt>");
    }
    setTimeout("initJQuery()", 50);
} else {

    $(function () {

        // Bug-fix on Chrome and Safari etc (webkit)
        if ($.browser.webkit) {

            // Start timer to make sure overflow is set to visible
            setInterval(function () {
                var div = $('table[id*=_fixedTable] > tbody > tr:last > td:last > div')

                div.css('overflow', 'visible');
            }, 1000);
        }

    });
}
}

initJQuery();
I hope it helps someone!

#1


2  

These are the steps to configure and display a Server Dashboard Performance with an external URL link and within MS SQL Server 2008 R2:

以下是使用外部URL链接在MS SQL Server 2008 R2中配置和显示服务器仪表板性能的步骤:

Display the Performance Dashboard Report within MS SQL Server 2008 R2:

在MS SQL Server 2008 R2中显示性能仪表板报告:

1- Download the Microsoft SQL Server 2012 Performance dashboard Reports from: http://www.microsoft.com/en-us/download/details.aspx?id=29063 Run the script from SSMS by executing setup.sql

1-从以下位置下载Microsoft SQL Server 2012性能仪表板报告:http://www.microsoft.com/en-us/download/details.aspx?id = 29063通过执行setup.sql从SSMS运行脚本

2- Once downloaded, you can run the report by going to SQL Server Management Studio and connect to your local server. Under Object Explorer right click (local)(SQL Server) > Reports > Custom Reports… locate C:\Program Files (x86)\Microsoft SQL Server\110\Tools\Performance Dashboard\performance_dashboard_main.rdl and Run. You should get the report.

2-下载后,您可以通过转到SQL Server Management Studio并连接到本地服务器来运行报告。在对象资源管理器下右键单击(本地)(SQL Server)>报告>自定义报告...找到C:\ Program Files(x86)\ Microsoft SQL Server \ 110 \ Tools \ Performance Dashboard \ performance_dashboard_main.rdl并运行。你应该得到报告。

Display the Performance Dashboard Report with an external URL link:

使用外部URL链接显示Performance Dashboard Report:

1- Under MS SQL Server 2008 R2 go to Configuration Tools > Reporting Services Configuration Manager and connect to your local Server or click to find it (Start the Report Server).

1-在MS SQL Server 2008 R2下,转到配置工具> Reporting Services配置管理器并连接到本地服务器或单击以查找它(启动报表服务器)。

Specification tips:

规格提示:

  • Service Account = Use built-in Account: Network Service (Default)

    服务帐户=使用内置帐户:网络服务(默认)

  • Web Service URL = Leave Default for all configurations

    Web服务URL =保留所有配置的默认值

  • Database = [Current Report Server db] / Click - Change Database

    数据库= [当前报表服务器数据库] /单击 - 更改数据库

    • Action: choose existing report server db

      操作:选择现有报表服务器db

    • Database Server:
      Server Name = Same as your local server name that you connected
      Authentication Type = Current-User Integrated Security (Test Connection)

      数据库服务器:服务器名称=与您连接的本地服务器名称相同身份验证类型=当前用户集成安全性(测试连接)

    • Database:
      SQL Server Instance = Same as your local server name that you connected
      Report Server db = ReportServer
      Report Server Mode = Native
      Credentials/Login-Password = Leave default/AdministratorAccount to access the external link. (Recommended)
      Authentication Type = Service Credentials
      [Current Report Server db Credentials] / Leave Default

      数据库:SQL Server实例=与您连接的本地服务器名称相同报表服务器db = ReportServer报表服务器模式=本机凭据/登录密码=保留默认值/ AdministratorAccount以访问外部链接。 (推荐)身份验证类型=服务凭据[当前报告服务器数据库凭据] /保留默认值

  • Report Manager URL = http://<ComputerName>:80/<YourReportName>

    报表管理器URL = http:// :80 /

  • Email Settings = Optional

    电子邮件设置=可选

  • Execution Account = Default (Blank)

    执行帐户=默认(空白)

  • Encryption Keys = Default

    加密密钥=默认

  • Scale-out Deployment = Default

    横向扩展部署=默认

2- Click the Home link of the Report Manager URL and upload: C:\Program Files (x86)\Microsoft SQL Server\110\Tools\Performance Dashboard\performance_dashboard_main.rdl

2-单击报告管理器URL的主页链接并上载:C:\ Program Files(x86)\ Microsoft SQL Server \ 110 \ Tools \ Performance Dashboard \ performance_dashboard_main.rdl

3- Once uploaded, click on it and under Data Sources check on Custom data source and check Windows integrated security > test connection. Now, it should work.

3-上传后,单击它并在数据源下选中自定义数据源,然后检查Windows集成安全性>测试连接。现在,它应该工作。

Note: If you are using Chrome or Safari, the page is not going to display anything; so, you have to locate: C:\Program Files\Microsoft SQL Server\MSRS10_50.MSSQLSERVER\Reporting Services\ReportManager\js\ReportingServices.js ...And, add to the file the following script:

注意:如果您使用的是Chrome或Safari,则该页面不会显示任何内容;所以,你必须找到:C:\ Program Files \ Microsoft SQL Server \ MSRS10_50.MSSQLSERVER \ Reporting Services \ ReportManager \ js \ ReportingServices.js ...并且,向该文件添加以下脚本:

function pageLoad() {
var element = document.getElementById("ctl31_ctl09");
if (element) {
    element.style.overflow = "visible";    }
}

var jQueryScriptOutputted = false;
function initJQuery() {

//if the jQuery object isn't available
if (typeof (jQuery) == 'undefined') {


    if (!jQueryScriptOutputted) {
        //only output the script once..
        jQueryScriptOutputted = true;

        //output the script 
        document.write("<scr" + "ipt type=\"text/javascript\" src=\"../js/jquery- 1.6.2.min.js\"></scr" + "ipt>");
    }
    setTimeout("initJQuery()", 50);
} else {

    $(function () {

        // Bug-fix on Chrome and Safari etc (webkit)
        if ($.browser.webkit) {

            // Start timer to make sure overflow is set to visible
            setInterval(function () {
                var div = $('table[id*=_fixedTable] > tbody > tr:last > td:last > div')

                div.css('overflow', 'visible');
            }, 1000);
        }

    });
}
}

initJQuery();
I hope it helps someone!