1.项目背景
由于历史原因,公司部分系统的Report是基于SQL Server Report Service搭建的,且Reporting Services 和Report Server DataBase是部署在不同的DB上的。因报表数据库所在机器过保,需要将Report Server数据库和ReportServerTempDB数据库迁移至新的Server上。但因项目老旧,研发和运维人员更迭,相关文档不完善,所以,这次迁移过程中,们还是遇到了一个不小的坑。
迁移要求,如下图所示:
但是很不幸,迁移后,report service 报错。
2.报错信息
service 错误信息如下:
报表服务器数据库的版本格式无效,或无法读取。已找到的版本为“147”,而所需的版本为“C.0.8.54”。若要继续操作,请更新报表服务器数据库的版本并验证其访问权限。 (rsInvalidReportServerDatabase) (rsRPCError) 获取联机帮助
查看report 服务的log,文件 ReportServerService__12_04_2018_18_56_15.log.txt,
完整的信息如下
<Header>
<Product>Microsoft SQL Server Reporting Services 版本 9.00.5000.00</Product>
<Locale>zh-CN</Locale>
<TimeZone>中国标准时间</TimeZone>
<Path>Z:\Program Files\Microsoft SQL Server\MSSQL.1\Reporting Services\LogFiles\ReportServerService__12_4_2021_18_56_15.log</Path>
<SystemName>weixinqqyijiaqin113</SystemName>
<OSName>Microsoft Windows NT 6.1.7601 Service Pack 1</OSName>
<OSVersion>6.1.7601.65536</OSVersion>
</Header>
ReportingServicesService!library!4!2018/12/4-18:56:15:: i INFO: Initializing ConnectionType to '0' as specified in Configuration file.
ReportingServicesService!library!4!2018/12/4-18:56:15:: i INFO: Initializing IsSchedulingService to 'True' as specified in Configuration file.
ReportingServicesService!library!4!2018/12/4-18:56:15:: i INFO: Initializing IsNotificationService to 'True' as specified in Configuration file.
ReportingServicesService!library!4!2018/12/4-18:56:15:: i INFO: Initializing IsEventService to 'True' as specified in Configuration file.
ReportingServicesService!library!4!2018/12/4-18:56:15:: i INFO: Initializing PollingInterval to '10' second(s) as specified in Configuration file.
ReportingServicesService!library!4!2018/12/4-18:56:15:: i INFO: Initializing WindowsServiceUseFileShareStorage to 'False' as specified in Configuration file.
ReportingServicesService!library!4!2018/12/4-18:56:15:: i INFO: Initializing MemoryLimit to '60' percent as specified in Configuration file.
ReportingServicesService!library!4!2018/12/4-18:56:15:: i INFO: Initializing RecycleTime to '720' minute(s) as specified in Configuration file.
ReportingServicesService!library!4!2018/12/4-18:56:15:: i INFO: Initializing MaximumMemoryLimit to '80' percent as specified in Configuration file.
ReportingServicesService!library!4!2018/12/4-18:56:15:: i INFO: Initializing MaxAppDomainUnloadTime to '30' minute(s) as specified in Configuration file.
ReportingServicesService!library!4!2018/12/4-18:56:15:: i INFO: Initializing MaxQueueThreads to '0' thread(s) as specified in Configuration file.
ReportingServicesService!library!4!2018/12/4-18:56:15:: i INFO: Initializing IsWebServiceEnabled to 'True' as specified in Configuration file.
ReportingServicesService!library!4!2018/12/4-18:56:15:: i INFO: Initializing MaxActiveReqForOneUser to '300' requests(s) as specified in Configuration file.
ReportingServicesService!library!4!2018/12/4-18:56:15:: i INFO: Initializing MaxScheduleWait to '5' second(s) as specified in Configuration file.
ReportingServicesService!library!4!2018/12/4-18:56:15:: i INFO: Initializing DatabaseQueryTimeout to '120' second(s) as specified in Configuration file.
ReportingServicesService!library!4!2018/12/4-18:56:15:: i INFO: Initializing ProcessRecycleOptions to '0' as specified in Configuration file.
ReportingServicesService!library!4!2018/12/4-18:56:15:: i INFO: Initializing RunningRequestsScavengerCycle to '60' second(s) as specified in Configuration file.
ReportingServicesService!library!4!2018/12/4-18:56:15:: i INFO: Initializing RunningRequestsDbCycle to '60' second(s) as specified in Configuration file.
ReportingServicesService!library!4!2018/12/4-18:56:15:: i INFO: Initializing RunningRequestsAge to '30' second(s) as specified in Configuration file.
ReportingServicesService!library!4!2018/12/4-18:56:15:: i INFO: Initializing CleanupCycleMinutes to '10' minute(s) as specified in Configuration file.
ReportingServicesService!library!4!2018/12/4-18:56:15:: i INFO: Initializing DailyCleanupMinuteOfDay to default value of '120' minutes since midnight because it was not specified in Configuration file.
ReportingServicesService!library!4!2018/12/4-18:56:15:: i INFO: Initializing WatsonFlags to '1064' as specified in Configuration file.
ReportingServicesService!library!4!2018/12/4-18:56:15:: i INFO: Initializing WatsonDumpOnExceptions to 'Microsoft.ReportingServices.Diagnostics.Utilities.InternalCatalogException,Microsoft.ReportingServices.Modeling.InternalModelingException' as specified in Configuration file.
ReportingServicesService!library!4!2018/12/4-18:56:15:: i INFO: Initializing WatsonDumpExcludeIfContainsExceptions to 'System.Data.SqlClient.SqlException,System.Threading.ThreadAbortException' as specified in Configuration file.
ReportingServicesService!library!4!2018/12/4-18:56:15:: i INFO: Initializing SecureConnectionLevel to '0' as specified in Configuration file.
ReportingServicesService!library!4!2018/12/4-18:56:15:: i INFO: Initializing DisplayErrorLink to 'True' as specified in Configuration file.
ReportingServicesService!library!4!2018/12/4-18:56:15:: i INFO: Initializing WebServiceUseFileShareStorage to 'False' as specified in Configuration file.
ReportingServicesService!resourceutilities!4!2018/12/4-18:56:16:: i INFO: Reporting Services starting SKU: Enterprise
ReportingServicesService!resourceutilities!4!2018/12/4-18:56:16:: i INFO: Evaluation copy: 0 days left
ReportingServicesService!library!9!2018/12/4-18:56:16:: i INFO: Catalog SQL Server Edition = Enterprise
ReportingServicesService!library!9!2018/12/4-18:56:16:: i INFO: Current DB Version 147, Instance Version C.0.8.54. ReportingServicesService!library!9!2018/12/4-18:56:16:: e ERROR: Throwing Microsoft.ReportingServices.Diagnostics.Utilities.InvalidReportServerDatabaseException: 报表服务器数据库的版本格式无效,或无法读取。已找到的版本为"147",而所需的版本为"C.0.8.54"。若要继续操作,请更新报表服务器数据库的版本并验证其访问权限。, ; Info: Microsoft.ReportingServices.Diagnostics.Utilities.InvalidReportServerDatabaseException: 报表服务器数据库的版本格式无效,或无法读取。已找到的版本为"147",而所需的版本为"C.0.8.54"。若要继续操作,请更新报表服务器数据库的版本并验证其访问权限。 ReportingServicesService!library!9!2018/12/4-18:56:16:: e ERROR: Exception caught while starting service. Error: Microsoft.ReportingServices.Diagnostics.Utilities.InvalidReportServerDatabaseException: 报表服务器数据库的版本格式无效,或无法读取。已找到的版本为"147",而所需的版本为"C.0.8.54"。若要继续操作,请更新报表服务器数据库的版本并验证其访问权限。 在 Microsoft.ReportingServices.Library.ConnectionManager.EnsureCorrectDBVersion()
在 Microsoft.ReportingServices.Library.ConnectionManager.ConnectStorage()
在 Microsoft.ReportingServices.Library.ServiceController.ServiceStartThread()
ReportingServicesService!library!9!2018/12/4-18:56:16:: e ERROR: Attempting to start service again...
3.错误分析 3.1 简单分析尝试
查看迁移前后两台机器的SQL实例,其版本一致,确实一致,如下:
Microsoft SQL Server 2008 R2 (SP3) - 10.50.6000.34 (X64)
按照提示及大众意见,点击升级数据库也不行
提示数据库的版本验证不通过。 3.2 从版本入手,重点分析版本
错误提示版本不对,那们找下Report server 和 Report server database的版本信息。下表列出了截至目前(2015/04/29)发布的报表服务器和报表服务器数据库的版本号:
| Release | Report server | Report server database |
|---------------------------------------------------------|---------------|------------------------|
| SQL Server 2008 R2 | 10.50.nnnn.nn | n/a |
| SQL Server 2008 Service Pack 1 (SP1) | 10.0.2531.00 | C.0.9.45 |
| SQL Server 2008 | 10.0.1600.00 | C.0.9.45 |
| SQL Server 2005 Reporting Services Service Pack 3 (SP3) | 9.0.4035.00 | **C.0.8.54** |
| SQL Server 2005 Reporting Services Service Pack 2 (SP2) | 9.0.3042.00 | **C.0.8.54** |
| SQL Server 2005 Express with Advanced Services | 9.0.3042.00 | C.0.8.45 |
| SQL Server 2005 Reporting Services Service Pack 1 (SP1) | 9.0.2049.00 | C.0.8.43 |
| SQL Server 2005 Reporting Services | 9.0.1399.01 | C.0.8.40 |
| SQL Server 2000 Reporting Services Service Pack 2 (SP2) | 8.00.1038 | C.0.6.54 |
| SQL Server 2000 Reporting Services Service Pack 1 (SP1) | 8.00.0878 | C.0.6.51 |
| SQL Server 2000 Reporting Services | 8.00.0743 | C.0.6.43 |
现在来看,Reporting Services Service 应该安装的是2005 SP2 (或者 SP3),但是 Report server database 安装的是2008 R2 SP3。
到此,也应该知道为什么升级版本不对了,当Reporting Services Service 版本 高于 Report server database 版本(的要求)时,可以考虑通过升级解决保存版本不适配问题。们现在遇到的情况正好相反,Report server database 版本高于Reporting Services Service 版本(的要求)了。 4 方案探究 4.1 问题解决
其实问题清晰了,就是Report server 和 Report server database的版本不适配导致的。
再回到迁移项目本身来看,迁移前后,SQL Server 实例的版本一致(Microsoft SQL Server 2008 R2 (SP3)),迁移前运行OK,迁移后就完犊子了,这说明Report server database的版本还受制于其它因素。
是什么限制的呢?众里寻他千百度,一次又一次,尝试N中方法…. 忽然发现,原Report server database所在的Server 没有安装 Reporting Services,而新的Report server database所在的Server 在安装 SQL Server实例时,选择功能时,选择的时是【Select All】,即 新的Server 有安装Reporting Services。 这一发现 是通过C:\Program Files\Microsoft SQL Server 路径下的安装文件发现的。
补充一点,新 Server的SQL Server实例安装后,本身有Report Server数据库和ReportServerTempDB数据库,为了迁移,们是先将DB drop 掉,然后再附加(attach)原DB Server的DB文件。 4.2 方案验证
新安装一个SQL Server实例,但是不安装Reporting Services,即到功能选择时,按照图中标识的选择。
安装后,附加(attach)原DB Server的DB文件(Report Serve和ReportServerTempDB的DB文件),然后配置Reporting Services (主要是配置报表服务器数据库连接),这时OK了,服务正常了。 OK! OK! OK!
这也说明,思考的方向是正确的。 4.3 结论或推断
(1)Report server database的版本 与 所在SQL Server 实例的版本不同;
(2)安装SQL Server 实例时,如未安装Reporting Services,则Report server database(Report Server和ReportServerTempDB)附加到不同版本SQL Server 实例上时,Report server database的版本 不变;
(3)安装SQL Server 实例时,如有安装Reporting Services,则远程电脑上的Reporting Services 连接 本机的Report server database时,获取的Report server database的版本版本是安装时的版本。虽可 删除、再附加 不同 版本的Report server database,但获取的版本仍是安装时的版本。即,此时符合 (2)的推论 不同。
(4)造成(3)的原因,推测为: 安装SQL Server 实例时安装Reporting Services,有将安装时的Report server database的版本保存到注册表或系统表,远程电脑上的Reporting Services 连接 本机的Report server database时,优先从注册表或系统表 获取信息(,不再读取附加的Report server database的版本)。 5.参考文档 1.升级报表服务器数据库 https://docs.microsoft.com/zh-cn/previous-versions/sql/sql-server-2005/ms403392(v=sql.90) 2.rsInvalidReportServerDatabase https://docs.microsoft.com/zh-cn/previous-versions/sql/sql-server-2005/bb326494(v=sql.90)?redirectedfrom=MSDN 3.如何检测版本信息 (Reporting Services)—2008 https://docs.microsoft.com/zh-cn/previous-versions/sql/sql-server-2008/bb630446(v=sql.100) 4.如何检测版本信息 (Reporting Services) —2008R https://docs.microsoft.com/zh-cn/previous-versions/sql/sql-server-2008-r2/bb630446(v=sql.105)
原文创作:东山絮柳仔
原文链接:https://www.cnblogs.com/xuliuzai/p/14926434.html
文章列表
- 通过Python收集MySQL MHA 部署及运行状态信息的功能实现
- 通过Python将监控数据由influxdb写入到MySQL
- 通过Python实现生成excel并邮件发送的功能
- 通过Python实现对SQL Server 数据文件大小的监控告警
- 通过 Telegraf + InfluxDB + Grafana 快速搭建监控体系的详细步骤
- 迁移Report Server DataBase时遇到的坑
- 谨慎 mongodb 关于数字操作可能导致类型及精度变化
- 详解MongoDB中的多表关联查询$lookup
- 瞧一瞧!这儿实现了MongoDB的增量备份与还原含部署代码
- 时序数据库InfluxDB的基本语法
- 数据库服务器资源使用情况周报
- 数据库如何应对保障大促活动
- 我10亿级ES数据迁到MongoDB节省90%成本!转载
- 应用部署架构演进转载 -
- 学习ProxySQL参考到几个网址
- 名言小抄五
- 关于SQL Server 镜像数据库快照的创建及使用
- 关于SQL Server 数据库归档的一些思考和改进
- 关于MongoDB时间格式转换和时间段聚合统计的用法总结
- 以实现MongoDB副本集状态的监控为例,看Telegraf系统中Exec输入插件如何编写部署
- 一个磁盘I/O故障导致的AlwaysOn FailOver 过程梳理和分析
- shell 操作钉钉机器人实现告警提醒
- python 学习笔记 四
- python 学习 三
- kapacitor的安装及部分常用命令
- TiDB 架构及设计实现
- TiDB 学习笔记一运维管理
- SQL Server 查看当前会话状态sp_WhoIsActive 转载 -
- SQL Server DB迁移工作List
- SQL Server CPU 利用率毛刺的分析定位与解决
- SQL Server Alwayson架构下 服务器 各虚拟IP漂移监控告警的功能实现 1服务器视角
- Python发送的邮件设置收件人隐藏与显示
- MySQL索引设计需要考虑哪些因素?
- MySQL日志收集之Filebeat和Logstsh的一键安装配置ELK架构
- MySQL数据归档小工具推荐及优化mysql_archiver
- MySQL数据库规范 设计规范+开发规范+操作规范
- MySQL数据库Inception工具学习与测试 笔记
- MySQL常用命令汇总偏向运维管理
- MySQL在线DDL工具 ghost
- MySQL 学习笔记四
- MySQL 学习笔记三
- MySQL alter table时执行innobackupex全备再谈Seconds_Behind_Master
- MySQL MHA 运行状态监控
- MongoDB数据库的设计规范
- MongoDB实例重启失败探究大事务Redo导致
- MongoDB 那些事一文以蔽之
- MongoDB 中的加减乘除 - 运算
- MongoDB 中数据的替换方法实现 类Replace函数功能
- Linux常用命令总结二
- K8S基础学习