Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Nov 21, 2012 02:21 AM by Chen Yu - MSFT
Nov 16, 2012 10:12 AM|LINK
I have SQL Server Database which is having lot of usefull information which I dont want to view by anybody. How Can I do that...?
But that Database should be accesible to ASP.NET application.
In That Database they are 6 Important Tables are there. How to make those 6 Tables not viewable..?
Why I am wondering because I need to give entire database to the Clients. Even Clients dont want to view all those important 6 Tables in that Database...
Please give me Some suggestions
Nov 16, 2012 11:48 AM|LINK
I think u can take use of Security tab located in object explorer..
1) First create users for the database
2) Right click->properties->user mapping : here u can set the user credentials..
Nov 16, 2012 12:13 PM|LINK
I am wishing that No body can View that data in that Database Tables or As I said in my post there are 6 important tabels are there in the table I dont want any body View THE DATA IN THAT TABLES...
Can you please explain above scenario in step by step manner
Thanks in Advance
Nov 20, 2012 09:14 AM|LINK
@manjuby means you could use User Account permission to limit those people who you don't want them view the detail imformation about tables. You could create a new login with proper authentication, in User Mapping, choose the database and grant it proper
You could reference on this link:
Nov 20, 2012 11:00 AM|LINK
Yes U got my point...Chen Yu - MSFT
Nov 20, 2012 12:03 PM|LINK
Thanks... Ya I did that...AND its working too...I am very happy with that...
What I did here .....I have created a User Granted permission to the DataBase (suppose DBSystem)....
When he logged in He can not see all the tables in that Database.....
Thanks and my First Quey Clarified
My second Qestion is
How can we restrict that user for specified tables in that DataBase...?
Suppose I have totally 10 tables in the database...
I want that user can not see 6 tabels and remain 4 tables can see
How can we do that....?
Nov 20, 2012 12:10 PM|LINK
--create a role to wrap up our permissions CREATE ROLE TWOTABLEACCESS GRANT SELECT,INSERT,UPDATE,DELETE ON dbo.ALL_BLOCKGROUPS TO TWOTABLEACCESS; GRANT SELECT,INSERT,UPDATE,DELETE ON dbo.GEOSTATE TO TWOTABLEACCESS; --now test the role CREATE USER ROLETESTER WITHOUT LOGIN; EXEC sp_addrolemember 'TWOTABLEACCESS','ROLETESTER' EXECUTE AS USER = 'ROLETESTER'to get back to norml things..REVERT;
Nov 21, 2012 02:21 AM|LINK
You could use grant Table permission to do so. Please reference on below article.