SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


The specified schema name "dbo" either does not exist or


The specified schema name "dbo" either does not exist or

Author
Message
nirav284
nirav284
SSC Journeyman
SSC Journeyman (80 reputation)SSC Journeyman (80 reputation)SSC Journeyman (80 reputation)SSC Journeyman (80 reputation)SSC Journeyman (80 reputation)SSC Journeyman (80 reputation)SSC Journeyman (80 reputation)SSC Journeyman (80 reputation)

Group: General Forum Members
Points: 80 Visits: 71
we have created a database role named db_execute and
we have granted permission to this role on bunch of SPs
so members of that role can execute those SPs.
one of the (user)account is a member of this role
when I execute that SP in backend from this account it runs fine but
when developers call it from front end with same account they gets this error
Unexpected Database error -
ErrorNamespace: DB.SqlServer
ErrorNumber:2760
The specified schema name "dbo" either does not exist or you do not have permission to use it.
Whats should be the work around??Where should I check now?
Susantha Bathige
Susantha Bathige
SSC Veteran
SSC Veteran (268 reputation)SSC Veteran (268 reputation)SSC Veteran (268 reputation)SSC Veteran (268 reputation)SSC Veteran (268 reputation)SSC Veteran (268 reputation)SSC Veteran (268 reputation)SSC Veteran (268 reputation)

Group: General Forum Members
Points: 268 Visits: 282
Make following things;

1.The particular users are belongs to the db_execute role.

2.The sprocs are given the EXECUTE permission for db_execute role. You can use the below script to see list of procs which do not have EXECUTE permission granted.

SELECT * FROM sysobjects a
LEFT JOIN syspermissions b
ON a.id=b.id
WHERE a.xtype='P'
AND b.id IS NULL

Susantha
nirav284
nirav284
SSC Journeyman
SSC Journeyman (80 reputation)SSC Journeyman (80 reputation)SSC Journeyman (80 reputation)SSC Journeyman (80 reputation)SSC Journeyman (80 reputation)SSC Journeyman (80 reputation)SSC Journeyman (80 reputation)SSC Journeyman (80 reputation)

Group: General Forum Members
Points: 80 Visits: 71
Thanks for the reply but yes the particular user belongs to that role
and I did run that script already and I can see some 10 SPs but
they are not really taking part in the picture
so we didnt give any permission to them
also if I can run a trace will that help me in permission things??
Susantha Bathige
Susantha Bathige
SSC Veteran
SSC Veteran (268 reputation)SSC Veteran (268 reputation)SSC Veteran (268 reputation)SSC Veteran (268 reputation)SSC Veteran (268 reputation)SSC Veteran (268 reputation)SSC Veteran (268 reputation)SSC Veteran (268 reputation)

Group: General Forum Members
Points: 268 Visits: 282
If you use the script under the correct DB it should return all the sps which do not have EXECUTE permission.

If you know the trouble making sp, use the below statement to give permission.

GRANT EXECUTE ON TO db_execute

Susantha
Susantha Bathige
Susantha Bathige
SSC Veteran
SSC Veteran (268 reputation)SSC Veteran (268 reputation)SSC Veteran (268 reputation)SSC Veteran (268 reputation)SSC Veteran (268 reputation)SSC Veteran (268 reputation)SSC Veteran (268 reputation)SSC Veteran (268 reputation)

Group: General Forum Members
Points: 268 Visits: 282
The GRANT statement should be as follows;

GRANT EXECUTE ON TO db_execute

Susantha
nirav284
nirav284
SSC Journeyman
SSC Journeyman (80 reputation)SSC Journeyman (80 reputation)SSC Journeyman (80 reputation)SSC Journeyman (80 reputation)SSC Journeyman (80 reputation)SSC Journeyman (80 reputation)SSC Journeyman (80 reputation)SSC Journeyman (80 reputation)

Group: General Forum Members
Points: 80 Visits: 71
I appreciate your reply but I already supp;ied Grnt execute on those SPs which I am calling or application calls..
So looks like its something else
Raghuram (AJ)
Raghuram (AJ)
Say Hey Kid
Say Hey Kid (680 reputation)Say Hey Kid (680 reputation)Say Hey Kid (680 reputation)Say Hey Kid (680 reputation)Say Hey Kid (680 reputation)Say Hey Kid (680 reputation)Say Hey Kid (680 reputation)Say Hey Kid (680 reputation)

Group: General Forum Members
Points: 680 Visits: 299
You may re-veriry how the front end is obtaining connection to the database. Indeed, the ideal way would be Windows Authentication and the logins you include as a part of the role are WINDOWS logins of the users.

The vision must be followed by the venture. It is not enough to stare up the steps - we must step up the stairs. - Vance Havner
Michael Niemand
Michael Niemand
SSC Veteran
SSC Veteran (201 reputation)SSC Veteran (201 reputation)SSC Veteran (201 reputation)SSC Veteran (201 reputation)SSC Veteran (201 reputation)SSC Veteran (201 reputation)SSC Veteran (201 reputation)SSC Veteran (201 reputation)

Group: General Forum Members
Points: 201 Visits: 160
I have a similar problem.
I try to create a view from our database application, which fails with the error mentioned in the first posting (the user has the CREATE VIEW-permission).

Funny thing is, that if I log onto Management Studio with the same user and run the same statement, it works. Blink
Michael Niemand
Michael Niemand
SSC Veteran
SSC Veteran (201 reputation)SSC Veteran (201 reputation)SSC Veteran (201 reputation)SSC Veteran (201 reputation)SSC Veteran (201 reputation)SSC Veteran (201 reputation)SSC Veteran (201 reputation)SSC Veteran (201 reputation)

Group: General Forum Members
Points: 201 Visits: 160
Ok, I should have checked all the tabs I opened before posting here. Found a solution:

I ran

GRANT ALTER ON SCHEMA::dbo TO RoleName

and it worked.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search