Use in query analyzer or mgmt studio
Help! My Database is Marked Suspect.
If your database is marked suspect, this will show you a step-by-step guide in how to fix the problem.
2007-09-22 (first published: 2004-03-31)
58,842 reads
Brant van Lindenburg,
2008-08-01
Use in query analyzer or mgmt studio
/* Created by Brant van Lindenburg 7/31/2008 */ DECLARE @name VARCHAR(50) -- database name DECLARE @i int declare @vsql varchar(1900) DECLARE db_cursor CURSOR FOR SELECT name FROM master.dbo.sysdatabases --you can comment out this next line if you want thes included WHERE NOT name IN ('tempdb','master','model','msdb') order by name OPEN db_cursor FETCH NEXT FROM db_cursor INTO @name WHILE @@FETCH_STATUS = 0 BEGIN -- SET @fileName = @path + @name + '_' + @fileDate + '.BAK' -- BACKUP DATABASE @name TO DISK = @fileName Select @name --The select statement is courtesy of James Rea found on SQLServerCentral.com set @vSQL = 'Use [' + @name +'] ' + 'SELECT o.name AS "Table Name", i.rowcnt AS "Row Count" FROM sysobjects o, sysindexes i WHERE i.id = o.id AND indid IN(0,1) ORDER BY i.rowcnt DESC COMPUTE SUM(i.rowcnt)' Print @vsql exec(@vsql) FETCH NEXT FROM db_cursor INTO @name END CLOSE db_cursor DEALLOCATE db_cursor
If your database is marked suspect, this will show you a step-by-step guide in how to fix the problem.
2007-09-22 (first published: 2004-03-31)
58,842 reads
The second part of Steve Jones's series on having SQL Server automatically report information to a DBA.
2003-12-25
13,017 reads
So you've created a diagram that you now need to transfer to a different server or database. This article will show give you a step-by-step guide on how to do this.
2003-11-13
11,576 reads
When transferring a database to a new server, you are bound to experience a user problem. In this article by Neil Boyle, he shows you how to transfer passwords and accounts seamlessly to a new server.
2007-10-02 (first published: 2002-08-14)
24,376 reads
An interesting feature added to SQL Server 7.0 and 2000 is the ability to purge
an error log through a stored procedure or DBCC command. In this article, Brian Knight shows some of the undocumented stored procedures to detect, read and purge an SQL Server error log in T-SQL.
2001-06-27
14,697 reads