March 12, 2004 at 1:16 pm
I want to allow a user to create views in a database but NOT to create any other object, especially tables; any tips on how to accomplish this would be appreciated.
Al
March 12, 2004 at 1:50 pm
User sends email to you.
You create view.
March 12, 2004 at 5:35 pm
Once I worked with a Web guy that needed to create database logins and users from his Web applications. We wouldn't let him (of course!), but we worked out a solution where there was a table that he populated with all the pertinent information about the new account that was supposed to be created. His account was the only one (other than dbo) that had access to put rows into that table. Then I scheduled a job that ran every 15 minutes or so that read the table and (as a sysadmin) created the accounts. His Web page just posted a friendly message that said "Your account should be ready within half an hour" or something like that. This worked great for us.
I'm wondering (if it's worth it ... see The Note Below) if you couldn't do something similar. Set up a table where they can put their view request (the whole create view statement) and then you run a job every 5 minutes or something that attempts to compile their view, and emails them the output. Just a thought.
The Note Below: Steve's solution, of course, is a lot easier to implement!
Cheers,
Chris
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply