Oracle_Flashback_Important_Queries

Instance Information : set linesize 300 select name||’ – ‘||instance_name||’@’||host_name||’ – ‘||DB_UNIQUE_NAME||’ – ‘||version||’ – ‘||open_mode||’ – ‘||to_char(startup_time,’DD-MON-YYYY HH24:MI:SS’) || ‘ – ‘|| database_role from v$database, v$instance; FRA Usage : set linesize 300 col file_type for a40 select * from V$FLASH_RECOVERY_AREA_USAGE; Check Restore Point :… Read More

Capture SQL Server Important Details

Capture SQL Server Important Details Please find the below script to capture SQL Server Important Details before upgrade, migration etc. PRINT ‘***************** Server Name ********************’ SET NOCOUNT ON select @@SERVERNAME go PRINT ‘***************** Version ********************’ SET NOCOUNT ON select @@version go PRINT ‘***************** License Information********************’… Read More

Find Percent Completion of Process

Find Percent Completion of Process This script is to find the percent of completion of backup, restore, DBCC commands etc. SELECT req.session_id, sqltext.TEXT, req.status, req.command, req.wait_type, req.wait_time, (req.estimated_completion_time/1000/60) as est_min, req.percent_complete FROM sys.dm_exec_requests req CROSS APPLY sys.dm_exec_sql_text(sql_handle) AS sqltext join sys.dm_exec_sessions ses on ses.session_id =… Read More