Sure, you can script it, but you have to get the table names into the script somehow.
One option is to have an admin table that holds the table names. Then,
declare @tablename sysname
declare @sql varchar(128)
select tablename, 0 as processed into #droptables
while (select count(*) from #droptables where processed = 0) > 0
BEGIN
select top 1 @tablename from #droptables where processed = 0
set @sql = 'DROP TABLE '+@tablename
exec (@sql)
update #droptables set processed = 1 where tablename = @tablename
END
Thank you for your advice. I managed to remove all the table and I am now getting a different error. Basically what is happening is that SharePoint wanted me to clear out the search table before enabling the search function. Now SP is throwing an error:
The specified database has an incorrect collation. Rebuild the database with the Latin1_General_CI_AS_KS_WS collation or create a new database.
The ALTER DATABASE command can be used to change a single Database's collation.
Catadmin - MCDBA, MCSA
"No, no. Yes. No, I tried that. Yes, both ways. No, I don't know. No again. Are there any more questions?"
-- Xena, "Been There, Done That"
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.