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.

I created users with login option in security tab in SQL Server 2008 R2 running on windows 7 successfully and grant permissions to :

Use dummydb
Grant REFERENCES  ON OBJECT::vuUser TO nvp
GO

Use dummydb
Deny INSERT,SELECT,UPDATE,DELETE ON OBJECT::dummyDB.userTb to nvp
GO

nvp user can login successfully and restriction work great but when I create user and grant permissions as above on SQL Server 2008 R2 running on windows server 2008.

User can login successfully but when I try to grant permission using above code, I get this message:

Msg 15151, Level 16, State 1, Line 2
Cannot find the object 'usertb', because it does not exist or you do not have permission.

Is their is something I am doing wrong or I need to try something else ?????

Database and table name are correct...

I login in using user 'sa' credentials

Need urgent help n thanks in advance

share|improve this question

migrated from stackoverflow.com Dec 24 '12 at 12:42

This question came from our site for professional and enthusiast programmers.

    
See if SA is the database owner under the Database , Properties, Files tab –  Richard Vivian Dec 24 '12 at 6:11

2 Answers 2

Syntax is OBJECT::Schema.Table not OBJECT::Database.Table

e.g.

use test
Deny INSERT,SELECT,UPDATE,DELETE ON OBJECT::dbo.T1 to public
share|improve this answer

Greeting Madi,

Being that you're pressed on time here is a helpful video link that you can use as a sanity check..

http://www.youtube.com/watch?v=Uh5USR7pymE

If you still have issues please provide step and error if available.

Regards, Jav

share|improve this answer
    
Please provide a succinct text based answer to the question in addition to the 10min video. –  Jay Walker Dec 24 '12 at 4:42
    
I can't view the video as it is blocked in pkistan :( –  madi virgo_007 Dec 24 '12 at 7:25

Your Answer

 
discard

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