• 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'
    
  • 相关阅读:
    设计模式-设计原则(Design Principle)
    设计模式-装饰者模式(Decorator Pattern)
    C++-copy constructor、copy-assignment operator、destructor
    cocos2dx3.0-tinyxml在Android环境下解析xml失败的问题
    XACML-条件评估(Condition evaluation),规则评估(Rule evaluation),策略评估(Policy evaluation),策略集评估(PolicySet evaluation)
    XACML-<Target> 元素的结构与相关的评估
    XACML-PolicySet与request结构简介
    从接口自动化测试框架设计到开发(八)--python操作数据库
    从接口自动化测试框架设计到开发(七)--cookie处理
    从接口自动化测试框架设计到开发(六)--持续集成jenkins
  • 原文地址:https://www.cnblogs.com/aiwz/p/6154636.html
Copyright © 2020-2023  润新知