Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SQL Server Administration (2005)
 Encrypt Table not to open/modify

Author  Topic 

ganeshkumar08
Posting Yak Master

187 Posts

Posted - 2010-03-17 : 02:19:24
Hi All,

In my office we developed one product, we are selling that product, now the end user should not open table or he should not modify the table.

Like stored procedures, using keyword WITH ENCRYPTION AS we cant modify the SP's. in the same way i need to do for tables. how to do it.

Thanks
Ganesh

Solutions are easy. Understanding the problem, now, that's the hard part

lionofdezert
Aged Yak Warrior

885 Posts

Posted - 2010-03-17 : 02:37:26
Three solutions:
1-Go to database security -- Go to your required user properties -- Select Secureable -- and grant set permissions for each object.
2-Create views for base tables and give access your users to these views only. (Later make views definition encrypt)
3- Create a database trigger and write code to do else when someone want to alter or delete your database tables.
Go to Top of Page

ganeshkumar08
Posting Yak Master

187 Posts

Posted - 2010-03-17 : 02:47:10
Thanks very much...

Solutions are easy. Understanding the problem, now, that's the hard part
Go to Top of Page

lionofdezert
Aged Yak Warrior

885 Posts

Posted - 2010-03-17 : 03:44:48
U WELCOME...
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2010-03-17 : 05:31:16
WITH ENCRYPTION is weak, and relatively easily reversed - so if you want to stop the user getting your code you need a different solution (host the database yourself, have a draconian licence agreement)

To prevent accidental/naive/casual meddling then WITH ENCRYPTION is good. A SysAdmin is still going to be able to connect, and meddle, if they really want to ...

If all your access to the data is through Stored Procedures then Users / Applications only need EXECUTE permission - no table access at all, not even SELECT, and definitely not DATA_READER / DATA_WRITER!
Go to Top of Page
   

- Advertisement -