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 2000 Forums
 SQL Server Administration (2000)
 How To PROTECT SQL Server Database Files ?

Author  Topic 

Parham
Starting Member

3 Posts

Posted - 2005-03-27 : 09:28:10
Hello,
How to protect structures(Tables,SP,Views and Functions) of a SQL Server Database?(Password protect a database file)
I have a SQL database that will distribute with my application, I want to protects it's structure from my appliction users. Only my application can access the database.

Thanks

robvolk
Most Valuable Yak

15732 Posts

Posted - 2005-03-27 : 09:46:06
If you're talking about preventing their database administrator from accessing the database, it is not possible with the regular SQL Server version. Third party tools may exist to do it, but I do not know of any.

Exactly how are they supposed to back up and restore the database if your application is the only thing that can access it?
Go to Top of Page

Parham
Starting Member

3 Posts

Posted - 2005-03-27 : 10:21:33
quote:
Originally posted by robvolk

If you're talking about preventing their database administrator from accessing the database, it is not possible with the regular SQL Server version. Third party tools may exist to do it, but I do not know of any.

Exactly how are they supposed to back up and restore the database if your application is the only thing that can access it?



They can backup the database in my application, but I want that they can't access the database of my application with another tools such as enterprise manager. Access databases can protected with passwords but how are SQL databases.
I don't want that users of my program can access the structure of my program's database as we don't want users know the source of our programs.
Go to Top of Page

robvolk
Most Valuable Yak

15732 Posts

Posted - 2005-03-27 : 10:52:08
You'll have to look for a third party tool to do this, or migrate your product to MS Access. You can encrypt the source code of your stored procedures, funcations, and triggers in SQL Server, but it won't prevent admins from viewing the tables, data, or other elements of the database.
Go to Top of Page

Parham
Starting Member

3 Posts

Posted - 2005-03-27 : 11:00:48
quote:
Originally posted by robvolk

You can encrypt the source code of your stored procedures, funcations, and triggers in SQL Server

How to do this ?
Go to Top of Page

robvolk
Most Valuable Yak

15732 Posts

Posted - 2005-03-27 : 11:12:40
You'd use CREATE PROCEDURE or ALTER PROCEDURE and add WITH ENCRYPTION to the end of this statement. If you do not have your stored procedure code stored in a separate source control database, DO NOT USE ENCRYPTION UNTIL YOU DO. You will not be able to edit encrypted procedures in the database.
Go to Top of Page

robvolk
Most Valuable Yak

15732 Posts

Posted - 2005-03-27 : 11:16:35
I should also add that the enrcyption used by SQL Server is not particularly strong, and a determined user could find utilities to decrypt your code. There are 3rd party code encryption tools available but they are either very expensive or do not have a well-established reputation behind them, and you may have to pay license fees to distribute their product along with yours.
Go to Top of Page
   

- Advertisement -