Posts

Showing posts from June, 2018
addition of  asm disk group  . 7738417766 .. ALTER DATABASE OPEN READ ONLY; dba lsblk                        8:0    0   50G  0 disk âsdq1                   65:1    0   50G  0 part sdr                      65:16   0   50G  0 disk ââsdr1                   65:17   0   50G  0 part  ----> [root@xxxxxx_09~]# oracleasm createdisk ORADATA14  /dev/sdr1 Writing disk header: done Instantiating disk: done [root@xxxxxx_09~]# [root@xxxxxx_09~]# [root@xxxxxx_09~]# oracleasm scandisks Reloading disk partitions: done Cleaning any stale ASM disks... Scanning system for ASM disks... [root@xxxxxx_09~]# oracleasm listdisks ARCHIVE2 OCR2 ORADATA10 O...

Database growth script per day & per week

SET LINESIZE 200 SET PAGESIZE 200 COL "Database Size" FORMAT a13 COL "Used Space" FORMAT a11 COL "Used in %" FORMAT a11 COL "Free in %" FORMAT a11 COL "Database Name" FORMAT a13 COL "Free Space" FORMAT a12 COL "Growth DAY" FORMAT a11 COL "Growth WEEK" FORMAT a12 COL "Growth DAY in %" FORMAT a16 COL "Growth WEEK in %" FORMAT a16 SELECT (select min(creation_time) from v$datafile) "Create Time", (select name from v$database) "Database Name", ROUND((SUM(USED.BYTES) / 1024 / 1024 ),2) || ' MB' "Database Size", ROUND((SUM(USED.BYTES) / 1024 / 1024 ) - ROUND(FREE.P / 1024 / 1024 ),2) || ' MB' "Used Space", ROUND(((SUM(USED.BYTES) / 1024 / 1024 ) - (FREE.P / 1024 / 1024 )) / ROUND(SUM(USED.BYTES) / 1024 / 1024 ,2)*100,2) || '% MB' "Used in %", ROUND((FREE.P / 1024 / 1024 ),2) || ' ...

stats gather on database

How to check stats  gather with  date  & Time select OWNER,TABLE_NAME,to_char(LAST_ANALYZED,'DD-MON-YY HH:MI:SS AM') from dba_tables where OWNER='PROD_OLAP'  and LAST_ANALYZED NOT Like  '%18-FEB-19%'  and LAST_ANALYZED NOT Like '%17-FEB-19%' SELECT pname, pval1 FROM sys.aux_stats$ WHERE sname = 'SYSSTATS_MAIN'; EXEC DBMS_STATS.gather_system_stats; Manually start and stop to sample a representative time (several hours) of system activity. EXEC DBMS_STATS.gather_system_stats('start'); EXEC DBMS_STATS.gather_system_stats('stop'); -- Sample from now until a specific number of minutes. DBMS_STATS.gather_system_stats('interval', interval => 180);