User Tables and their row count
Returns the Owner, Table Name, Row count for all user tables in the current database.
2002-03-11
606 reads
Returns the Owner, Table Name, Row count for all user tables in the current database.
2002-03-11
606 reads
When rebuilding a server or setting up a backup or DR server the logins need to be added into master and synchronised with the user databases.Inevitably there are orphaned users is sysusers or the sid's do not match with syslogins.I use this stored procedure to check for a particular user when the user experiences a […]
2002-03-07
819 reads
--Delete all restrictions from those tables included in the input parameters Procedure HP_BORRA_CONSTRAINTS -- Include CHECK, FOREIGN KEY, PRIMARY KEY, UNIQUE, and DEFAULT constraints.
2002-03-07
461 reads
I was posed a question a few months back on another site about being about to create a Pivot Table (Horizontal version of vertical data) and I saw the question again today. This will allow you to do that, just make changes to the query where the title is the replacement need. It will build […]
2002-03-07
1,324 reads
By using this script one can find number of rows for each and every table in a database. Just cut and past this script in your DB and excute. A stored procedure will be created as 'Get_rowcounts_for_eachtable'. If U excuted this stored procedure, U can get all tablenames and rowcounts for respected […]
2002-03-07
584 reads
This will report all backup activity for all databases, sorted by date, so you see the last backup activity first. You can filter this one by a db name as well, and only see the backup info for said database.
2002-03-07
804 reads
This will get the last date a database was backuped. It allows you to report this date on all databases on a server, or pass in a db name, and it'll report the date that db was last backed up
2002-03-07
443 reads
I use this SP to return full directory information into a table. FilePath, FileName, Filedate and FileSize are parsed from a 'dir /n/on/-c ' command. FilesInDir is the table created. usage: exec LoadFileDetailsIntoTable 'c:\winnt'select * from FilesInDir where filesize > 100000select min(fileDate) from FilesInDirThe Return Code will equal the number of files found.
2002-03-05
468 reads
spAddField is the proc I use to add all fields to the db in our upgrade scripts. With this proc, you pass it the tablename, fieldname, datatype, and null or not null. This will call spGetFieldsExists and see if the fields exists or not. If it does, spAddField will drop that column. Then it readds […]
2002-03-05
222 reads
spDropField does exactly the opposite of spAddField. It checks for existence, then drops it, if it does exist.
2002-03-05
144 reads
By Chris Yates
I get asked a lot about why or how I began working with databases...
By Steve Jones
Earlier this year I visited a customer that was using the Redgate Monitor webhook...
By Zikato
TSQL ScriptDOM is a useful library for parsing scripts into an abstract syntax tree....
Comments posted to this topic are about the item SQL Server 2025 Unveiled: The...
Hi, we lost our sever sql2000 To restore database to a new one we...
Comments posted to this topic are about the item Do You Really Need HA?
I run this code:
create database experiment
go
use Experiment
go
select DATABASEPROPERTYEX('Experiment', 'LastGoodCheckDbTime')
What is returned? See possible answers