我正在尝试在我的分析数据库上创建一个新角色。
我已经测试了多种组合:
当使用 Openrowset => 运行简单的 MDX 查询时,它可以工作。
运行时它可以工作。
尝试使用 openrowset=> ERROR 从 SQl 关系数据库创建新的 SSAS 角色时。
这是我正在尝试的代码
SELECT * FROM OpenRowset('MSOLAP', 'DATA SOURCE=servername; Initial Catalog=AnalysisDBName;',
'
<Create xmlns="http://schemas.microsoft.com/analysisservices/2003/engine">
<ParentObject>
<DatabaseID>AnalysisDBName</DatabaseID>
</ParentObject>
<ObjectDefinition>
<Role xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ddl2="http://schemas.microsoft.com/analysisservices/2003/engine/2" xmlns:ddl2_2="http://schemas.microsoft.com/analysisservices/2003/engine/2/2">
<ID>Role 22</ID>
<Name>Rolename</Name>
</Role>
</ObjectDefinition>
</Create>
')
我收到的错误是:
OLE DB provider "MSOLAP" for linked server "(null)" returned message "A required child element is missing under Envelope/soap:Body at line , column (namespace 'http://schemas.xmlsoap.org/soap/envelope/'). One of Fault, AuthenticateResponse, DiscoverResponse, ExecuteResponse was expected.".
Msg 7321, Level 16, State 2, Line 2
An error occurred while preparing the query "
<Create xmlns="http://schemas.microsoft.com/analysisservices/2003/engine">
<ParentObject>
<DatabaseID>AnalysisDBName</DatabaseID>
</ParentObject>
<ObjectDefinition>
<Role xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ddl2="http://schemas.microsoft.com/analysisservices/2003/engine/2" xmlns:ddl2_2="http://schemas.microsoft.com/analysisservices/2003/engine/2/2">
<ID>Role 22</ID>
<Name>Rolename</Name>
</Role>
</ObjectDefinition>
</Create>
" for execution against OLE DB provider "MSOLAP" for linked server "(null)".
请帮助 :)
问候,伊利