Microsoft KB Archive/264170

= FIX: Immediate Updating Subscribers Receive Error Message 7415 When Performing UPDATES and INSERTS =

Article ID: 264170

Article Last Modified on 3/14/2006

-

APPLIES TO


 * Microsoft SQL Server 7.0 Standard Edition

-



This article was previously published under Q264170



BUG #: 57981 (SQLBUG_70)

BUG #: 57812 (SQLBUG_70)



SYMPTOMS
When an Immediate-updating Subscriber is connected to a subscribing database with a non-system administrator (SA) login, data modification transactions may fail and the following error message occurs:

Server: Msg 7415, Level 16, State 1, Line 3

Ad hoc access to OLE DB provider 'SQLOLEDB' has been denied. You must

access this provider through a linked server.

The error message occurs even if the Subscriber user has sufficient permissions in the Subscribing database, such as:
 * Being a member of the db_owner role.

-or-


 * Being aliased to the database owner (dbo).



CAUSE
This behavior occurs when the Immediate Subscriber is configured to use the dynamic RPC security mode to connect to the Publisher.

You can check what security mode a subscriber is configured with by running the sp_helpsubscription_properties stored procedure in the subscribing database, and then check the publisher_security_mode column value.

A 0 value indicates you are using a dynamic RPC connection method to connect to the Publisher. A value of 2 indicates that you are using a static RPC connection method to the Publisher.



WORKAROUND
By choosing the static RPC publisher connection method (publisher_security_mode = 2) for the Immediate Subscriber, you can avoid the error message.

Change the publisher connection method for the Subscriber by running the sp_link_publication stored procedure in the Subscribing database.

Before you can change the connection method to static RPC, you must make sure that the Publisher is defined as a linked server on the Subscriber server. You can then use the sp_addlinkedserver stored procedure to add the Publisher as a linked server.

Following is an example that sets a static RPC connection method for an Immediate-updating Subscriber:   Run the following on the Subscribing server: sp_addlinkserver 'publisher_server',N'Sql Server'   Now, run the following code: Exec sp_link_publication @publisher = 'Publishing_server', @publisher_db = 'Publishing_database', @publication = 'Publication_name', @security_mode = 2 , @login = 'login', @password = 'password' 



STATUS
Microsoft has confirmed this to be a problem in SQL Server 7.0. This problem has been corrected in U.S. Service Pack 3 for Microsoft SQL Server 7.0. For more information, click the following article number to view the article in the Microsoft Knowledge Base:

274799 INF: How to Obtain Service Pack 3 for Microsoft SQL Server 7.0 and Microsoft Data Engine (MSDE) 1.0

For more information, contact your primary support provider.



MORE INFORMATION
SQL Server Books Online, topic: &quot;sp_link_publication&quot;.

Keywords: kbbug kbfix KB264170

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.