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,500 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,500 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,450 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,267 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,598 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
552 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
932 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,111 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
The episode on data masking and subetting is out. You can see it here:...
By Brian Kelley
I'm listening to Effortless by Greg McKeon (link to author's page) through Audible.com. He...
This book was making its rounds on social media, and the concept seems interesting...
I am using the following sql to convert rows into columns for each pid,...
Comments posted to this topic are about the item Ingesting Data From REST API...
Comments posted to this topic are about the item Separate Reads
What are the two inputs called to a hash join operation in SQL Server? (choose 2)
See possible answers