all groups > sql server notification services > april 2005 >
You're in the

sql server notification services

group:

NSInsert[AppName]Subscr...Sub... SP DISAPPEARED!


NSInsert[AppName]Subscr...Sub... SP DISAPPEARED! MarkSW
4/5/2005 2:47:03 PM
sql server notification services: Could an update that modified the FieldTypeMods of one field in a
Subscription Schema cause this to happen. It just did on my development
machine. Unit test of inserting a subscription now fails because the SP has
disappeared.

I can document this and specify that all schema modifications require a
delete and create, except that that would hose all of the Subscription
information. Is this possibly happening? Is there a workaround?

Here is the Exception info. dump:

Exception Type: Microsoft.SqlServer.NotificationServices.NSException
Message: Notification Services failed to insert the new subscription.
InstanceName: RIPerNotif
ApplicationName: RINSPER
SubscriptionClassName: RINSPERSubscriptions
SubscriberId: 4001000000002315
SubscriptionId: 0
StoredProcedureName: NSInsertRINSPERSubscriptionsSubscription
SqlServerError:
Source: .Net SqlClient Data Provider
Number: 2812
State: 62
Class: 16
Server:
Message: Could not find stored procedure
'NSInsertRINSPERSubscriptionsSubscription'.
Procedure:
Line Number: 0
....
....
StackTrace Information
*********************************************
at Microsoft.SqlServer.NotificationServices.Subscription.Add()


RE: NSInsert[AppName]Subscr...Sub... SP DISAPPEARED! MarkSW
4/5/2005 2:53:02 PM
I see this below is probably the culprit. Update is failing and this SP is
failing to be rebuilt, apparently. But what causes the below error. I would
obviously like to understand the scenario now rather than in production,
where manually dropping tables to fix failed deployment will be a bad option.


An error occurred while trying to rename the subscription table for backup.
You may need to manually delete the previous backup table.
InstanceName: RIPerNotif
ApplicationName: RINSPER
SubscriptionClassName: RINSPERSubscriptions
Notification Services failed to rename a table.
InstanceName: RIPerNotif
ApplicationName: RINSPER
TableName: NSRINSPERSubscriptionsSubscriptions
New TableName: NSRINSPERSubscriptionsSubscriptionsOld
SqlServerError:
Source: .Net SqlClient Data Provider
Number: 15335
State: 1
Class: 11
Server: WEISSM2K
Message: Error: The @newname value 'NSRINSPERSubscriptionsSubscriptionsOld'
is already in use as a object name and would cause a duplicate that is not
permitted.
Procedure: sp_rename
Line Number: 342



[quoted text, click to view]
RE: NSInsert[AppName]Subscr...Sub... SP DISAPPEARED! MarkSW
4/5/2005 3:05:03 PM
This happens each time I remove a DefaultValue FieldTypeMod in an nsupdate.
I'm inclined to say it might be a bug.

[quoted text, click to view]
Re: NSInsert[AppName]Subscr...Sub... SP DISAPPEARED! Shyam Pather [MSFT]
4/7/2005 2:37:14 PM
Mark,
When you make a change to your application that changes the schema of the
subscriptions table, NS re-creates the table from scratch (it does not
attempt to alter the table). To prevent loss of valuable subscription data,
it renames the existing table to NS<SubscriptionClassName>SubscriptionsOld.
After the update, you must copy the data from the Old subscriptions table
back into the new one (which is named
NS<SubscriptionClassName>Subscriptions) and delete the Old table. If you
don't delete the table, the next update will fail because of a name
collision when it again tries to rename the existing table.

I know this process is a bit clumsy - we're looking at improving it in the
next version - but this is the way NS2.0 is designed to work. This is
described in the Books Online.

If you delete the Old table (after saving any data in it you might need),
your update will probably succeed and then you should be fine again.
-shyam

--
Learn more about SQL-NS:
http://www.amazon.com/exec/obidos/tg/detail/-/0672326647/
---------------------------------------------
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm.
---------------------------------------------
[quoted text, click to view]

Re: NSInsert[AppName]Subscr...Sub... SP DISAPPEARED! MarkSW
4/7/2005 7:39:04 PM
OK, thanks. Sorry I missed this in BOL. If this is intended behavior I can
just document this as part of the rollout process of any updates. I haven't
really used NS to manage Subscription data up until now so this is new
territory for me ...

[quoted text, click to view]
AddThis Social Bookmark Button