SQL script to disable views after a demo period.
5 pts.
0
Q:
SQL script to disable views after a demo period.
Hi, I have a sql view that I created for someone on a test basis. I want to create something (stored procedure, trigger, etc) that will delete or disable this view after a 30 day trial period. I prefer to make the view unvisible even to the "sa" administrator so that the view can not be recreated by someone else. Is this possible? I am currently using SQL Server Management Studio 2005. What is the best way to do that and what is the actual code? This needs to run without the testers knowledge and without my presence.

Your help is greatly appreciated. I've been searching the web for weeks trying to figure this out and am up against a deadline of June 28, 2009.
ASKED: Jun 23 2009  3:25 PM GMT
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
0
47440 pts.
0
A:
 RATE THIS ANSWER
0
Click to Vote:
  •   0
  •  0
  • AddThis Social Bookmark Button
Pretty much the only way to do this would be to create a scheduled job which deletes the view, and then deletes itself after running.

However randomly deleting objects from someone elses server is grounds for never doing work with them again.

I can guarantee that if you ever tried that on one of my SQL Server word would spread very quickly that you had done so, and you'd end up with a hard time trying to find work.

Let them keep the view. It's called good faith.
Last Answered: Jun 23 2009  6:27 PM GMT by Mrdenny   47440 pts.
0
0
Discuss This Answer:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _



0