Showing posts with label completes. Show all posts
Showing posts with label completes. Show all posts

Friday, February 24, 2012

Getting Extra Notifications after Content Formatter completes!

Hi,

I am getting extra notifications which I am really not sure how and why its hapening.

I did try debugging, and everything seems perfect till ContentFormatter. I am getting exact number of messages for a

particular event and they are getting formatted perfectly by the custom content formatter.

But when I check the NS<ClassInstanceName>NotificationDistribution in the Notification DB, I have multiple records.

I did check the underlying query for this View and the issue is with NSDistributionLog. In some of these extra records I

can see the NotificationText that was never generated by the content formatter for this particular event.

We are supporting only one DeviceType 'Email' as of now.

Any suggestions/ideas why this is happening?

Hi Poonam -

Are you using any custom components?

Joe|||

Hi Joe,

Yes I have a custom content formatter in place and thanks for helping me on this.

But I have figured out the problem and posting it here for reference. Here is what was happening:

Notification Service Instance creates a Work Item for each Batch of notification. But the View

NS<ClassInstanceName>NotificationDistribution doesn't consider BatchIDs. Rather it considers only the NotificationIDs.

Notifications IDs can be repeated with in a Batch.

So this view returns the records (for all the batch ids) where there is a match in the NotificationID irrespective of the if this

Notification is part of the batch or not.

So here is the output:

You get correct no. of emails formatted from content formatter

Correct no and content is delivered to the Delivery Channel

But

When we see the NS<ClassInstanceName>NotificationDistribution, there are extra records with

Different NotificationText that was actually never related to this Event.

Below is the correct query with the reference to Batch ID of the notifications actually generated:

SELECT *

FROM [...].[NS<ClassInstanceName>Notifications] N WITH (READUNCOMMITTED)

JOIN [...].[NSDistributorWorkItems] DW WITH (NOLOCK)

ON N.NotificationBatchID = DW.BatchID

JOIN [...].[NSSubscriberDevices] SD WITH (READUNCOMMITTED)

ON SD.SubscriberId = N.SubscriberId

AND SD.DeviceName = N.DeviceName

JOIN [...].[NSDistributionLog] DL WITH (READUNCOMMITTED)

ON DL.NotificationId = N.NotificationId

AND DW.DistributorWorkItemID = DL.DistributorWorkItemID

JOIN [...].[NSDistributors] D WITH (READUNCOMMITTED)

ON D.DistributorId = DL.DistributorId

JOIN [...].[NSNotificationDeliveryStatusCodes] DSC WITH (READUNCOMMITTED)

ON DSC.NotificationDeliveryStatusCode = DL.DeliveryStatusCode

WHERE

DL.NotificationClassId = 1

[...] - are corresponding Schema Names.

Getting Errors during Synchronization

Guys,

I am getting errors during synchronizing a database. It completes 96% and then throws this error:

"Internal error: An unexpected exception occured. Backup and restore errors: An error occurred while synchronizing the 'XXX' database."

I was able to synchronize this database from another server where it was processed just fine.

The only changes that I think I made was change the partition locations. We have 2 cubes with 9 partitions each. One cube with all its partitions goes to the default D:\Program Files\Microsoft SQL Server\MSSQL.1\OLAP\ folder.

The other cubes has 9 partition we are changing the location to go to these folders:

E:\XXX Cube Data -- 3 partitions

F:\XXX Cube Data -- 3 partitions

G:\XXX Cube Data 3 partitions

I am not able to understand as to what to check here.

I looked at flight recorder and it gives the same

"Internal error: An unexpected exception occured. Backup and restore errors: An error occurred while synchronizing the 'XXX' database."

Not sure as to what to do.

Any suggestions.


Rgds

Hari

I'm assuming that your target server has E,F and G drives, but have you created the full paths ("XXX CubeData") and does the account that SSAS is running under have access to those paths?|||

Yup the two servers are identical and the way we wanted to do it all the processing is done on one server and querying will be done on another server. The servers have identical drives and folders underneath and we are using the same service account to run the servers.

Also when I look at the actual database from the source server by right clicking it from managment studio, I see the size as 3.21MB. However when I go to each of the folders in the different drives, it does not say XXX.1.db or whatever but just contains A313A-42DC-498C-8BBD-3A899313B30E.0.0.0.0
This is on the source server.

In the destination server, I am mapping all the partitions to go to the same location on the destination as they are on the source server.
However it fails...Not sure what else to do.
Is there anything that would give me more details?

On the destination server, I see the following from the event viewer:
Event Type: Error
Event Source: MSSQLServerOLAPService
Event Category: (256)
Event ID: 22
Date: 4/3/2007
Time: 10:07:39 AM
User: N/A
Computer: XXXXXXXXXXXXXXXXXXXX
Description:
The description for Event ID ( 22 ) in Source ( MSSQLServerOLAPService ) cannot be found. The local computer may not have the necessary registry information or message DLL files to display messages from a remote computer. You may be able to use the /AUXSOURCE= flag to retrieve this description; see Help and Support for details. The following information is part of the event: Internal error: An unexpected exception occured..


Rgds

Hari

|||

Any error that starts with "Internal error" is not good. I think you can change the path where the partitions are stored in the synchronisation script, but I thought the default was the same as the source server.

You could try running SQL Profiler on the source and destination servers to see if you get any more information or possibly some more context around what is going on when the error occurs. You could also try running FileMon (http://www.microsoft.com/technet/sysinternals/FileAndDisk/Filemon.mspx) this can trace all the file based activity on a machine and you can see if there are any permissions or other errors trying to access a disk resource.

Have you tried doing a back up and restore to the destination server? I am pretty sure that they use the same underlying mechanism, but maybe you will get a better error message.

Otherwise this might require a support call.

|||

Just an FYI...

This has been logged as a bug on Analysis Services 2005 sp1.

It has been fixed and works fine on sp2.

Reference: SQL BU Defect Tracking 514484

The actual problem is when you are changing the storage locations on the source server and trying to synchronize it to the destination server.


Rgds

Hari