Home Microsoft SQL Server DigiMailing iRN Contact
    Keyword



sys.sp_describe_cursor_tables

  No additional text.


Syntax
-- Creation of sp_describe_cursor_tables

create procedure sys.sp_describe_cursor_tables
(  @cursor_return CURSOR VARYING OUTPUT,
   @cursor_source nvarchar (30),
   @cursor_identity nvarchar (128)
)
AS

declare @scope int
           
select @cursor_source = LOWER (@cursor_source collate Latin1_General_CI_AS)

/* Check if the cursor exists by name or handle. */
            
If cursor_status ( @cursor_source, @cursor_identity ) >= -1
    
begin
	if convert(varchar(30), @cursor_source) = 'local' OR
          
		convert(varchar(128), @cursor_source) = 'variable'
           
		select @scope = 1
          
	else
	if convert(varchar(30), @cursor_source) = 'global'
            
		select @scope = 2
          

	set @cursor_return =  	CURSOR LOCAL SCROLL DYNAMIC FOR
        
				SELECT table_owner, table_name, optimizer_hint, lock_type, server_name, objectid, dbid, dbname
				FROM sys.syscursorrefs scr, sys.syscursortables sct
        
				WHERE 	scr.cursor_scope = @scope and
					scr.reference_name = @cursor_identity and
					scr.cursor_handl = sct.cursor_handle
				FOR READ ONLY
            
	open @cursor_return
         
end

 
Last revision 2008RTM
News

  Query a named instance
Sybase+ASE+silent+install
SQL 2008 R2
Deprecated procedures in SQL2008
Reporting Services item-level role definitions
Create all your missing indexes
Converting datetime field
Start MSSQL Server Profiler at time
Replicating MSSQL Server views
Exploring Microsoft Sharepoint
The OLE DB provider "SQLNCLI10" for linked server indicates.
Mobile solar charger
Oracle to SQL Server replication
Cannot insert the value NULL into column
Undocumented Microsoft SQL Server 2008
VMware
Zoekmachine optimalisatie
SQL Servers hidden objects
FckEditor
Flash in Ajax
De hype die AJAX heet
Barcode scannen
MySQL; Gratis, makkelijk en snel!
PHP
sIFR; de combinatie tussen HTML en Flash