• 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'
    
  • 相关阅读:
    http请求类型简介
    关于PLSQL连接报错:ORA-12154:TNS:无法解析指定的连接标识符
    JDK8的安装与配置
    今天新装tomcat遇到黑窗口(startup.bat)启动乱码问题解决!!!
    一个简单的工厂模式(一个接口,多个实现,通过调用条件的不同,分别去调用符合的实现)
    数组(复习)
    java选择结构、循环结构(复习)
    java常用的数据类型,变量和常量,运算符(复习)
    java输入输出,书写规范,运行原理,跨平台原理(复习)
    JAVA基础入门(JDK、eclipse下载安装)
  • 原文地址:https://www.cnblogs.com/hainange/p/6153599.html
Copyright © 2020-2023  润新知