I need to come up with a script that when executed it will create a stored procedure and trigger along with permissions. Is there a way to make this into a package. Any ideas?So you want to take a stored procedure that is in the current database, and somehow "automagically project" that procedure intact to another (subscriber) database?
That's a novel thought.. It could be done, and it wouldn't be terribly hard.
-PatP|||There is no "automagic" in it, just use SQL-DMO object model. Just one method is involved. Examples are in BOL.|||things to automate
-add a user to master table
-add Permissions to xp_cmdshell
-create trigger in table
-create stored procedure in needed database
-uncheck Non-SysAdmin job setup Proxy Account box and create proxy account
I image that I could write this all out by using a T-SQL stored procedure. But, some things that I don't know is: where it should be stored? or what would be the most efficient way of going about this?
Don't know where to start but to create the procedure and then I'll figure out what to do from there.
No comments:
Post a Comment