Tuesday, December 23, 2014

Problems with SQL Native Client 11 provider in SSAS datasource


After getting the cube to successfully deploy and process on Friday, I was baffled on Monday that the newly added dimension caused the cube processing to break.  I then followed the first instinct, discarded all my changes to reverted back to the version on Friday, and had no luck.  The error message (attached below) did not help as I was looking for some kind of SQL service error.  After examining the windows server log and the SQL server log, I just couldn't see anything wrong with it.

After swearing for some time, and with the help of going off and working on something else for a while.  I came back to the solution and looked at the data source.  Even though I know I have never changed the provider (the default setup gave me SQL native client), I decided to change it and give OLE DB a try.



This simple change allows my cube to process successfully again.  While I don't understand why the same settings that worked last week doesn't work this week, I don't have all the information to say with certainty that nothing has changed in the environment (firewall changes, server updates, etc.).

SSAS processing error:

<Batch xmlns="http://schemas.microsoft.com/analysisservices/2003/engine">
  <Parallel>
    <Process 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" xmlns:ddl100_100="http://schemas.microsoft.com/analysisservices/2008/engine/100/100" xmlns:ddl200="http://schemas.microsoft.com/analysisservices/2010/engine/200" xmlns:ddl200_200="http://schemas.microsoft.com/analysisservices/2010/engine/200/200">
      <Object>
        <DatabaseID>DWH Sales Facts</DatabaseID>
        <CubeID>DWH Sales Facts</CubeID>
      </Object>
      <Type>ProcessFull</Type>
      <WriteBackTableCreation>UseExisting</WriteBackTableCreation>
    </Process>
  </Parallel>
</Batch>
                Processing Dimension 'Date' completed.
                                
Errors and Warnings from Response
                OLE DB error: OLE DB or ODBC error: A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online.; 08001; Client unable to establish connection; 08001; Encryption not supported on the client.; 08001.
                Errors in the high-level relational engine. A connection could not be made to the data source with the DataSourceID of 'DWH Sales Facts', Name of 'DWH Sales Facts'.
                Errors in the OLAP storage engine: An error occurred while the dimension, with the ID of 'Currency', Name of 'Currency' was being processed.
                Errors in the OLAP storage engine: An error occurred while the 'Currency Dim ID' attribute of the 'Currency' dimension from the 'DWH Sales Facts' database was being processed.
                Internal error: The operation terminated unsuccessfully.
                Server: The operation has been cancelled.


Source: http://geekswithblogs.net/LifeLongTechie/archive/2012/06/21/ssas-processing-error-client-unable-to-establish-connection-08001-encryption.aspx

Saturday, August 23, 2014

How to create a single Calendar to manage different tasks in sharepoint

Introduction


Many teams require to have different tasks scheduled among different team members. In order to do that there’s a feature in Sharepoint that allow teams to create Calendar lists that are shared to everyone who will have access to it, being able to create tasks and assign them to one or more workers. Unfortunately many teams create a calendar for each kind of task they need to get organized.

The purpose of this document is to provide some guidance to application teams, and more specifically to members of the team who are administering their team site, in order to create a unique calendar that would be able to host up to 10 different kind of tasks, being identified by different colors.

Prerequisites: Configuration must be done by a user who has site admin access.

Steps


Go to “All site content” in Site Actions


Click in Create, and look for the Calendar inside the List section. Give it a name and click Create.



Now access the calendar, and go to Calendar Tools > Calendar tab. Then click on Create column.


This form will contain the information about the different type of tasks you want to introduce in the single calendar. Fill in with the following information (the others should remain as default):
Column Type: Choice
Require that this column contains information: Yes
Type each choice in a separate line: [as required from the implementer]

Now you will have to create a view per choice you introduced in the step above. Go to Create View and select the standard view




Just go to the Filter section and add a filter by the column you just created and fill where it says “equals to” and introduce your first choice. The rest can be default if you don’t know what to change.

After you create all these views, go to the calendar again and click on Calendars Overlay  and then click on New Calendar



Now complete all the information required. Where it says Web URL just introduce your Site collection URL and then click in Resolve. Lists and Lists view will populate with the information retrieved. You should select the Calendar list and the View you are adding right now to the overlayed calendar. Select the Always show option as well as choosing th ecolor you want.

Do the same for the other views until you have them listed:

Finally, in order to tweak the Overlayed calendar properly, go to the Calendar View and click on “Modify this view”. What we are going to do is to remove those duplicated events that may appear if you now try to create a new event with one of th custom calendars overlayed.

We will apply now a filter using the Column we created before, but in “Equals to” leave it in blank.

Its done. Now in order to test it, create a new event

At the end you will see the new field added that will be required to input

Now the calendar will look like this:

Monday, August 18, 2014

Understanding risks of segment table in Reporting Services

Recently I have been struggling with a problem we found in our staging ReportServer database where table Segment was occupying 99% of all the space assigned for the whole database, and talking about numbers it was almost 150 gigabytes (Take into account we had many users and reports on that environment). We raise this as a concern and start comparing the production environment with the staging one. Production was having no more than 20 gigabytes so clearly there was a problem out there.

2 links that I took into account for my research were:
http://social.msdn.microsoft.com/Forums/sqlserver/en-US/333cff93-46b3-4e94-93aa-164963cafd18/cleaning-up-reportservertempdb-segment-and-related-tables

http://www.sqlservercentral.com/Forums/Topic1183933-1550-1.aspx

both of them are suggesting to delete data or truncating the table, as well as also truncating other tables like:


  • SnapshotData
  • ChunkData
  • ChunkSegmentMapping
  • SegmentedChunk
I tried these sugestions both in the ReportServer and ReportServer TempDB, leading into a problem in all the environment; 
  • Report structure was intact. you were still able to navigate through folders
  • Reports were not showing up. once you click on ANY report you will eventually found the error below
  • Report Models were also gone.


An internal error occurred on the report server. See the error log for more details. (rsInternalError) Get Online Help

After some trial and error in a test environment, I was able to find why these problems were happening, understanding more how these internal tables work that I wasn't aware of them before:
  • When you deploy a new report in the environment, automatically SnapshotData,ChunkSegmentMapping, SegmenetedChunk and Segment table are filled with data. Probably some binaries from those files are stored there, while Catalog table only has the metadata for them (path, name, id, etc).
  • If you ever delete one of those rows from SEgment table, you will end up having inconsistency issues, despite the fact that the table (as well as the others) dont have any Primary key - Foreign key relationship.
  • All these applies to Report Models, where they are used to store data coming from the datasources in order to be used as a temporal storage to keep away from using the original datasource directly. Probably all that data is stored in Segment table encrypted for future use.

To sum up, I'm still not sure if there's a way to delete the data coming from those tables without doing any damage to the whole environment, but unless you are totally sure what you are doing, do not attempt to delete/ truncate those tables.