Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hide Database Objects

Status
Not open for further replies.

faccorp

Programmer
Jan 24, 2002
58
US
I have an SQL 2005 database with a front end written in C++.
I am using all stored procedures and views to access the tables and I am granting execute privledges and select privledges on the views. I also need to allow users to create and alter views.

I don't want the user to have the ability to see the code in the stored procedures. Or have the ability to modify the code. If they have SQL Management Studio then all of the code in the stored procedure is easily accessed.

How do I hide this code? Or how do I hide the Stored Procedure names, or both.
 
You could encrypt your stored procedures. This will keep prying eyes out of the code.

Code:
Create Procedure blah1 [!]with encryption[/!]
As
etc....

-George

Strong and bitter words indicate a weak cause. - Fortune cookie wisdom
 
you could encrypt the store procs

create procedure bla WITH encryption
as
select getdate()
go

run sp_helptext bla
result:The object comments have been encrypted.

also when running this
select * from information_schema.routines
where specific_name = 'bla'
the definition will be NULL

However this is easily crackable




Denis The SQL Menace
--------------------
SQL Server Code,Tips and Tricks, Performance Tuning
Google Interview Questions





 
Thanks All.

Dennis, when you say easily crackable, do you mean someone can figure out how to un-encrypt?
 
Well what the flippin crap is it good for then!?

Are there other alternatives?

I put a lot of code in my sp's to cut down on network traffic and make the server do all the tough work. Isn't that the whole intent. And yet there's no way to hide it and keep it safe??

Any other design ideas out there?

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top