Hi all,
I encounter the following error while developing a SSRS project that connects to a SQL Server Database view:
"Msg 229, Level 14, State 71, Procedure sp_getschemalock, Line 1
The SCHEMA LOCK permission was denied on the object 'Table4', database 'DBRemote', schema 'dbo'."
That view uses a linked server to select data from a remote SQL Server Database (SQL Server 2005).
There are no sql hints specified in my views
My view T-SQL is:
Select
...
From linksv.DBRemote.dbo.Table1 T1
Inner Join linksv.DBRemote.dbo.Table2 T2 On
T1.fk1 = T2.pk1
Inner Join view1 v1 On
T2.fk2 = v1.pk2
My t-sql for view1 is:
Select
...
From linksv.DBRemote.dbo.Table3 T3
Inner Join linksv.DBRemote.dbo.Table4 T4 On
t3.fk1 = T4.pk1
The object specified in error message above refers to Table "linksv.DBRemote.dbo.Table4" (see view above)
SQL Server Permissions are set for all objects involved in the queries above.
The funny thing is that the error occurs when I run my report from the report server webinterface
and my report project is loaded in BIDS at the same time.
The error occurs when I execute the query in SSMS 2008 and also when I run the query
in BIDS 2008 Query designer.
I also wondering why the error referes to the "linksv.DBRemote.dbo.Table4" remote object only
but not to the other remote objects in that query.
Im not sure where to look any further on what might cause this error.
Appreciate any help very much.
Thanks
Bodo