BAM部署视图失败 - OLE DB or ODBC error: Cannot open database "BAMStarSchema". login failed 42000.

错误描述


今天在部署BAM视图时遇到如下错误,找了很久终于找到原因,原来是数据库用户角色设置的问题,BAMStarSchema数据库的用户没有”db_datareader”角色导致无法读取该数据库当中的数据。

英文错误描述信息

Deploying Activity... Done.
Deploying View... ERROR: The BAM deployment failed.
Internal error: The operation terminated unsuccessfully.
OLE DB error: OLE DB or ODBC error: Cannot open database "BAMStarSchema" request
ed by the login. The login failed.; 42000.
Errors in the high-level relational engine. A connection could not be made to th
e data source with the DataSourceID of 'bam_ExcByApplication', Name of 'bam_ExcB
yApplication'.
Errors in the OLAP storage engine: An error occurred while the dimension, with t
he ID of 'ExcByApplication_ExcDatetime', Name of 'ExcByApplication_ExcDatetime'
was being processed.
Errors in the OLAP storage engine: An error occurred while the 'Month' attribute
of the 'ExcByApplication_ExcDatetime' dimension from the 'BAMAnalysis' database
was being processed.
Server: The operation has been cancelled.
OLE DB error: OLE DB or ODBC error: Cannot open database "BAMStarSchema" request
ed by the login. The login failed.; 42000.
Errors in the high-level relational engine. A connection could not be made to th
e data source with the DataSourceID of 'bam_ExcByApplication', Name of 'bam_ExcB
yApplication'.
Errors in the OLAP storage engine: An error occurred while the dimension, with t
he ID of 'ExcByApplication_Application', Name of 'ExcByApplication_Application'
was being processed.
Errors in the OLAP storage engine: An error occurred while the 'Application' att
ribute of the 'ExcByApplication_Application' dimension from the 'BAMAnalysis' da
tabase was being processed.
OLE DB error: OLE DB or ODBC error: Cannot open database "BAMStarSchema" request
ed by the login. The login failed.; 42000.
Errors in the high-level relational engine. A connection could not be made to th
e data source with the DataSourceID of 'bam_ExcByApplication', Name of 'bam_ExcB
yApplication'.
Errors in the OLAP storage engine: An error occurred while the dimension, with t
he ID of 'ExcByApplication_ExcFaultDescription', Name of 'ExcByApplication_ExcFa
ultDescription' was being processed.
Errors in the OLAP storage engine: An error occurred while the 'FaultDescription
' attribute of the 'ExcByApplication_ExcFaultDescription' dimension from the 'BA
MAnalysis' database was being processed.
OLE DB error: OLE DB or ODBC error: Cannot open database "BAMStarSchema" request
ed by the login. The login failed.; 42000.
Errors in the high-level relational engine. A connection could not be made to th
e data source with the DataSourceID of 'bam_ExcByApplication', Name of 'bam_ExcB
yApplication'.
Errors in the OLAP storage engine: An error occurred while the dimension, with t
he ID of 'ExcByApplication_ExcDatetime', Name of 'ExcByApplication_ExcDatetime'
was being processed.
Errors in the OLAP storage engine: An error occurred while the 'Year' attribute
of the 'ExcByApplication_ExcDatetime' dimension from the 'BAMAnalysis' database
was being processed.
OLE DB error: OLE DB or ODBC error: Cannot open database "BAMStarSchema" request
ed by the login. The login failed.; 42000.
Errors in the high-level relational engine. A connection could not be made to th
e data source with the DataSourceID of 'bam_ExcByApplication', Name of 'bam_ExcB
yApplication'.
Errors in the OLAP storage engine: An error occurred while the dimension, with t
he ID of 'ExcByApplication_ExcDatetime', Name of 'ExcByApplication_ExcDatetime'
was being processed.
Errors in the OLAP storage engine: An error occurred while the 'Day' attribute o
f the 'ExcByApplication_ExcDatetime' dimension from the 'BAMAnalysis' database w
as being processed.

解决方法


我们可以使用T-SQL语句来修复该数据库中的用户角色设置,为该用户添加对其数据库的“db_datareader”角色。在我的机器上,数据库是运行在DemoDomain/SQL_Service这个账户下的,使用如下脚本启用该用户的'db_datareader'角色,另外你也可以通过SQL Management Studio用鼠标点击配置的方式做同样的操作。

USE BAMStarSchema 
EXEC sp_addrolemember 'db_datareader', 'DEMODOMAIN/SQL_SERVICE'

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值