Always close your cursor





5.00/5 (3 votes)
To see the default value of the cursor scope:select * from sys.databases(if value of "is_local_cursor_default" is 0 then scope id global, otherwise it is local).The scope is GLOBAL by default (for compatibility reasons).To change default scope use following:ALTER DATABASE...
To see the default value of the cursor scope:
select * from sys.databases
(if value of "is_local_cursor_default" is 0 then scope id global, otherwise it is local).
The scope is GLOBAL by default (for compatibility reasons).
To change default scope use following:
ALTER DATABASE [YourDatabase] SET CURSOR_DEFAULT LOCAL;