我有一个DTS包执行了一些过去正常工作的步骤。 最近几周,它一直在使用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包的权限,我已经倾注了大量文章而没有取得多大成功。 微软对错误消息的评论也没有多大帮助。
我真的很感激任何建议。