Wednesday 27 February 2019

SQL Server : Linked server related error while running select against view

Error :-

Msg 7202, Level 11, State 2, Procedure distrib_comb_v, Line 3 [Batch Start Line 0]
Could not find server 'AGN_SQ1_PL_TEST_PR_RW' in sys.servers. Verify that the correct server name was specified. If necessary, execute the stored procedure sp_addlinkedserver to add the server to sys.servers.
Msg 4413, Level 16, State 1, Line 348
Could not use view or function 'Test.dbo.emp_v' because of binding errors.

Solution:

Error is not related to view definition and sp_refreshview will not help here.

If we are using database based linked server, we need to manually choose default DB in option tab of SSMS and it will work fine.



Thanks
Chhavi

No comments:

Post a Comment