December 7, 2012 at 3:27 am
I HAVE HAVING 2 DATABASES 1 IS HAVING MORE THAN 25 TRIGGERS.I HAVE TO TAKE ALL 25 TRIGGERS AT A TIME AND EXECUTE IT IN ANOTHER DATABASE AT A TIME WITHOUT EXECUTING INDIVIDUALLY IS IT POSIBLE/
December 7, 2012 at 3:33 am
Your caps lock appears to be stuck, and I don't appreciate being shouted at...
Now, can you explain in a little more detail what you're trying to do here?
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
December 7, 2012 at 3:57 am
Do you mean you want to copy the triggers to the other database?
Right click on the database and generate scripts.
Under scripting options, advanced you can select to script triggers.
You should be able to create a script of all the triggers which you can then run in the other database.
You can probably also do this via ssis.
If you want to exercise the triggers then you will have to look at them individually and see what updates to the underlying tables you need to make.
Cursors never.
DTS - only when needed and never to control.
December 7, 2012 at 7:04 am
I want to take only Triggers in Sql server 2008 R2 database to execute in another database.The Database having more than 25 triggers instead of excuting individually i want to take and execute 25 triggers at a time
December 7, 2012 at 7:11 am
What do you mean by execute?
Do you want to add them to the tables in the database - if so see my previous post.
Do you want to cause the triggers to run by updating the underlying tables - if so see my previous post.
Something else
Maybe you want the triggers to be added to the tables in db1 and update the tables in db2.
In which case use the inserted and deleted tables to run the updates.
Cursors never.
DTS - only when needed and never to control.
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply