Dropping all Triggers
When implementing a pilot study of audit trail triggers, you often want a way of removing all triggers in the database in order to retest your scripts: here it is!
2001-11-08
1,502 reads
When implementing a pilot study of audit trail triggers, you often want a way of removing all triggers in the database in order to retest your scripts: here it is!
2001-11-08
1,502 reads
Like the one posted before, the use of the SP is like this: proc_alerts 1,18. This will show the first 18 alerts on the system. OR proc_alerts 20,35 will show from 20 to 35. This lets you manage the list without letting go out of the screen.
2001-11-03
1,042 reads
This script updates all foreign key references for the specified table. Useful if you need to delete a row. The follow example would update all uses of TableA.IDENTITYCOL where the value is 1 to the value of 2. Example usage: EXEC usp_updateFK 'TableA', 1, 2
2001-11-03
1,452 reads
Ever wanted to know whether your triggers are enabled or not? The ObjectProperty command allows you to select information about the status of objects in your database, returning 1 for True and 0 for False. The example below determines whether a single trigger is disabled. SELECT ObjectProperty(object_id('Trigger_Name'), 'ExecIsTriggerDisabled') There are a number of other useful […]
2001-10-28
1,273 reads
This script will change the owner of the stored procedure to dbo. It must be run in the same database as the stored procedures.
2001-10-28
1,599 reads
If you are using OSQL or ISQL from DOS querys are really hard to use, because the result is to big for the screen. With this procedure, you can especify from wich column to wich column show the list of tables. For Example: proc_tables master, 3, 10 will show you only a short list of […]
2001-10-28
753 reads
This stored procedure performs a full backup on all databases on a server. It takes a parameter for a drive letter and will create the backup structure as needed. The standard backup structure is "\mssql\backup\".
2001-10-22
554 reads
Displays identity column values, number of rows in the table, and the difference between the two. The difference can indicate the amount of deletions that could be going on.
2001-10-21
933 reads
Now you can run administrative T-SQL tasks against all your databases in one shot. Very usefull for environments that have a seperate database for each client, ASP's, etc. It's pretty straight forward and can be used for almost any task. This example Looks for a table and prints the database name and selects from the […]
2001-10-21
3,113 reads
Select dateadd(month, 1 ,getdate()) gives the exact date of next month , then find the day of that date. Now back to that days i.e exactly last date of the given month.
2001-10-14
542 reads
By Steve Jones
This is my last week of the year working (I guess I come back...
By Steve Jones
suente– n. the state of being so familiar with someone that you can be...
Anyone (everyone?) who has ever tried to learn a programming language knows that to...
I am getting the below error when I execute a SQL command in SQL...
I am getting the below error when I execute a SQL command in SQL...
Hi everyone. I have this table and this information. (left side of the image)...