Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
Ali Reza Pooneh
Starting Member
14 Posts |
Posted - 2010-04-20 : 08:02:43
|
| Hi.I have a database on SQL Server 2005 that other connect to it by my application. But some day ago, one trigger created on a table that has a lock icon and I can't to modify it or delete or ...(See picture)I think another user on LAN access to my database nd server! Also all records that inserted in long time(half a day) are deleted in end of work time and I think this trigger couse it. Please help me to find who created it(log files or log table or ...),how delete it or view trigger code and another info that help me to find resource of this sabotage![url]http://drop.io/mysqltrigger/asset/what-s-this-jpg[/url] |
|
|
Sachin.Nand
2937 Posts |
Posted - 2010-04-20 : 09:20:14
|
| What rights do your login has on the database?Also from the screenshot it seems that you can disable the trigger.Also try sp_helptext triggername to view the trigger code.PBUH |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2010-04-20 : 09:42:21
|
| i think trigger is encrypted which is why you're having difficulty in viewing it.Are you dbo of this db?------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
Ali Reza Pooneh
Starting Member
14 Posts |
|
|
GilaMonster
Master Smack Fu Yak Hacker
4507 Posts |
Posted - 2010-04-21 : 03:33:54
|
| There's a DDL trigger in place that prevents those triggers being dropped. Drop or disable that first. You'll find it, in management studio under database->programability-> database triggersYou still won't be able to view the code, it's encrypted.--Gail ShawSQL Server MVP |
 |
|
|
Ali Reza Pooneh
Starting Member
14 Posts |
Posted - 2010-04-21 : 03:50:27
|
| Only 4 trigger exist in database triggers and all of them are encrypted and I can't delete them.I think these triggers depend on them; for more,when I want to delete one of them, another trigger excute and rollback operation.Is there a way to disable all triggers on server or a database? |
 |
|
|
GilaMonster
Master Smack Fu Yak Hacker
4507 Posts |
Posted - 2010-04-21 : 04:27:31
|
| Encrypted does not mean can't delete. Just that you can't read.Deleting a database trigger does not fire a DDL trigger (it's a safety precaution so that you can't get locked into a state where you can't drop a broken trigger), so you should be able to delete.NB, I'm talking about database triggers, not triggers on a table.There is a syntax to disable. Look in Books Online.--Gail ShawSQL Server MVP |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
|
|
|
|
|
|
|