Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

when I exec the syntax to gain the access I get an error that I cant grant permissions to my self. any Ideas please!

this is the msg I get when I try to use my application using the database

share|improve this question
    
By the way, the message does look like it could be from Microsoft SQL Server, but it is nearly impossible to read. Retyping the message or making the snapshot more readable would be a kindness. –  RLF Sep 27 '13 at 13:41

3 Answers 3

It does not make sense to be changing your own rights. If you already have rights you do not need to grant them. If you do not have the desired rights, you should not be able to grant them to yourself. (Nor should you be able to deny yourself rights.)

However, it is possible that you apparently should have rights to some object, but you do not. In that case, check to see if your account was directly denied access to that object or if you are in a group or role that has been denied access. DENY always overrides a GRANT.

Just to flesh out the limits to changing permissions, there are other rights that cannot be changed, such as:

  • sa - operates outside the security system, can do everything on the server
  • dbo - can do everything in the database
  • entity owner - owns an object or objects and therefore has full rights to them
  • information_schema - system defined ownership
  • sys - system defined ownership

More: If you are an administrator and a group membership is denying you rights, you may be able to modify the group's rights or its membership. Otherwise, you need someone with GRANT rights to assist you.

share|improve this answer

Which database is it?

And do you have the user rights to grant select, if you haven't got the select rights on the object?

If you don't have those rights, you'll need to talk to the administrators of the database server.

If it is SQL Server take a look here for example: http://msdn.microsoft.com/en-us/library/ms187965%28v=sql.110%29.aspx

GRANT SELECT ON table TO user
share|improve this answer

Another possibility would be to use SQL Server Management Studio.

Object Exlorer - Security - Logins - - Properties (context menu) - User mapping: select database & db_datareader - OK

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.