简体   繁体   English

数据库镜像-SQL过程调用

[英]Database mirroring - SQL Procedure call

I have created a SSRS report (SQL Server 2005), however on running it I receive an error that a view doesn't exist on the mirrored database (I haven't dealt with mirroring before). 我创建了一个SSRS报表(SQL Server 2005),但是在运行它时,我收到一个错误,即镜像数据库上不存在视图(以前我没有处理镜像)。 What happens is I run the SQL stored procedure on the 1 database and it runs fine returning all the data expected. 发生的事情是我在1数据库上运行了SQL存储过程,并且可以很好地返回所有预期的数据。 If I run the report pointing to the mirrored database, it picks up the stored procedure but not the view. 如果我运行指向镜像数据库的报告,它将选择存储过程,而不是视图。 If I go and look in enterprise explorer both the stored procedure and View don't exist in the database. 如果我去企业资源管理器中查看,存储过程和View都不存在于数据库中。

I'm convinced it's a mirroring issue, but I'm not sure how to get the view to the other database, and why doesn't the stored procedure show up under Enterprise explorer? 我确信这是一个镜像问题,但是我不确定如何将视图获取到另一个数据库,为什么存储过程未显示在Enterprise Explorer中?

thanks. 谢谢。

尝试对镜像数据库上的视图使用sp_refreshview。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM