OpenRowSet ICommandPrepare::准备错误
我有一个 DTS 包执行了许多步骤,这些步骤在过去 100% 正确运行。 最近几周,使用 OpenRowSet 对 SQL 2000 OLAP 多维数据集执行 MDX 查询的步骤不断失败。
我知道这个问题不是 MDX 语法的问题,因为它曾经在这个包中正确运行,如果我只是执行 MDX 查询,它会返回正确的结果。
它运行的服务器是客户端服务器,因此我不能 100% 确定服务器上在过去几周内没有任何更改,但如果有更改,我不会被告知。
下面是带有 MDX 查询的 OpenRowSet 命令:
select * from
OPENROWSET('MSOLAP',
'Data Source=localhost; Initial Catalog=XVStock;',
'WITH
MEMBER [Measures].[year to date] AS ''[Measures].[Sales Qty]''
MEMBER [Measures].[Total Revenue] AS ''[Measures].[Sales Value]''
MEMBER [Measures].[Week to date Qty] AS ''Sum(Wtd([Time].[Fiscal].CurrentMember),[Measures].[Sales Qty])''
MEMBER [Measures].[Week to date Revenue] AS ''Sum(Wtd([Time].[Fiscal].CurrentMember),[Measures].[Sales Value])''
SELECT
NON EMPTY {crossjoin(
{[time].[fiscal].currentmember,
ancestor([time].[fiscal].currentmember, fyear)},
{[Measures].[SOH],
[Measures].[SOH Value],
[Measures].[Week to date Qty],
[Measures].[Week to date Revenue],
[Measures].[year to date],
[Measures].[Total Revenue]})
} ON COLUMNS,
NON EMPTY {crossjoin(
{[Supplier].[All Supplier].[ACTIVISION BLIZZARD UK LTD]
,[Supplier].[All Supplier].[BUENA VISTA]
,[Supplier].[All Supplier].[CAPCOM]
,[Supplier].[All Supplier].[CGS LTD]
,[Supplier].[All Supplier].[CODEMASTERS]
,[Supplier].[All Supplier].[ELECTRONIC ARTS]
,[Supplier].[All Supplier].[SCI]
,[Supplier].[All Supplier].[SQUARE ENIX LIMITED]
,[Supplier].[All Supplier].[EMPIRE GAMES]
,[Supplier].[All Supplier].[JOYTECH EUROPE]
,[Supplier].[All Supplier].[KONAMI UK]
,[Supplier].[All Supplier].[MICROSOFT]
,[Supplier].[All Supplier].[MIDWAY GAMES]
,[Supplier].[All Supplier].[NINTENDO UK]
,[Supplier].[All Supplier].[SONY COMPUTER ENT]
,[Supplier].[All Supplier].[SEGA EUROPE]
,[Supplier].[All Supplier].[SHERLANE AGENCIES]
,[Supplier].[All Supplier].[SOLD OUT]
,[Supplier].[All Supplier].[TAKE 2 INTERACTIVE]
,[Supplier].[All Supplier].[THQ]
,[Supplier].[All Supplier].[UBISOFT]
,[Supplier].[All Supplier].[VIVENDI UNIVERSAL GAMES]
,[Supplier].[All Supplier].[MIDIA DISTRIBUTION]
},
{[SBU Items].[All SBU Items].[TNR].[Retail].[Games Retail],
[SBU Items].[All SBU Items].[TNR].[Retail].[Games Retail].[Consoles],
[SBU Items].[All SBU Items].[TNR].[Retail].[Games Retail].[Game Accessories],
descendants([SBU Items].[All SBU Items].[TNR].[Retail].[Games Retail].[New S/W],[level 08],SELF_AND_AFTER)
}
)
} DIMENSION PROPERTIES member_caption, [SBU Items].[level 08].[sbu key], [SBU Items].[level 08].[barcode]
ON ROWS
FROM [Retail Stock Cube]
'
)
我已经检查了 DTS 包的权限,并且翻阅了大量文章,但没有取得太大成功。 微软对错误消息的评论也没有多大帮助。
我真的很感激任何建议。
I've got a DTS Package executing a number of steps that was working 100% correctly in the past.
In recent weeks it keeps failing on a step where OpenRowSet is used to perform an MDX Query against a SQL 2000 OLAP Cube.
I know the issue isn't a problem with the MDX Syntax because it used to run correctly in this package and if i just perform the MDX query it returns the correct results.
The server this runs on is a clients server so I cannot be 100% sure that nothing on the server has changed in the last few weeks but if something has changed I'm not being told about it.
Here's the OpenRowSet Command with the MDX Query:
select * from
OPENROWSET('MSOLAP',
'Data Source=localhost; Initial Catalog=XVStock;',
'WITH
MEMBER [Measures].[year to date] AS ''[Measures].[Sales Qty]''
MEMBER [Measures].[Total Revenue] AS ''[Measures].[Sales Value]''
MEMBER [Measures].[Week to date Qty] AS ''Sum(Wtd([Time].[Fiscal].CurrentMember),[Measures].[Sales Qty])''
MEMBER [Measures].[Week to date Revenue] AS ''Sum(Wtd([Time].[Fiscal].CurrentMember),[Measures].[Sales Value])''
SELECT
NON EMPTY {crossjoin(
{[time].[fiscal].currentmember,
ancestor([time].[fiscal].currentmember, fyear)},
{[Measures].[SOH],
[Measures].[SOH Value],
[Measures].[Week to date Qty],
[Measures].[Week to date Revenue],
[Measures].[year to date],
[Measures].[Total Revenue]})
} ON COLUMNS,
NON EMPTY {crossjoin(
{[Supplier].[All Supplier].[ACTIVISION BLIZZARD UK LTD]
,[Supplier].[All Supplier].[BUENA VISTA]
,[Supplier].[All Supplier].[CAPCOM]
,[Supplier].[All Supplier].[CGS LTD]
,[Supplier].[All Supplier].[CODEMASTERS]
,[Supplier].[All Supplier].[ELECTRONIC ARTS]
,[Supplier].[All Supplier].[SCI]
,[Supplier].[All Supplier].[SQUARE ENIX LIMITED]
,[Supplier].[All Supplier].[EMPIRE GAMES]
,[Supplier].[All Supplier].[JOYTECH EUROPE]
,[Supplier].[All Supplier].[KONAMI UK]
,[Supplier].[All Supplier].[MICROSOFT]
,[Supplier].[All Supplier].[MIDWAY GAMES]
,[Supplier].[All Supplier].[NINTENDO UK]
,[Supplier].[All Supplier].[SONY COMPUTER ENT]
,[Supplier].[All Supplier].[SEGA EUROPE]
,[Supplier].[All Supplier].[SHERLANE AGENCIES]
,[Supplier].[All Supplier].[SOLD OUT]
,[Supplier].[All Supplier].[TAKE 2 INTERACTIVE]
,[Supplier].[All Supplier].[THQ]
,[Supplier].[All Supplier].[UBISOFT]
,[Supplier].[All Supplier].[VIVENDI UNIVERSAL GAMES]
,[Supplier].[All Supplier].[MIDIA DISTRIBUTION]
},
{[SBU Items].[All SBU Items].[TNR].[Retail].[Games Retail],
[SBU Items].[All SBU Items].[TNR].[Retail].[Games Retail].[Consoles],
[SBU Items].[All SBU Items].[TNR].[Retail].[Games Retail].[Game Accessories],
descendants([SBU Items].[All SBU Items].[TNR].[Retail].[Games Retail].[New S/W],[level 08],SELF_AND_AFTER)
}
)
} DIMENSION PROPERTIES member_caption, [SBU Items].[level 08].[sbu key], [SBU Items].[level 08].[barcode]
ON ROWS
FROM [Retail Stock Cube]
'
)
I've checked permissions on the DTS Package and I've poured through numerous articles without much success.
Microsoft's comments on the error message aren't much help either.
I'd really appreciate any recommendations.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论