Wednesday, November 16, 2011

Quickly disable triggers and keys


/* run before importing data */
-- SQL disable all triggers - disable all triggers sql server - t sql disable trigger
EXEC sp_MSforeachtable @command1="ALTER TABLE ? DISABLE TRIGGER ALL"
GO
-- SQL disable all constraints - disable all constraints sql server
EXEC sp_MSforeachtable @command1="ALTER TABLE ? NOCHECK CONSTRAINT ALL"
GO
/* deletes all existing data */
-- SQL disable all constraints - disable all constraints sql server
EXEC sp_MSforeachtable @command1="DELETE FROM ? "
GO

/* run after importing data */
-- SQL enable all triggers - enable all triggers sql server - t sql enable trigger
EXEC sp_MSforeachtable @command1="ALTER TABLE ? ENABLE TRIGGER ALL"
GO
-- SQL enable all constraints - enable all constraints sql server
-- sp_MSforeachtable is an undocumented system stored procedure
EXEC sp_MSforeachtable @command1="ALTER TABLE ? CHECK CONSTRAINT ALL"
GO

Tuesday, May 24, 2011

T410 USB not working - SOLVED

I tried posting this to the Lenovo Community thread but after I registered, everything was in German and it wouldn't let me post.

But, for those struggling with the same issue, here's how I solved it.

1. Right-click on "My Computer"
2. Select Manage
3. Expand the "Universal Serial Bus controllers"
4. Right-click on the first "USB Root Hub"
5. Select Properties
6. Select the "Power Management" tab
7. Uncheck "Allow the computer to turn off this device to save power."
8. Click OK
9. Repeat steps 4-8 for the other "USB Root Hub"
10. Right-click each USB Root Hub and uninstall each one
11. Right-click on the "Universal Serial Bus controllers"
12. Select "Scan for hardware changes"
13. Let all the stuff reconnect (USB hubs, camera, fingerprint, AND MOUSE! :)
14. Done!

Tuesday, February 8, 2011

CSS Compressor

I found this the other day. Another nice compressing tool, but this one is for CSS.

http://www.cssdrive.com/index.php/main/csscompressor