I have a sproc (call it client.UpdateClient
) that is executed by a SQL User (call it MyWCFServicesUser
.
MyWCFServicesUser
has datareader and datawriter permissions on the database. It also has execute permissions on the sproc (but no other permissions).
The sproc will insert a row into client.Client
with SET IDENITY_INSERT client.Client ON
.
When I run this sproc (from SSMS) with integrated security (I am sa
), everything works fine.
When I run it as MyWCFServicesUser
(from SSMS) it fails with this error:
Msg 1088, Level 16, State 11, Procedure UpdateClient, Line 33
Cannot find the object "client.Client" because it does not exist or you do not have permissions.
I usually have all my sprocs and tables in the default (dbo) schema, but this time I am trying to not use dbo.
Is that why I don't have permissions? Do I need to elevate the sproc somehow? Or the user? Or somehow change the schema?
I am stumped...