DECLARE name_cursor CURSOR FOR
SELECT name from sysobjects where xtype = 'U' and name <> 'dtproperties'
OPEN name_cursor
FETCH NEXT FROM name_cursor into @name
WHILE @@FETCH_STATUS = 0
BEGIN
set @xs = 'exec sp_rename '''+ @name + ''' ,'''+ upper( @name ) + ''''
exec ( @xs )
FETCH NEXT FROM name_cursor into @name
END
CLOSE name_cursor
DEALLOCATE name_cursor