Showing posts with label sp2. Show all posts
Showing posts with label sp2. Show all posts

Thursday, March 22, 2012

Analysis Server 2005 (SP2, Version 9.0.3042) returns wrong results (from cache)

In some cases the Analysis Server returns wrong results: If You at first make
a query containing several restrictions and after that make a similar query with less
restrictions, You sometimes get the result of the first query (which is wrong
for the second query).

Of course this error does not occur in every situation. In our environment it occurs
when CustomRollupFormulas of ParentChild-Dimensions are involved.

My questions:
- Has anyone seen this error before?
- Is there a way to report this as an error to microsoft?
- Are bug fixes or workaround available?
(At the moment we have SQL Server 2005 SP2, Version 9.0.3042)

Any help is welcome.


The following contains a description of a small sample where this error occurs.
(A Cubedefinition and the underlying Datawarehouse can be provided).
Detailled Description:
=====================

The OLAP-Database contains:
- A Year dimension with one member '2007'
(to make this example simple we have no quarters, months and so on)
- An Account dimension with Attributes "Key", "UserKey" and "Type" and 3 elements:
Key: UserKey: Type:
1 "1000" A
2 "2000" B
3 "3000" C
- A dimension for KPIs with Attributes "Key" and "Parent". "Parent" is a ParentChild
Dimension. This dimension has a CustomRollupColumn with MDX-Formulas.
The dimension has two elements:
Key: Designation: Parent: MDX-Forumula
-1 All NULL NULL
1 KPI 1 NULL Sum(
Filter(
CrossJoin(
{
([Account].[UserKey].&[1000]:
[Account].[UserKey].&[3000])
},
[KPI].[Parent].&[-1]
),
[Measures].CurrentMember > 0
)
)
- A fact-table with 3 lines:
AccountKey: Amount: Year: KPIKey
1 1000.00 2007 -1
2 2000.00 2007 -1
3 -4000.00 2007 -1

We use two Queries:
- Query 1:
SELECT {[Measures].[Amount]} ON 0,
NON EMPTY
AddCalculatedMembers(
Hierarchize(
Descendants(
{[Year].[Key].&[2007]},
[Year].[Key].[Key],
SELF_AND_BEFORE
)
)
)
DIMENSION PROPERTIES PARENT_UNIQUE_NAME,MEMBER_TYPE ON 1
FROM [PRO110530]
WHERE(
{
[Account].[Type].&[Type A],
[Account].[Type].&[Type C]
},
[KPI].[Parent].&[1]
);

This query first restricts the accounts to "1000" (Type A) und "3000" (Type C)
and the formula of "KPI 1" filters out account "3000".

The correct result is "1000.00".

- Query 2:
SELECT {[Measures].[Amount]} ON 0,
NON EMPTY
AddCalculatedMembers(
Hierarchize(
Descendants(
{[Year].[Key].&[2007]},
[Year].[Key].[Key],
SELF_AND_BEFORE
)
)
)
DIMENSION PROPERTIES PARENT_UNIQUE_NAME,MEMBER_TYPE ON 1
FROM [PRO110530]
WHERE(
[KPI].[Parent].&[1]
);
This query is nearly the same as query 1, but the accounts are not filtered out
by their type. Therefore the formula of "KPI 1" applies to all accounts and
only account "3000" is filtered out.

The correct result is "3000.00" (Sum of accounts "1000" and "2000")

Analysis Server returns this result if You run Query 2 as first query.

The error occurs in the following case:
- Process the cube (or restart) the Analysis Server.
- Connect to the database.
- Run Query1:
The server returns result: "1000.00". That's correct.
- Run Query2 (on the same connection):
The server returns result: "1000.00". That's wrong.

The error does not occur in the following cases:
- If you restart the server between Query1 and Query2.
(That is no pratical workaround).
- If You do not put the Year-dimension on Axis 1
(In real life that is no practical workaround, because we have a more complex
Time-dimension and want for instance to see two years on Axis 1)
- If You use different connections for the two Queries
(That is no workaround for us, because we use a third-party tool, which
calls the Analysis Server)
- If You add the VisualTotals-function to the MDX for Axis 1
(That is a bad workaround, because the runtime of complex KPIs rises up significantly)

It's hard to tell, but it almost feels like an issue with the formula cache.

Your options would be

1. Ring Product Support - If you need to get a fix in a timely manner, then this is your best bet. You would have to check when you call, but I think you would get your fee refunded if the call is confirmed as a bug in the product.

2. You could log the bug in the SQL Server section on the connect website connect.microsoft.com, but you are not guarenteed of a timely response (the product team does go through these issues, but there is just no telling when this will happen)

It could be something to do with the CustomRollup formulas, have you tried turning off the custom rollups and moving the calc into a scope statement in the calc script? If this work around does fix your issue I would still encourage you to log a bug on connect.

|||

Other than filing a bug, if you need an immediate workaround, try issuing the following ClearCache command through XML/A between the two queries.

<Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/">

<Body>

<Execute xmlns="urnTongue Tiedchemas-microsoft-com:xml-analysis">

<Command>

<Batch xmlns="http://schemas.microsoft.com/analysisservices/2003/engine">

<ClearCache>

<Object>

<DatabaseID>Your Database ID</DatabaseID>

</Object>

</ClearCache>

</Batch>

</Command>

<Properties/>

</Execute>

</Body>

</Envelope>

|||

Good idea Jeffrey, I did think of this, but forgot to mention it. If it is a cache issue this would probably work too. The only issue being that you cannot "chain" this command onto the start or the end of a query, so the problem then becomes "how do we know when to run this command".

I also have a variation on this command wrapped in a stored proc on the AS Stored Procedure project on codeplex www.codeplex.com/asstoredprocedures - it is not part of the lastest release, you would have to download the source and compile it (we are planning to compile another release soon), there is docmentation on this command on the codeplex site.

|||

Darren and Jeffrey,

thank Your for the replies.

Unfortunately I can't clear the cache, because I only fill the OLAP-Database and the Database is called by a third party tool.

Therefore I will report this problem to Microsoft Product Support at next.

Hopefully they know a workaround or have a hotfix.

|||

We reported the error to Microsoft report. I'm citing from the answer:

"...the problem is really because of the CustomRollupFormula, where we are seeing performance issues as well as problems like yours. Our developer team recommended that these people should start using “Cache Policy = 9” with SP2 in order to obtain better performance (connection string setting). Now, Cache Policy is not doable in SSMS or BIDS, so what you can do is to change this setting server wide by changing inside the msmdsrv.ini: <CalculationCoverPolicy>9</CalculationCoverPolicy> Rebooting the server will use this new setting. Something to remember is that this will change the behavior of the query engine. So, some of your queries will go faster and some slower. So, remember that and monitor the server."

We changed this setting and the error does not occur anymore. Moreover the performance of some testcases which use custom rollup formulas was significantly better. I hope the overall performance of the system remains OK with this setting.

My question at this point is: Custom Rollup Formulas are a very powerful part of Analysis Services -- You can create very interesting solutions with them. But it seems to me that the use of Custom Rollup Formulas is not in the main focus of the Analysis Services development team. Otherwise I could not explain the error and performance problems in SP2 (the performance in SP1 was better!). Perhaps it would help, if Microsoft has real-life examples of the usage of this feature. Is it possible to establish a deeper contact between the development team and users of custom rollup formulas to exchange testcases and experiences for this topic?

|||have you written any custom aggregations - either through xlma or the aggregation design wizard?

Analysis Server 2005 (SP2, Version 9.0.3042) returns wrong results (from cache)

In some cases the Analysis Server returns wrong results: If You at first make
a query containing several restrictions and after that make a similar query with less
restrictions, You sometimes get the result of the first query (which is wrong
for the second query).

Of course this error does not occur in every situation. In our environment it occurs
when CustomRollupFormulas of ParentChild-Dimensions are involved.

My questions:
- Has anyone seen this error before?
- Is there a way to report this as an error to microsoft?
- Are bug fixes or workaround available?
(At the moment we have SQL Server 2005 SP2, Version 9.0.3042)

Any help is welcome.


The following contains a description of a small sample where this error occurs.
(A Cubedefinition and the underlying Datawarehouse can be provided).
Detailled Description:
=====================

The OLAP-Database contains:
- A Year dimension with one member '2007'
(to make this example simple we have no quarters, months and so on)
- An Account dimension with Attributes "Key", "UserKey" and "Type" and 3 elements:
Key: UserKey: Type:
1 "1000" A
2 "2000" B
3 "3000" C
- A dimension for KPIs with Attributes "Key" and "Parent". "Parent" is a ParentChild
Dimension. This dimension has a CustomRollupColumn with MDX-Formulas.
The dimension has two elements:
Key: Designation: Parent: MDX-Forumula
-1 All NULL NULL
1 KPI 1 NULL Sum(
Filter(
CrossJoin(
{
([Account].[UserKey].&[1000]:
[Account].[UserKey].&[3000])
},
[KPI].[Parent].&[-1]
),
[Measures].CurrentMember > 0
)
)
- A fact-table with 3 lines:
AccountKey: Amount: Year: KPIKey
1 1000.00 2007 -1
2 2000.00 2007 -1
3 -4000.00 2007 -1

We use two Queries:
- Query 1:
SELECT {[Measures].[Amount]} ON 0,
NON EMPTY
AddCalculatedMembers(
Hierarchize(
Descendants(
{[Year].[Key].&[2007]},
[Year].[Key].[Key],
SELF_AND_BEFORE
)
)
)
DIMENSION PROPERTIES PARENT_UNIQUE_NAME,MEMBER_TYPE ON 1
FROM [PRO110530]
WHERE(
{
[Account].[Type].&[Type A],
[Account].[Type].&[Type C]
},
[KPI].[Parent].&[1]
);

This query first restricts the accounts to "1000" (Type A) und "3000" (Type C)
and the formula of "KPI 1" filters out account "3000".

The correct result is "1000.00".

- Query 2:
SELECT {[Measures].[Amount]} ON 0,
NON EMPTY
AddCalculatedMembers(
Hierarchize(
Descendants(
{[Year].[Key].&[2007]},
[Year].[Key].[Key],
SELF_AND_BEFORE
)
)
)
DIMENSION PROPERTIES PARENT_UNIQUE_NAME,MEMBER_TYPE ON 1
FROM [PRO110530]
WHERE(
[KPI].[Parent].&[1]
);
This query is nearly the same as query 1, but the accounts are not filtered out
by their type. Therefore the formula of "KPI 1" applies to all accounts and
only account "3000" is filtered out.

The correct result is "3000.00" (Sum of accounts "1000" and "2000")

Analysis Server returns this result if You run Query 2 as first query.

The error occurs in the following case:
- Process the cube (or restart) the Analysis Server.
- Connect to the database.
- Run Query1:
The server returns result: "1000.00". That's correct.
- Run Query2 (on the same connection):
The server returns result: "1000.00". That's wrong.

The error does not occur in the following cases:
- If you restart the server between Query1 and Query2.
(That is no pratical workaround).
- If You do not put the Year-dimension on Axis 1
(In real life that is no practical workaround, because we have a more complex
Time-dimension and want for instance to see two years on Axis 1)
- If You use different connections for the two Queries
(That is no workaround for us, because we use a third-party tool, which
calls the Analysis Server)
- If You add the VisualTotals-function to the MDX for Axis 1
(That is a bad workaround, because the runtime of complex KPIs rises up significantly)

It's hard to tell, but it almost feels like an issue with the formula cache.

Your options would be

1. Ring Product Support - If you need to get a fix in a timely manner, then this is your best bet. You would have to check when you call, but I think you would get your fee refunded if the call is confirmed as a bug in the product.

2. You could log the bug in the SQL Server section on the connect website connect.microsoft.com, but you are not guarenteed of a timely response (the product team does go through these issues, but there is just no telling when this will happen)

It could be something to do with the CustomRollup formulas, have you tried turning off the custom rollups and moving the calc into a scope statement in the calc script? If this work around does fix your issue I would still encourage you to log a bug on connect.

|||

Other than filing a bug, if you need an immediate workaround, try issuing the following ClearCache command through XML/A between the two queries.

<Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/">

<Body>

<Execute xmlns="urnTongue Tiedchemas-microsoft-com:xml-analysis">

<Command>

<Batch xmlns="http://schemas.microsoft.com/analysisservices/2003/engine">

<ClearCache>

<Object>

<DatabaseID>Your Database ID</DatabaseID>

</Object>

</ClearCache>

</Batch>

</Command>

<Properties/>

</Execute>

</Body>

</Envelope>

|||

Good idea Jeffrey, I did think of this, but forgot to mention it. If it is a cache issue this would probably work too. The only issue being that you cannot "chain" this command onto the start or the end of a query, so the problem then becomes "how do we know when to run this command".

I also have a variation on this command wrapped in a stored proc on the AS Stored Procedure project on codeplex www.codeplex.com/asstoredprocedures - it is not part of the lastest release, you would have to download the source and compile it (we are planning to compile another release soon), there is docmentation on this command on the codeplex site.

|||

Darren and Jeffrey,

thank Your for the replies.

Unfortunately I can't clear the cache, because I only fill the OLAP-Database and the Database is called by a third party tool.

Therefore I will report this problem to Microsoft Product Support at next.

Hopefully they know a workaround or have a hotfix.

|||

We reported the error to Microsoft report. I'm citing from the answer:

"...the problem is really because of the CustomRollupFormula, where we are seeing performance issues as well as problems like yours. Our developer team recommended that these people should start using “Cache Policy = 9” with SP2 in order to obtain better performance (connection string setting). Now, Cache Policy is not doable in SSMS or BIDS, so what you can do is to change this setting server wide by changing inside the msmdsrv.ini: <CalculationCoverPolicy>9</CalculationCoverPolicy> Rebooting the server will use this new setting. Something to remember is that this will change the behavior of the query engine. So, some of your queries will go faster and some slower. So, remember that and monitor the server."

We changed this setting and the error does not occur anymore. Moreover the performance of some testcases which use custom rollup formulas was significantly better. I hope the overall performance of the system remains OK with this setting.

My question at this point is: Custom Rollup Formulas are a very powerful part of Analysis Services -- You can create very interesting solutions with them. But it seems to me that the use of Custom Rollup Formulas is not in the main focus of the Analysis Services development team. Otherwise I could not explain the error and performance problems in SP2 (the performance in SP1 was better!). Perhaps it would help, if Microsoft has real-life examples of the usage of this feature. Is it possible to establish a deeper contact between the development team and users of custom rollup formulas to exchange testcases and experiences for this topic?

|||have you written any custom aggregations - either through xlma or the aggregation design wizard?

Tuesday, March 20, 2012

An unexpected error occurred while connecting to the report server.

I have a distributed environment with SQL Server 2005 SP2 (RTM) running on one server. This server holds the databases for SharePoint and Reporting Services. I then have SharePoint 3.0 (32-bit version) with the reporting services add-in installed on a second server. I installed the sharepoint object model (64-bit version) on the database server as suggested and have configured Reporting Services to use domain user accounts. The Reporting Services configuration tool is reporting that integration has been successfully set up but I am unable to access the "Set Server Defaults" page without an error. This is the error I receive:

An unexpected error occurred while connecting to the report server. Verify that the report server is available and configured for SharePoint integrated mode.

Please help.

Solaena,

I would suggest to take a look at the Report Server log files located on your Report Server machine in this location:

%Program Files%\Microsoft SQL Server\MSSQL.X\Reporting Services\LogFiles

Look for a log file whose name starts with ReportServerService and see what exception you find there.

Mihaela

This posting is provided "AS IS" with no warranties, and confers no rights.

|||

After some digging I found an error message that led me to this thread: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1282744&SiteID=1

I am now able to access the "Set Server Defaults" page but I am unable to open any reports and I can't add any reports to the web part. From what I can see I have two errors.

#1 - When adding a report to the web part I am denied access. Access is denied to my domain/user account. This account is a domain admin account.

#2 - NULL Reference exception at "...InternalFindObjectsNonRecursive."

Thanks,

Simone

|||Just thought I would updat that I have been working with Microsoft on this for a few weeks and I will post the outcome when it is resolved. Thanks to all for you insight.|||Just thought I would update everyone on this thread, we were finally able to get all of the integration working. To complete the process we needed to use Kerberos authentication and ensure that the browsers were all set up to enable windows authentication. With Kerberos it is important to be sure that SPNs are set up for the domain account used by the sharepoint and reporting service web services. When doing this, also make sure that duplicate SPNs are not inadvertently created. After two months of working to get this resolved I am thrilled to say we are up and running....|||

Hi Simone,

Did you have to create a SPN for just the MOSS site url or both the MOSS and reportserver url ?

Regards,

BC

|||

both servers. also, there is one for just the server name and one for the fully qualified name.

Simone

An unexpected error occurred while connecting to the report server.

I have a distributed environment with SQL Server 2005 SP2 (RTM) running on one server. This server holds the databases for SharePoint and Reporting Services. I then have SharePoint 3.0 (32-bit version) with the reporting services add-in installed on a second server. I installed the sharepoint object model (64-bit version) on the database server as suggested and have configured Reporting Services to use domain user accounts. The Reporting Services configuration tool is reporting that integration has been successfully set up but I am unable to access the "Set Server Defaults" page without an error. This is the error I receive:

An unexpected error occurred while connecting to the report server. Verify that the report server is available and configured for SharePoint integrated mode.

Please help.

Solaena,

I would suggest to take a look at the Report Server log files located on your Report Server machine in this location:

%Program Files%\Microsoft SQL Server\MSSQL.X\Reporting Services\LogFiles

Look for a log file whose name starts with ReportServerService and see what exception you find there.

Mihaela

This posting is provided "AS IS" with no warranties, and confers no rights.

|||

After some digging I found an error message that led me to this thread: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1282744&SiteID=1

I am now able to access the "Set Server Defaults" page but I am unable to open any reports and I can't add any reports to the web part. From what I can see I have two errors.

#1 - When adding a report to the web part I am denied access. Access is denied to my domain/user account. This account is a domain admin account.

#2 - NULL Reference exception at "...InternalFindObjectsNonRecursive."

Thanks,

Simone

|||Just thought I would updat that I have been working with Microsoft on this for a few weeks and I will post the outcome when it is resolved. Thanks to all for you insight.|||Just thought I would update everyone on this thread, we were finally able to get all of the integration working. To complete the process we needed to use Kerberos authentication and ensure that the browsers were all set up to enable windows authentication. With Kerberos it is important to be sure that SPNs are set up for the domain account used by the sharepoint and reporting service web services. When doing this, also make sure that duplicate SPNs are not inadvertently created. After two months of working to get this resolved I am thrilled to say we are up and running....|||

Hi Simone,

Did you have to create a SPN for just the MOSS site url or both the MOSS and reportserver url ?

Regards,

BC

|||

both servers. also, there is one for just the server name and one for the fully qualified name.

Simone

An unexpected error occurred while connecting to the report server.

I have a distributed environment with SQL Server 2005 SP2 (RTM) running on one server. This server holds the databases for SharePoint and Reporting Services. I then have SharePoint 3.0 (32-bit version) with the reporting services add-in installed on a second server. I installed the sharepoint object model (64-bit version) on the database server as suggested and have configured Reporting Services to use domain user accounts. The Reporting Services configuration tool is reporting that integration has been successfully set up but I am unable to access the "Set Server Defaults" page without an error. This is the error I receive:

An unexpected error occurred while connecting to the report server. Verify that the report server is available and configured for SharePoint integrated mode.

Please help.

Solaena,

I would suggest to take a look at the Report Server log files located on your Report Server machine in this location:

%Program Files%\Microsoft SQL Server\MSSQL.X\Reporting Services\LogFiles

Look for a log file whose name starts with ReportServerService and see what exception you find there.

Mihaela

This posting is provided "AS IS" with no warranties, and confers no rights.

|||

After some digging I found an error message that led me to this thread: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1282744&SiteID=1

I am now able to access the "Set Server Defaults" page but I am unable to open any reports and I can't add any reports to the web part. From what I can see I have two errors.

#1 - When adding a report to the web part I am denied access. Access is denied to my domain/user account. This account is a domain admin account.

#2 - NULL Reference exception at "...InternalFindObjectsNonRecursive."

Thanks,

Simone

|||Just thought I would updat that I have been working with Microsoft on this for a few weeks and I will post the outcome when it is resolved. Thanks to all for you insight.|||Just thought I would update everyone on this thread, we were finally able to get all of the integration working. To complete the process we needed to use Kerberos authentication and ensure that the browsers were all set up to enable windows authentication. With Kerberos it is important to be sure that SPNs are set up for the domain account used by the sharepoint and reporting service web services. When doing this, also make sure that duplicate SPNs are not inadvertently created. After two months of working to get this resolved I am thrilled to say we are up and running....|||

Hi Simone,

Did you have to create a SPN for just the MOSS site url or both the MOSS and reportserver url ?

Regards,

BC

|||

both servers. also, there is one for just the server name and one for the fully qualified name.

Simone

An unexpected error occurred while connecting to the report server.

I have a distributed environment with SQL Server 2005 SP2 (RTM) running on one server. This server holds the databases for SharePoint and Reporting Services. I then have SharePoint 3.0 (32-bit version) with the reporting services add-in installed on a second server. I installed the sharepoint object model (64-bit version) on the database server as suggested and have configured Reporting Services to use domain user accounts. The Reporting Services configuration tool is reporting that integration has been successfully set up but I am unable to access the "Set Server Defaults" page without an error. This is the error I receive:

An unexpected error occurred while connecting to the report server. Verify that the report server is available and configured for SharePoint integrated mode.

Please help.

Solaena,

I would suggest to take a look at the Report Server log files located on your Report Server machine in this location:

%Program Files%\Microsoft SQL Server\MSSQL.X\Reporting Services\LogFiles

Look for a log file whose name starts with ReportServerService and see what exception you find there.

Mihaela

This posting is provided "AS IS" with no warranties, and confers no rights.

|||

After some digging I found an error message that led me to this thread: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1282744&SiteID=1

I am now able to access the "Set Server Defaults" page but I am unable to open any reports and I can't add any reports to the web part. From what I can see I have two errors.

#1 - When adding a report to the web part I am denied access. Access is denied to my domain/user account. This account is a domain admin account.

#2 - NULL Reference exception at "...InternalFindObjectsNonRecursive."

Thanks,

Simone

|||Just thought I would updat that I have been working with Microsoft on this for a few weeks and I will post the outcome when it is resolved. Thanks to all for you insight.|||Just thought I would update everyone on this thread, we were finally able to get all of the integration working. To complete the process we needed to use Kerberos authentication and ensure that the browsers were all set up to enable windows authentication. With Kerberos it is important to be sure that SPNs are set up for the domain account used by the sharepoint and reporting service web services. When doing this, also make sure that duplicate SPNs are not inadvertently created. After two months of working to get this resolved I am thrilled to say we are up and running....|||

Hi Simone,

Did you have to create a SPN for just the MOSS site url or both the MOSS and reportserver url ?

Regards,

BC

|||

both servers. also, there is one for just the server name and one for the fully qualified name.

Simone

sql

An unexpected error occurred while connecting to the report server.

I have a distributed environment with SQL Server 2005 SP2 (RTM) running on one server. This server holds the databases for SharePoint and Reporting Services. I then have SharePoint 3.0 (32-bit version) with the reporting services add-in installed on a second server. I installed the sharepoint object model (64-bit version) on the database server as suggested and have configured Reporting Services to use domain user accounts. The Reporting Services configuration tool is reporting that integration has been successfully set up but I am unable to access the "Set Server Defaults" page without an error. This is the error I receive:

An unexpected error occurred while connecting to the report server. Verify that the report server is available and configured for SharePoint integrated mode.

Please help.

Solaena,

I would suggest to take a look at the Report Server log files located on your Report Server machine in this location:

%Program Files%\Microsoft SQL Server\MSSQL.X\Reporting Services\LogFiles

Look for a log file whose name starts with ReportServerService and see what exception you find there.

Mihaela

This posting is provided "AS IS" with no warranties, and confers no rights.

|||

After some digging I found an error message that led me to this thread: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1282744&SiteID=1

I am now able to access the "Set Server Defaults" page but I am unable to open any reports and I can't add any reports to the web part. From what I can see I have two errors.

#1 - When adding a report to the web part I am denied access. Access is denied to my domain/user account. This account is a domain admin account.

#2 - NULL Reference exception at "...InternalFindObjectsNonRecursive."

Thanks,

Simone

|||Just thought I would updat that I have been working with Microsoft on this for a few weeks and I will post the outcome when it is resolved. Thanks to all for you insight.|||Just thought I would update everyone on this thread, we were finally able to get all of the integration working. To complete the process we needed to use Kerberos authentication and ensure that the browsers were all set up to enable windows authentication. With Kerberos it is important to be sure that SPNs are set up for the domain account used by the sharepoint and reporting service web services. When doing this, also make sure that duplicate SPNs are not inadvertently created. After two months of working to get this resolved I am thrilled to say we are up and running....|||

Hi Simone,

Did you have to create a SPN for just the MOSS site url or both the MOSS and reportserver url ?

Regards,

BC

|||

both servers. also, there is one for just the server name and one for the fully qualified name.

Simone

Saturday, February 25, 2012

AmoAdventureWorks sample problems.

Can execute the above sample (on XP Pro SP2) successfully once. Subsequent attempts result in error below(after grabbing all system resources for a few minutes). Tried deleting the database and then stop starting the server before retrying - to no avail.

Kind of sapping my confidence in AMO objects.

Any ideas?

Thanks in advance

Zub

--

Unhandled Exception: System.Data.OleDb.OleDbException: Deferred prepare could no

t be completed.

Query timeout expired

at System.Data.OleDb.OleDbDataReader.ProcessResults(OleDbHResult hr)

at System.Data.OleDb.OleDbDataReader.BuildSchemaTableRowset(Object handle)

at System.Data.OleDb.OleDbDataReader.GenerateSchemaTable(OleDbDataReader data

Reader, Object handle, CommandBehavior behavior)

at System.Data.OleDb.OleDbCommand.ExecuteReaderInternal(CommandBehavior behav

ior, String method)

at System.Data.OleDb.OleDbCommand.ExecuteReader(CommandBehavior behavior)

at System.Data.OleDb.OleDbCommand.System.Data.IDbCommand.ExecuteReader(Comman

dBehavior behavior)

at System.Data.Common.DbDataAdapter.FillSchemaInternal(DataSet dataset, DataT

able datatable, SchemaType schemaType, IDbCommand command, String srcTable, Comm

andBehavior behavior)

at System.Data.Common.DbDataAdapter.FillSchema(DataSet dataSet, SchemaType sc

hemaType, IDbCommand command, String srcTable, CommandBehavior behavior)

at System.Data.Common.DbDataAdapter.FillSchema(DataSet dataSet, SchemaType sc

hemaType, String srcTable)

at Microsoft.Samples.SqlServer.Program.AddTable(DataSourceView dsv, OleDbConn

ection connection, String tableName) in AmoAdventure

Works\Program.cs:line 239

at Microsoft.Samples.SqlServer.Program.CreateDataSourceView(Database db) in AmoAdventureWorks\Program.cs:line 211

at Microsoft.Samples.SqlServer.Program.CreateAndProcessDatabase(Server svr) in AmoAdventureWorks\Program.cs:line 72

at Microsoft.Samples.SqlServer.Program.Main() in

AmoAdventureWorks\Program.cs:line 48

The sample application assumes you have installed SQL Server on the same machine you have your Analysis Server.

And you have attached sample AdventureWorksDW SQL database. Search for "connectionString" in your project and you be able to point it to any SQL Server you have AdventureWorksDW database.

Edward.
--
This posting is provided "AS IS" with no warranties, and confers no rights.

|||

Edward I'm not sure what you are suggesting.

I have SQL Server Anaylsis Server and AMOAdventureWorks.exe all running on the same machine.

The point is that it works once. The AS database is created, cubes defined and populated. The problem is that subsequent exceutions fail.

Thanks

Zub

|||

The error message suggests problems with connecting to relational database.

AMOAdventureWorks creates a AS database and populates it with data from SQL server you installed locally. Is it possible that SQL server was unavalible?

I've tried to run AMOAdventureWorks several times. And it worked without a problem.

Try running it in the debugger and see exactly where it fails.

Edward.
--
This posting is provided "AS IS" with no warranties, and confers no rights.

|||

Edward

Thanks for the response.

OK I'm debugging.

Rebooted machine. Ran the program once - it succeeded.

Second time I get a IndexOutofRangeException on the line

DataTable dataTable = dataTables[0];

in

static void AddTable(DataSourceView dsv, OleDbConnection connection, String tableName)

{

OleDbDataAdapter adapter = new OleDbDataAdapter(

"SELECT * FROM [dbo].[" + tableName + "] WHERE 1=0",

connection);

DataTable[] dataTables = adapter.FillSchema(dsv.Schema,

SchemaType.Mapped, tableName);

DataTable dataTable = dataTables[0];

......

when called from

AddTable(dsv, connection, "DimCustomer");

rgds

Zub

|||

Couple things I notice in the code.

1) It works the first time but not the second time. Does your table name exist in DB when you pass in second time?

2) If you pass same table name on second time, it does not make sense because DimCustomer is already in dsv.Schema after you call it first time. This is redundent.

Try replacing with following lines and see if you can get the table everytime you call.

DataSet dataSet = new DataSet();

DataTable[] dataTables = adapter.FillSchema(dataSet,

SchemaType.Mapped, tableName);

3) Anyway, you don't use any AMO object except in the line of doing FillSchema. If you still have problem as my suggestion in Step 2, then it must be the connection problem. Check if the table exists in the DB and valid permission to access that table as well.

|||

Sorry I just notice one more thing.

You got Query time out error on second time. Is your table a big table or a complicated view when you call second time? It seems that it took a lot of time to execute the statement. You may want to increase the connection time out in your connection or set it to unlimited.

Also, you can try the same SQL Statement "Select * from [dbo].[DimCustomer] where 1=0" as New query in SQL Management studio. See how long it takes to get the result.