SQL script to disable views after a demo period.

5 pts.
Tags:
SQL
SQL scripts
SQL Server 2005
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: June 23, 2009  3:25 PM
UPDATED: June 23, 2009  6:27 PM

Answer Wiki

Thanks. We'll let you know when a new response is added.

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.

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following