I am working with a large database with a number of stored procedures that we have used for years and when I run one procedure on SQL Server Manager 2005 it takes about 35 seconds to run. When I run the same query on the same database only using SQL Server Manager 2008 it takes over 10 minutes (not sure exactly how long because I always stop it after 10 minutes and just remote into a computer with Manager 2005 and do it in 35 seconds). I am wondering why this query is so different depending on which it is run in, see the code below.SET ANSI_NULLS ONGOSET QUOTED_IDENTIFIER OFFGOALTER PROCEDURE [dbo].spGrantAllToOne] @User varchar(50)ASDECLARE @name varchar(100)DECLARE curMain CURSOR for select name from sysobjects where uid = 1 and type not in ('TR','D','K','F')FOR READ ONLYOpen curMainfetch next from curmain into @namewhile @@FETCH_STATUS = 0begin SELECT @name, @User execute('grant all on [' + @name + '] to [' + @User +']') fetch next from curmain into @nameendclose curmaindeallocate curmainThanks in advance for any help you can give.