This script creates a temp table of all the tables in a database and loops through a cursor to truncate them.
2001-08-22
714 reads
jamie,
2003-11-20
This script creates a temp table of all the tables in a database and loops through a cursor to truncate them.
DECLARE @table varchar(64), @sql varchar(150) DECLARE curTable SCROLL CURSOR FOR SELECT name FROM sysobjects WHERE Type = 'U' And Name <> 'dtproperties' ORDER BY name OPEN curTable FETCH FIRST FROM curTable INTO @table WHILE (@@FETCH_STATUS = 0) BEGIN set @sql = 'truncate table ' + Cast(@table as varchar) --print @sql exec (@sql) FETCH NEXT FROM curTable INTO @table END CLOSE curTable DEALLOCATE curTable
2001-08-22
714 reads
2001-08-22
366 reads
Very simple, how much space is free on the hard drives of the SQL Server you are connected to.
2001-08-22
652 reads
Get OLE Providers info I have found this useful in tracking down application driver/connection issues. I only had to use it 2 times. But it did help
2001-08-22
399 reads
2001-08-22
699 reads