代码改变世界

数据库服务器改名导致Reporting Service不可用的案例

2014-09-15 15:01  潇湘隐者  阅读(3010)  评论(0编辑  收藏  举报

案例环境:

    操作系统版本    :    Windows Server 2012 R2 Standard

    数据库版本      :   SQL Server 2012 Standard Edition SP2

 

案例介绍:


    其实已经是第二次碰到这种情况,还是决定将这个案例记录一下。第一次是做数据库迁移时碰到,没有时间整理记录,第二次准备一个测试环境,从虚拟机一个服务器克隆了一个测试服务器GETESTNT30, 服务器名称变了,但是SQL SERVER里面@@SERVERNAME 与 SERVERPROPERTY('servername')不一致。

clipboard

现象如下所示:

clipboard[1]

The report server cannot open a connection to the report server database. A connection to the database is required for all requests and processing. (rsReportServerDatabaseUnavailable) Get Online Help
Login failed for user 'xxxx\GETTESTNT30$'.

clipboard[2]

The report server cannot open a connection to the report server database. A connection to the database is required for all requests and processing. (rsReportServerDatabaseUnavailable)

 

如果要查看更详细的错误信息,可以去SQL SERVER的安装目录,例如这台测试服务器C:\Program Files\Microsoft SQL Server\MSRS11.MSSQLSERVER\Reporting Services\LogFiles下查看详细日志记录。

如下所示,在Reporting Services Configuration Manager里面,在数据库选项(Database)里面显示的SQL Server Name为原服务器GETNT59,而Report Manager URL里面则为GETTESTNT30

clipboard[3]

clipboard[4]

 

解决方法:

    打开Reporting Service的配置管理器,进行数据库服务器更名操作。

clipboard[5]

clipboard[6]

clipboard[7]

clipboard[8]

 

完成之后,还必须删除加密内容(Delete Enrypted Content),才能正常访问Reporting Service对应的URL地址。

clipboard[9]