Reset Identity Columns for Tables Using Them
For all tables in the current database, it will script the DBCC command to reset the identity seed to 1 for all columns using them. Very handy for data migration.
2002-01-01
844 reads
For all tables in the current database, it will script the DBCC command to reset the identity seed to 1 for all columns using them. Very handy for data migration.
2002-01-01
844 reads
This script will allow you to create a stored procedure that will check a server for any jobs that have failed in a specified number of days. It has proven valuable to me, since I have servers with lots of jobs that run frequently; I got tired of checking the history of each job to […]
2002-01-01
4,452 reads
Problems with error 512 more than 1 result returned due to the operator outside of the query. Found this when tested with multiple blocks going on at once. It worked fine when there was only 1 block. Depending on the type of server there can be a "whole lot of blocking going on "Replaced with […]
2002-01-01
820 reads
This uses sp_MStablespace from an article on this site and a cursor to run against all tables in the context of the db it is called in. One catch is it does not like table names with spaces.
2001-12-30
761 reads
This simple view will return the name, loginname,hasaccess,dbname and create date and updatedate where sysadmin or serveradmin is set to 1 from the syslogin table. If the hasaccess column is set to 1 the access is granted.
2001-12-28
1,319 reads
This is a script, similar to some you have seen in the past, that will monitor file growth on all databases for the given server. This script is not a fancy solution that has a tons of bells and whistles but, it is efficient. The script is a concantanation of the create table / populate […]
2001-12-21
3,379 reads
Having two tables Parent and Derived in ont-to-many relations we want to realize a cascade delete so that for a certain list of parent to delete all the coresponding items from Derived I use a INSTEAD OF DELETE.
2001-12-18
887 reads
Usually when we recreate or rename a table we need to give the appropriate access permissions to the SQL users...this is very common in database under development environment where frequently table structure changes and we have to recreate it....we can accomplish this with Enterprise Manager but what will you do if Enterprise Manager fails to […]
2001-12-18
839 reads
System Stored Procedure to List the Table Definition of a table as a printable report. The procedure must exist in the master database. This works for any table in the current database. Do not fully qualify the tablename. Calling sample: use pubs exec sp_listtabledef 'authors'
2001-12-18
3,432 reads
This script lists the columns with type and length. It eliminates system tables.
2001-12-13
780 reads
By Zikato
TSQL ScriptDOM is a useful library for parsing scripts into an abstract syntax tree....
By DataOnWheels
Over the past few months, I have debated starting a new blog to discuss...
By Steve Jones
It’s that time of the month again, and once again, I’m late and I’m...
Comments posted to this topic are about the item Do You Really Need HA?
Comments posted to this topic are about the item The New Database CheckDB
Comments posted to this topic are about the item MySQL’s BLACKHOLE Storage Engine: The...
I run this code:
create database experiment
go
use Experiment
go
select DATABASEPROPERTYEX('Experiment', 'LastGoodCheckDbTime')
What is returned? See possible answers