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 2008 Forums
 SQL Server Administration (2008)
 Grant Access to a user for 24 hrs

Author  Topic 

maxjam
Starting Member

9 Posts

Posted - 2011-03-11 : 10:06:50
Hi all,

Is it possible to give a user a copy of a SQL database say on CD and when they restore it to a server you then send them a password with which they log on but they will only have access for a 24hr period (or other pre defined length of time) before their access timebombs and they are locked back out?

robvolk
Most Valuable Yak

15732 Posts

Posted - 2011-03-11 : 10:23:07
It's not a built-in feature of SQL Server, you'd have to program something like that. And once they get a password, they could always restore the database again and use it.

I'm assuming you're providing a demo of your product?
Go to Top of Page

maxjam
Starting Member

9 Posts

Posted - 2011-03-11 : 10:25:50
Hi thanks for the quick reply.

Yep its a demo, my boss asked me if we could do this so said id look into it. He just doesnt want them getting into the DB structure etc for too long. Its not that big a deal really, its a simple enough relational DB, but he's the boss.
Go to Top of Page

robvolk
Most Valuable Yak

15732 Posts

Posted - 2011-03-11 : 12:09:51
You can encrypt all your SQL code (make sure you have unencrypted copies safely stored) and that should deter them, but really it's a programming problem, not database.

You can look at obfuscating table names (A0001, A0002, 13374@X0r, etc.) and use views or synonyms to reference them by "real" name (Clients, Orders, OrderDetails). Synonyms have zero performance cost but can't be used for columns. If you obfuscate columns you'll have to alias them in a view or stored procedure, both of which can be encrypted.

I've tested a few techniques for this but unfortunately it makes development impossible. You'd need a tool that lets you work with the real names, then go through all your objects and code and rename/rewrite them accordingly. The trick is correctly parsing SQL to grab an object and its columns and rename them correctly...not fun.

Visual Studio Database Edition has a renaming feature but it's not easy to automate against an entire database. Or you could do every object manually.
Go to Top of Page
   

- Advertisement -