Server32 (Win2003 Standard 32 bit, SQL2005 Developer 32 bit SP1 CTP, 1gb Memory) and with
Server64 (Win2003 x64 Standard 64 bit, SQL2005 Developer 64 bit SP1 CTP, 6gb Memory).
exec sp_MSforeachtable @.command1="SET QUOTED_IDENTIFIER ON DBCC DBREINDEX ('?', '', 90)"
On Server32 the SQL above runs without errors. On Server64 there comes the following error message:
Msg 8621, Level 17, State 1, Line 1
The query processor ran out of stack space during query optimization. Please simplify the query.
A 64bit server with 6gb memory has less stack space than a 32bit server with 1gb memory?
Regards
Peter
PS: I know sp_MSforeachtable is not an official stored procedure, but I don't thinkt there's the problem. I got the same error on Server64, when I run the following cursor:
DECLARE tablename CURSOR
READ_ONLY
FOR select [name] from sys.tables where type = 'U'
DECLARE @.name varchar(80)
OPEN tablename
FETCH NEXT FROM tablename INTO @.name
WHILE (@.@.fetch_status <> -1)
BEGIN
IF (@.@.fetch_status <> -2)
BEGIN
DECLARE @.message varchar(800)
SELECT @.message = 'SET QUOTED_IDENTIFIER ON DBCC DBREINDEX (''' + @.name + ''', '''', 90)'
EXEC (@.message)
END
FETCH NEXT FROM tablename INTO @.name
END
CLOSE tablename
DEALLOCATE tablename
GO
Please file a bug using the MSDN Product Feedback Center. And mention the OS platform, server versions, number of tables in the database etc.|||Bug report created
Thanks
Peter