Forcibly Shrink the Transaction Log in All DBs
For lazy folks who want to use 'sp_force_shrink_log' in all dbs. This script depends on 'sp_force_shrink_log' already existing.
2002-08-20
964 reads
For lazy folks who want to use 'sp_force_shrink_log' in all dbs. This script depends on 'sp_force_shrink_log' already existing.
2002-08-20
964 reads
This script can be used for generating the sql script for the constraints available on a particular table. There is a provision to generate script if the specified field(s) are part of the constraint.While specifing the field name , delimit them with ';'. Usage is ;Use pubs-- for generating the script for the tableexec Pre_Porting […]
2002-08-16
401 reads
This script monitors your errorlogs every 3 hours for the past 3 hours. It notifies you by email for all types of errors and by pager for all critical errors with severity type > 16. Saves lot of time when you have to monitor several servers every day 24x7. Run this script on a dedicated […]
2002-08-09
1,183 reads
There is a un-documented stored procedure in msdb called sp_reassign_dtspackageowner. Unfortunately, this requires a package name and will only work on one at a time. If one developer is taking over for another, it may be helpful to change all of Bob's dts packages over to Jim. The following procedure will do just that.Not sure […]
2002-08-05
447 reads
This script will run through the foreign keys on tables to produce a hierarchy of the tables in a database.This is useful when you need to purge and repopulate test databases with foreign key contraints
2002-07-24
2,040 reads
This script will provide the first four values required for estimating the size of a database table. It will satisfy steps one and two in MS estimation process for the amount of space required to store the data in a MS SQL Server v7.0 or v2000 table:1 Specify the number of rows present in the […]
2002-07-19
495 reads
This script creates a stored procedure to shrink the transaction log in the database it is created in. The stored procedure shrinks each transaction log file in the database, to the size specified.
2002-07-14
675 reads
Ever have trouble removing logins because of onwership issues and permission grants? This stored procedure checks for a login (sql or nt) on the local server and if found it then checks each database for ownership issues and granted permissions. The rules for action taken are listed in the header of the stored procedure. Works […]
2005-06-14 (first published: 2002-07-11)
944 reads
Hello,Here is a (another one, but improved) stored procedure that returns rowcounts for all tables in the current database, or only for @tablename, if provided. Output can be ordered by name or by number of rows.Improvement : Rowcount is right aligned and formatted with thousand separator.To use it : - open a connection on your […]
2002-07-11
304 reads
This is a very simple and small stored procedure which will help you identify repeated rows on any given table. This is specially useful for situations when you want to clean up a table and add a primary key on it, but you cannot until all duplication is eliminated. Only two parameter are necessary; table […]
2002-07-08
1,079 reads
By DataOnWheels
Picture this, your data ingestion team has created a table that has the sales...
By Brian Kelley
I did a post last month titled RTO and RPO are myths unless you've...
By Steve Jones
ioia – n.the wish that you could see statistics overlaid on every person you...
First off, my apologies for what could potentially be a bad title! I am...
I've inherited a couple of rather large databases from my ex-colleague when I join...
Comments posted to this topic are about the item Identifying Customer Buying Pattern in...
I have marked a few transactions in my code. How can I find out which marks were stored in a transaction log?
See possible answers