Microsoft KB Archive/323711

= BUG: Linked Server Query Is Not Successful and Error Message 7377 Occurs =

PSS ID Number: 323711

Article Last Modified on 6/24/2003

-

The information in this article applies to:


 * Microsoft SQL Server 2000 (all editions)

-



This article was previously published under Q323711



BUG #: 350819 (SHILOH_BUGS)



SYMPTOMS
If you run a linked server query with locking or index hints, you may receive the following error message:

Server: Msg 7377, Level 16, State 1, Line 2

Cannot specify an index or locking hint for a remote data source.



CAUSE
This problem occurs if you use the four-part naming convention for distributed queries. An example of a four part distributed query is: SELECT * FROM remote_server_name.pubs.dbo.authors (NOLOCK)



WORKAROUND
To work around this problem, use either of the following methods:   Use the OPENQUERY or OPENROWSET functions instead of the four-part naming convention.

For example: SELECT * FROM OPENQUERY (remote_server_name, 'Select * from pubs.dbo.authors (NOLOCK)' )                  Create a view with the remote query and use a hint on the view.

For example: CREATE VIEW rmt_vw AS SELECT * FROM remote_server_name.pubs.dbo.authors GO SELECT * from rmt_vw (NOLOCK) 



STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.



MORE INFORMATION
For additional information about the OPENQUERY or OPENROWSET functions, see the &quot;OPENQUERY&quot; and &quot;OPENROWSET&quot; topics in SQL Server Books Online.

Keywords: kbbug kbpending KB323711

Technology: kbAudDeveloper kbSQLServ2000 kbSQLServ2000Search kbSQLServSearch

-

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

© 2003 Microsoft Corporation. All rights reserved.