Tuesday, June 6, 2023

Oracle Database Login status with creation time and startup time

set pages 1000 lines 180
col HOST_NAME for a29;
col name for a12;
col DATABASE_ROLE for a18;
col startup_time for a20;
col DATABASE_ROLE for a20

select name,database_role,a.INST_ID,INSTANCE_NAME,HOST_NAME,to_char(startup_time, 'HH24:MI DD-MON-YY') "Startup_Time",CREATED,LOGINS,open_mode from gv$instance a,gv$database b where a.INST_ID=b.INST_ID order by INSTANCE_NUMBER,HOST_NAME,INSTANCE_NAME,CREATED;


No comments:

Post a Comment

Extraction Multiple SQL Workflow for Automation.

 Step 1: Prepare the Folder Create a folder with the SER number under: /monito_sam/extract_output/Extracts Copy all required *.sql files int...