Blog Archives

MS SQL Server – Disabling or enabling all triggers in a database

To Disable all triggers, run this script, then run the results SELECT ‘ALTER TABLE ‘+ NAME +  ‘ DISABLE TRIGGER ALL’FROMsysobjectswhere XTYPE =‘u’   To Enable all triggers, run this script, then run the results SELECT ‘ALTER TABLE ‘+ NAME

Posted in How To Guides

t-sql script to rename all tables in a database

Sometimes we want to rename every table in a database, for example, Access has a habit of appending prefixes to tables instead of the schema, if we upload these again to sql we have a load of table names with

Posted in How To Guides

SQL Script to Move Data As Well As Schema

Moving a SQL Database schema is easy, and I have been generating the scripts for this for a long time. But I recently learned that by digging into the advanced options, there is a well buried option to script the

Posted in How To Guides

How To Layout Controls In Visual Studio Win Forms Project

Keeping controls aligned can be tedious, but Visual Studio contains some features that make this easier. To Align controls, by their edges or centers, select first the control that is in the correct position, then hold down the ctrl and

Posted in How To Guides