I am trying to disable Triggers but this script not working?

CREATE PROC DisableTriggers
AS
DECLARE @Table_Triggers SYSNAME
DECLARE Cursor_Disabletriggers CURSOR FOR   
  SELECT  object_name(parent_id)  
  FROM   sys.triggers  
OPEN Cursor_Disabletriggers
FETCH NEXT FROM   Cursor_Disabletriggers   
 INTO @Table_Triggers  
 WHILE @@FETCH_STATUS = 0   
BEGIN  
ALTER TABLE @Table_Triggers DISABLE TRIGGER ALL 
 END  
CLOSE Cursor_Disabletriggers
DEALLOCATE Cursor_Disabletriggers

You can not use variable on this line
ALTER TABLE @Table_Triggers DISABLE TRIGGER ALL 
It needs to be dynamic SQL. I haven't checked the logic yet, but the above needs to be (assuming it will
work)
before the loop
declare @SQL nvarchar(max)
in the loop
set @SQL  = 'ALTER TABLE ' + quotename(@Table_Triggers) + ' DISABLE TRIGGER ALL'
execute (@SQL)
For every expert, there is an equal and opposite expert. - Becker's Law
My blog
My TechNet articles

Similar Messages

  • TS3430 iTunes crashes when I try to play any video whatsoever.  I disabled direct3d but this did not work.  I started iTunes in safe mode and it corrected the problem but when I look in the folders mentioned in the troubleshooter there aren't any plug-ins

    It is the latest version of iTunes btw.

    The faulting module is photoshop. Report below.
    Source
    Adobe Photoshop CC 2014
    Summary
    Stopped working
    Date
    2/2/2015 4:54 PM
    Status
    Report sent
    Description
    Faulting Application Path: C:\Program Files\Adobe\Adobe Photoshop CC 2014\Photoshop.exe
    Problem signature
    Problem Event Name: APPCRASH
    Application Name: Photoshop.exe
    Application Version: 15.2.2.310
    Application Timestamp: 5480338c
    Fault Module Name: Photoshop.exe
    Fault Module Version: 15.2.2.310
    Fault Module Timestamp: 5480338c
    Exception Code: c000001d
    Exception Offset: 00000000049de322
    OS Version: 6.3.9600.2.0.0.768.101
    Locale ID: 1033
    Additional Information 1: 8db4
    Additional Information 2: 8db473619c10c0c8b85ce99afe676ed8
    Additional Information 3: f06d
    Additional Information 4: f06da704bdd5338df2a8d09bde2244bb
    Extra information about the problem
    Bucket ID: 1fe6d1d4e5765bd348843b981b8ec4d2 (85990875000)

  • My ipod touch is disabled for 212,456,786 minutes! I have tried to restore and followd all instructions on the apple support site but this has not worked. Help!

    My ipod touch has been disabled for 212,456,875 minutes! I have followed all instructions on the apple support site to restore it but this has not worked. Help!

    Without know exactly what you did or what happened:
    Disabled
    Place the iOS device in Recovery Mode and then connect to your computer and restore via iTunes. The iPod will be erased.
    iOS: Forgot passcode or device disabled
    If recovery mode does not work try DFU mode.                        
    How to put iPod touch / iPhone into DFU mode « Karthik's scribblings        
    For how to restore:                                                             
    iTunes: Restoring iOS software
    To restore from backup see:
    iOS: Back up and restore your iOS device with iCloud or iTunes       
    If you restore from iCloud backup the apps will be automatically downloaded. If you restore from iTunes backup the apps and music have to be in the iTunes library since synced media like apps and music are not included in the backup of the iOS device that iTunes makes.
    You can redownload most iTunes purchases by:                         
    Downloading past purchases from the App Store, iBookstore, and iTunes Store        
    If problem what happens or does not happen and when in the instructions? When you successfully get the iPod in recovery mode and connect to computer iTunes should say it found an iPod in recovery mode.

  • HT1222 I just installed this update and now I cannot access "Mail" at all.  I tried reinstalling the program, but that does not work, either.  Help!!!!!!

    I just installed this update and now I cannot access "Mail" at all.  I tried reinstalling the program, but that does not work, either.  Help!

    Paldeng, thanks for the suggestion.  I've done all that.  I can connect to the server, but apparently they are not recognizing my ID and password.  I can use the server program if I don't go through Mail (using the same ID and password).  My mother in another state with another provider has had the same email issue, as also my husband on his laptop who uses the same internet connection I do.  His worked fine until we had it repaired at the Apple store and all the original programs reloaded (with the required updates, I assume).  We can receive email in Mail, we just cannot send.
    I contacted my service provider, and we went over my connections.  They said it was not their problem and connected me with Apple, resulting in a charge to me because my warranty is long expired.  Apple swears it is not their problem, it is the provider, so here I sit.  My son was able to fix my Mom's Mail (she's 97) and got my husband's working also, until mine went out, by tweaking connection descriptions and ports remotely.  The thing is, we had not messed with any of those settings, so what changed?  I just did not want to bother my son again, as he has many other demands on his time.
    Since this fiasco with the Mail v4.6 update, I'm wondering if something else was updated that works well with Lion and Mountain Lion, but does not work well with Snow Leopard and Leopard.  I think the problem I had with the Mail update was that my Mail program had been renamed to Mail (original), and therefore was not being recognized by the update.  Perhaps they had another tweak in there somewhere that is affecting outgoing mail connections?

  • My new iPhone 5 has black and white lines on the screen. It's not been damaged. I've tried turning it off but this does not solve the problem? Please help.

    My new iPhone 5 has black and white lines on the screen. It's not been damaged. I've tried turning it off but this does not solve the problem? Please help. I can't find my answer on the Internet.

    By far the most common problem hardware-wise seems to be scuffs on the aluminium. Yours is the first report of a faulty screen I've seen.
    If you use the same Apple ID on both devices it'll sync whatever you want it to - music/apps/photos/messages/etc.
    I've just switched from a Galaxy S3 to iPhone 5 (having already owned an iPad for a while) so I'm in a similar position!

  • I have forgotten my answers to the questions which are asked to identify me, and I am trying to press "send instructions to my e-mail", but this does not work, what should I do?

    I have forgotten my answers to the questions which are asked to identify me, and I am trying to press "send instructions to my e-mail", but this does not work, what should I do?

    If the email hasn't arrived after a few hours and isn't in a spam filter, you need to ask Apple to reset your security questions. To do this, click here and pick a method; if that page doesn't list one for your country or you're unable to call, fill out and submit this form.
    (113969)

  • I have a late 2008 Macbook Pro, I am trying to run MW3 but it will not work without crashing a few minuets into the game. The general specs on my computer are a dual processor 2.53 ghz. 4 gb ram and a NVIDIA geforce 9400 (9600 is the alternate card)

    I have a late 2008 Macbook Pro, I am trying to run MW3 but it will not work without crashing a few minuets into the game. The general specs on my computer are a dual processor 2.53 ghz. 4 gb ram and a NVIDIA geforce 9400 (9600 is the alternate card).
    Things to note:
    I have been unable to update firmware on this computer for about a year now. Im not sure why.
    I am running a bootleg copy of Windows XP on this computer, I would not like to spend $149 to get Windows 7 if possible.
    any thoughts on the matter would be greatly appreciated, thank you.

    Why don't you take your 'old' MBP into your local Apple Store and have them check out everything that's wrong with it - and I mean everything? Then, when you get an estimate about how much it would cost to get the machine completely repaired, ask about the Apple flat-rate repair pricing?
    It's worth a shot - and with what you may save, you can put in the bank for a new MBP.
    Clinton

  • HT5594 After updating to iOS7 on my iPhone4 I cannot enable location services. How do I enable location services? I have tried turning off restrictions but that did not work.

    After updating to iOS7 on my iPhone 4 I cannot enable location services. How do I enable location services? I have tried turning off restrictions but that did not work.

    I finally just resolved this after not being able to enable location services since upagrading to iOS 7. Posting the solution here 'cause I couldn't find it anywhere else.
    I enabled Restrictions under Settings > General > Restrictions and created a passcode (I'm not sure if this was part of the solution, but it wasn't enabled for me by default.)
    In Restrictions, under Privacy, Location Services was set to "Allow Changes" (This still didn't solve the issue of the greyed-out Location Services switch though - I still couldn't turn it on.)
    Also in Restrictions, I also switched "Find My Friends" to "Allow Changes"
    Once I did step 3, the switch under Settings > Privacy > Location Services was no longer greyed out and could be switched on.
    Hope this helps!

  • My iPhone safair says it cannot open because it is not connected to the internet.  What do I do? I do not believe I changed any settings.  I have turned the phone off but this did not work.

    Safari cannot open because the iPhone is not connected to internet.  I do not believe I have changed any settings.  I have turned off the phone and then on, but this did not work.  Help?

    For Safari to work, you need either Wi-Fi or cellular data.
    Are you connected to a Wi-Fi hotspot?
    If not is Settings > Mobile/Cellular > Mobile/Cellular Data: ON

  • I am having trouble looking at video podcasts on my ipod touch. they are all greyed out. I have tried removing them and resyncing. this did not work. any ides?

    I am having trouble looking at video podcasts on my ipod touch. they are all greyed out. I have tried removing them and resyncing. this did not work. any ideas?

    Try:
    - Reset the iOS device. Nothing will be lost
    Reset iOS device: Hold down the On/Off button and the Home button at the same time for at
    least ten seconds, until the Apple logo appears.
    - Unsync all media and resync
    - Reset all settings
    Go to Settings > General > Reset and tap Reset All Settings.
    All your preferences and settings are reset. Information (such as contacts and calendars) and media (such as songs and videos) aren’t affected.
    - Restore from backup. See:                                 
    iOS: How to back up           
    - Restore to factory settings/new iOS device.

  • I have just bought a new TATA PHOTON MAX, but, this is NOT working on my MAC LION 10.7.4.

    I have just bought a new TATA PHOTON MAX, but, this is NOT working on my MAC LION 10.7.4.
    I was using a Reliance Netconnect+ and that was working on the same machine. Kindly suggest if there is a way that the TATA PHOTON MAX can work on this.
    Thanks!!!

    Contact the maker of that product.

  • I am having trouble printing a PDF document. Whenever I click print nothing happens but when I am printing documents from Word, Excel etc they print without a problem. I've tried printing as image but that did not work. I uninstalled Adobe Reader XI and d

    I am having trouble printing a PDF document. Whenever I click print nothing happens but when I am printing documents from Word, Excel etc they print without a problem. I've tried printing as image but that did not work. I uninstalled Adobe Reader XI and downloaded Adobe Reader X instead and that still doesn't work. I have Windows 7.

    Hello,
    Please follow the link to troubleshoot the printing issues with Adobe Reader:- Troubleshoot PDF printing | Acrobat, Reader.
    Regards,
    Nakul

  • TS3988 Each time I log into iCloud, I check, Keep me logged in, but this does not work.  I have to reenter user name etc each time I try to go back to my iCloud account.

    Each time I log into iCloud, I check, Keep me logged in, but this does not work.  I have to reenter user name and password etc each time I try to go back to my iCloud account.

    Hi,
    In Keychain Access app in the Menu for the App is Keychain First Aid.
    If you open this is the tick box for Synchronising the Login password with the so called Login Keychain ticked ?
    9:49 pm      Monday; March 16, 2015
    ​  iMac 2.5Ghz i5 2011 (Mavericks 10.9)
     G4/1GhzDual MDD (Leopard 10.5.8)
     MacBookPro 2Gb (Snow Leopard 10.6.8)
     Mac OS X (10.6.8),
     Couple of iPhones and an iPad

  • My iTunes, on my computer is not syncing anything at all. We have tried re-downloading it but it does not work. Someone please help me?

    My iTunes, on my computer is not syncing anything at all. We have tried re-downloading it but it does not work. Someone please help me?

    Here:
    iOS: Device not recognized in iTunes for Windows
    or
    iPhone, iPad, iPod touch: Device not recognized in iTunes for Mac OS X

  • TS1365 My Mac book pre suddenly got power off meanwhile it was fully charged. I tried to turn on but it's not working. I reconnected charger and the green light showing with blinking.

    My Mac book pre suddenly got power off meanwhile it was fully charged. I tried to turn on but it's not working. I reconnected charger and the green light showing with blinking. How can I fix it?

    cooldedar wrote:
    I reconnected charger and the green light showing with blinking.
    Well the blinking light shows it's charging, however just to make sure.
    Reset the SMC, then connect the machine to a power source that doesn't have a lot of other power items on the same lines (in the walls) in the same room and see how it is in the morning.
    For instance use a powerline in another spare room that isn't being used as much.
    https://support.apple.com/kb/HT3964

Maybe you are looking for

  • Ipad won't start after updating to ios 8.1.3

    My iPad was working without issue prior to updating to IOS 8.1.3 yesterday. After updating, not only would the ipad not start, it produced intermittent tones. The tone heard when device is plugged into an outlet for charging. I attempted to turn the

  • Looking for and SQL query to match CTI OS agent login ID with the Directory Number (instrument)

    Hi All, I am looking for an SQL query to request the HDS database to find out which Directory Number / instrument  was associated with a specific CTI OS agent login ID. Has anyone done such a query before ? Thanks and Regards Nick

  • Cannot find the Person Object Class

    In Identity Server installation the Person object class is not accepting this recommended object "inetOrgPerson", "User" and Organizational Person" . What should be the person object class be supplied to make the installation continue? Is there anyth

  • How long did your MacBook Pro take to arrive?

    My MBP is coming direct from Apple but as it was purchased via a reseller I have no tracking. Its been over 9 working days already, but the apple site says 2-3 days is typical? I'm soooo excited but its quickly turning to disappointment with every af

  • How to install/compile broadcom-wl driver from the install cd?

    Hi there, Problem: I cannot proceed the installation of Arch by lack of internet connection. I have a MBPr that has a Broadcom 4360 wireless card. After a little research I found that this requires the broadcom-wl driver. However, the wl driver is no