Showing posts with label failed. Show all posts
Showing posts with label failed. Show all posts

Thursday, March 22, 2012

CurrentMember failed with (Multiple Items) in the 'filter fields'

hello Smile

CurrentMember failed with (Multiple Items) in the 'filter fields' because ofcourse CurrentMember can NOT be associated with a set !!
Is there a simple way to make this Multiple-Item-safe (in the filter) ?

for example this MDX-formula:

sum(
generate
(
ascendants([Posting Period].currentmember),
iif(
[Posting Period].currentmember IS
[Posting Period].firstsibling,
{},
[Posting Period].firstsibling:
[Posting Period].prevmember
)
) + {[Posting Period].currentmember}
,
[Measures].[VRD Mutation]
)Mosha posted a good discussion of this problem on his blog quite recently:
http://www.sqljunkies.com/WebLog/mosha/archive/2005/11/18/multiselect_friendly_mdx.aspx|||Interested Big Smile

In short: use EXISTING-operator or exists-function OR remove CurrentMember statement !
But.... How about rewriting the ascendants-function (instead of descendants) into a multiselect-friendly-mdx ? (See my example above)|||

This problem raises the question of what you want to see when you select multiple members on Posting Period here - what do you want to do the cumulative sum on? I'm going to assume that you want to do the cumulative sum on the most recent selected Posting Period, and if this is correct then the following MDX should work:

sum(
generate
(
ascendants({tail(existing [Posting Period].[Day].Members,1) as myset}.item(0)),
iif(
[Posting Period].currentmember IS
[Posting Period].firstsibling,
{},
[Posting Period].firstsibling:
[Posting Period].prevmember
)
) + myset,
[Measures].[VRD Mutation]
)

Incidentally while looking at this problem, I've realised that the algorithm you're using here from Richard's site is not actually as efficient as it should be: in the scenario where you've selected a member which is the last member in its set of siblings it sums up the complete set of siblings instead of replacing the set with its parent. This effect is magnified when you have to deal with sets in the where clause in the way I've outlined, because I'm forcing everything down to the Month level - see this sample AdventureWorks query as an illustration:

WITH MEMBER MEASURES.TEST AS

GENERATE(

GENERATE(

ASCENDANTS(

{TAIL(EXISTING [Date].[Calendar].[Date].MEMBERS,1) AS MYSET}.ITEM(0)

)

,IIF( [Date].[Calendar].CURRENTMEMBER IS [Date].[Calendar].CURRENTMEMBER.FIRSTSIBLING,

{},

[Date].[Calendar].CURRENTMEMBER.FIRSTSIBLING : [Date].[Calendar].CURRENTMEMBER.PREVMEMBER

)

) + MYSET

, [Date].[Calendar].CURRENTMEMBER.NAME, "; ")

SELECT MEASURES.TEST ON 0,

[Date].[Calendar].MEMBERS

ON 1

FROM [Adventure Works]

I don't think the other (admittedly more complex) approaches on my blog suffer from this problem, so you may want to use them instead.

HTH,

Chris

sql

Thursday, March 8, 2012

Cumulative log

Is it possible to create a cumulative log using SSIS? basiclly I have 5 logs which hold failed records. I would like to create a cumulative log and send it via email using SSIS.

thoughts?

thanks

What do you mean "cumulative"? If you use a table to store your error records, you can pull in that table and send the records in an e-mail.

Though, if the records are going to be high, you may want to pull the records out to a text file and then attach that file in the Send Mail task. A better approach would be to house everything in a table and write a report against it.|||

how do you pull in different tables? via sql task? and what if you have more 1 table? you would only want to send one email with all the bad records from different tables.

|||Just create one error table. Log all of the bad records to that table and then later select from that table.|||

well all tables have different structures so a single table would not work. any other ideas?

|||If you want to combine them, you are going to have to make the structures similar at some point, right? You could use a dataflow with multiple sources to combine the tables into a flat file, then email that as an attachment.|||

I don't see an straight forward way to get all those rows into a single file/email. Perhaps, it may be easier to include just the key column(s); in such way the structure is the same for all the tables.

Friday, February 24, 2012

Cube backup job failed

Message
Executed as user: INTRANET\SSAgentTrendP1. ...ystem error: The following error occurred while the '\\?\H:\MSSQLDATA\TrendP1\Trend.0.db\Trend.0.cub\Claim Summary V.0.det\Claim Summary V.0.prt\8.fact.data' file was being copied to the 'G:\MSSQLDATA\TrendP1\Auto_before.abf' file: . at Microsoft.AnalysisServices.Xmla.XmlaClient.CheckForSoapFault(XmlReader reader, XmlaResult xmlaResult, Boolean throwIfError) at Microsoft.AnalysisServices.Xmla.XmlaClient.CheckForError(XmlReader reader, XmlaResult xmlaResult, Boolean throwIfError) at Microsoft.AnalysisServices.Xmla.XmlaClient.SendMessage(Boolean endReceivalIfException, Boolean readSession, Boolean readNamespaceCompatibility) at Microsoft.AnalysisServices.Xmla.XmlaClient.SendMessageAndReturnResult(String& result, Boolean skipResult) at Microsoft.AnalysisServices.Xmla.XmlaClient.Execute(String command, String properties, String& result, Boolean skipResult, Boolean propertiesXmlIsComplete) at Microsoft.SqlServer.Management.Smo.Olap.Soap. The step failed.

This is the job step definition:

<Backup xmlns="http://schemas.microsoft.com/analysisservices/2003/engine">
<Object>
<DatabaseID>Trend</DatabaseID>
</Object>
<File>G:\MSSQLDATA\TrendP1\Auto_before.abf</File>
<AllowOverwrite>true</AllowOverwrite>
<ApplyCompression>false</ApplyCompression>
</Backup>

This job has been running for a while. The problem started after I did a restore of the cube at one point of time.

|||

Further investigation reveals that one of the fact.data file had growed to 4G in size and the backup started to fail.

Is there a size limitation of individual partition's size in SQL Server 2005 OLAP serivice? I have searched the BOL but can't find any reference.

Thanks,

|||

according to MS it has been removed from 2 g from SSAS 2000 to no limit in SSAS 2005!! but facing same error message while backing up!!

Cube backup job failed

Message
Executed as user: INTRANET\SSAgentTrendP1. ...ystem error: The following error occurred while the '\\?\H:\MSSQLDATA\TrendP1\Trend.0.db\Trend.0.cub\Claim Summary V.0.det\Claim Summary V.0.prt\8.fact.data' file was being copied to the 'G:\MSSQLDATA\TrendP1\Auto_before.abf' file: . at Microsoft.AnalysisServices.Xmla.XmlaClient.CheckForSoapFault(XmlReader reader, XmlaResult xmlaResult, Boolean throwIfError) at Microsoft.AnalysisServices.Xmla.XmlaClient.CheckForError(XmlReader reader, XmlaResult xmlaResult, Boolean throwIfError) at Microsoft.AnalysisServices.Xmla.XmlaClient.SendMessage(Boolean endReceivalIfException, Boolean readSession, Boolean readNamespaceCompatibility) at Microsoft.AnalysisServices.Xmla.XmlaClient.SendMessageAndReturnResult(String& result, Boolean skipResult) at Microsoft.AnalysisServices.Xmla.XmlaClient.Execute(String command, String properties, String& result, Boolean skipResult, Boolean propertiesXmlIsComplete) at Microsoft.SqlServer.Management.Smo.Olap.Soap. The step failed.

This is the job step definition:

<Backup xmlns="http://schemas.microsoft.com/analysisservices/2003/engine">
<Object>
<DatabaseID>Trend</DatabaseID>
</Object>
<File>G:\MSSQLDATA\TrendP1\Auto_before.abf</File>
<AllowOverwrite>true</AllowOverwrite>
<ApplyCompression>false</ApplyCompression>
</Backup>

This job has been running for a while. The problem started after I did a restore of the cube at one point of time.

|||

Further investigation reveals that one of the fact.data file had growed to 4G in size and the backup started to fail.

Is there a size limitation of individual partition's size in SQL Server 2005 OLAP serivice? I have searched the BOL but can't find any reference.

Thanks,

|||

according to MS it has been removed from 2 g from SSAS 2000 to no limit in SSAS 2005!! but facing same error message while backing up!!

Cube backup job failed

Message
Executed as user: INTRANET\SSAgentTrendP1. ...ystem error: The following error occurred while the '\\?\H:\MSSQLDATA\TrendP1\Trend.0.db\Trend.0.cub\Claim Summary V.0.det\Claim Summary V.0.prt\8.fact.data' file was being copied to the 'G:\MSSQLDATA\TrendP1\Auto_before.abf' file: . at Microsoft.AnalysisServices.Xmla.XmlaClient.CheckForSoapFault(XmlReader reader, XmlaResult xmlaResult, Boolean throwIfError) at Microsoft.AnalysisServices.Xmla.XmlaClient.CheckForError(XmlReader reader, XmlaResult xmlaResult, Boolean throwIfError) at Microsoft.AnalysisServices.Xmla.XmlaClient.SendMessage(Boolean endReceivalIfException, Boolean readSession, Boolean readNamespaceCompatibility) at Microsoft.AnalysisServices.Xmla.XmlaClient.SendMessageAndReturnResult(String& result, Boolean skipResult) at Microsoft.AnalysisServices.Xmla.XmlaClient.Execute(String command, String properties, String& result, Boolean skipResult, Boolean propertiesXmlIsComplete) at Microsoft.SqlServer.Management.Smo.Olap.Soap. The step failed.

This is the job step definition:

<Backup xmlns="http://schemas.microsoft.com/analysisservices/2003/engine">
<Object>
<DatabaseID>Trend</DatabaseID>
</Object>
<File>G:\MSSQLDATA\TrendP1\Auto_before.abf</File>
<AllowOverwrite>true</AllowOverwrite>
<ApplyCompression>false</ApplyCompression>
</Backup>

This job has been running for a while. The problem started after I did a restore of the cube at one point of time.

|||

Further investigation reveals that one of the fact.data file had growed to 4G in size and the backup started to fail.

Is there a size limitation of individual partition's size in SQL Server 2005 OLAP serivice? I have searched the BOL but can't find any reference.

Thanks,

|||

according to MS it has been removed from 2 g from SSAS 2000 to no limit in SSAS 2005!! but facing same error message while backing up!!