June 12, 2006 at 11:53 am
OK, I have been reading my wonderful "SQLServer 2000 FAST ANSWERS" and I realize that I need to alter the job that is failing on the opt/integrity check. I manually run the opt of the database and I use the Set Arithabort ON, set Quoted_Identifier ON. The question is, how do I alter the job exec code to take care of that part?? Also, the integrity portion of the job is failing due to a column in one table that is a sql varient. WUSSUP WIF DAT????? Any ideas oh wise ones?? Thanks in advance, you all are my saving grace.....
June 12, 2006 at 12:34 pm
June 12, 2006 at 12:44 pm
June 13, 2006 at 11:17 am
Here's a couple of code snippets that MS gave me as a workaround when I ran into this issue with the MOM (Microsoft Operatinos Management) database:
Set QUOTED_IDENTIFIER ON
Set ARITHABORT ON
DECLARE @table_name varchar(1000),@sql nvarchar(4000)
declare c1 cursor for SELECT name
FROM sysobjects
WHERE xtype = 'U'
open c1
fetch next from c1 into @table_name
while @@Fetch_Status = 0
begin
Select @sql = 'UPDATE STATISTICS ['+ @table_name +'] WITH FULLSCAN'
print @sql
exec sp_executesql @sql
fetch next from c1 into @table_name
end
close c1
deallocate c1
GO
... and ...
SET ANSI_NULLS ON
SET ANSI_PADDING ON
SET ANSI_WARNINGS ON
SET ARITHABORT ON
SET CONCAT_NULL_YIELDS_NULL ON
SET QUOTED_IDENTIFIER ON
SET NUMERIC_ROUNDABORT OFF
GO
EXEC SP_MSForEachTable "DBCC DBREINDEX ('?')"
GO
RegardsRudy KomacsarSenior Database Administrator"Ave Caesar! - Morituri te salutamus."
June 13, 2006 at 1:12 pm
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply