Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.
SELECT c.session_id as "session id", c.name, c.properties as "The cursor properties", c.creation_time as "Cursor creation time", c.is_open as "is the Cursor opened" , t.text as "The SQL Query" FROM sys.dm_exec_cursors (54) c CROSS APPLY sys.dm_exec_sql_text (c.sql_handle) t
SELECT @Cursor_SessionID = c.session_id, @Cursor_Name= c.name, @Cursor_Pro = c.properties, @Cursor_CreationTime = c.creation_time, c.is_open as "is the Cursor opened" , @Cursor_query= t.text FROM sys.dm_exec_cursors (@spid) c CROSS APPLY sys.dm_exec_sql_text (c.sql_handle) t
DECLARE db_cursor CURSOR FOR SELECT spid, loginame, program_name, hostname as "From host", login_time, last_batch, DB_NAME(dbid) AS "Against database" , (SELECT text FROM sys.dm_exec_sql_text(sql_handle))as "Query executed" FROM master..sysprocesses WHERE loginame= 'ixapi' and open_tran > 0 and DATEDIFF (minute, login_time, GETDATE()) > @Total_time_Executed ;
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.