0% found this document useful (0 votes)
12 views

Scripts Oracle Gem

The document discusses expanding the tablespace 'sir2010' by adding multiple datafiles of size 32678MB each to the tablespace on the ASM disk '+ASMDISK1'. It also mentions validating the database instance and running a script.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views

Scripts Oracle Gem

The document discusses expanding the tablespace 'sir2010' by adding multiple datafiles of size 32678MB each to the tablespace on the ASM disk '+ASMDISK1'. It also mentions validating the database instance and running a script.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

gemrac01 - 10.50.1.

181
soporten1db
7&2olKxPU&SeW%nIp%b7

cd dbn1
. gem.env
History (sqlplus)

****Antes
set linesize 200
set pages 250
col tname format a35 justify c heading 'Tablespaces'
col totsiz format 999,999,999,990 justify c heading 'Total|(MB)'
col avasiz format 999,999,999,990 justify c heading 'Disponible|(MB)'
col pctusd format 990 justify c heading 'Pct|Used'
comp sum of TOTAL_SPACE(Mb) Free_space(Mb) Used_space(Mb) on report
break on report
SELECT Total.tablespace_name "Tablespace Name",
total_space,
round(nvl(Free_space, 0)) Free_space,
round(nvl(total_space-Free_space, 0)) Used_space,
round(NVL(Free_space/total_space,0)*100,2) PCT_Libre,
(100-round(NVL(Free_space/total_space,0)*100,2)) PCT_ocupado
FROM
(select tablespace_name, sum(bytes/1024/1024) Free_Space
from sys.dba_free_space
group by tablespace_name)Free,
(select b.tablespace_name, sum(bytes/1024/1024) TOTAL_SPACE
from dba_data_files b
group by b.tablespace_name) Total
WHERE Free.Tablespace_name(+) = Total.tablespace_name
and Total.tablespace_name = upper('sir2010')
ORDER BY 6 desc;

alter tablespace sir2010 add datafile '+ASMDISK1' size 32678M,'+ASMDISK1' size


32678M,'+ASMDISK1' size 32678M,'+ASMDISK1' size 32678M,'+ASMDISK1' size 32678M,
'+ASMDISK1' size 32678M,'+ASMDISK1' size 32678M,'+ASMDISK1' size 32678M,'+ASMDISK1'
size 32678M,'+ASMDISK1' size 32678M, '+ASMDISK1' size 32678M,'+ASMDISK1' size
32678M,'+ASMDISK1' size 32678M,'+ASMDISK1' size 32678M,'+ASMDISK1' size
32678M,'+ASMDISK1' size 10240M;

****Ejecutar Grant
gemrac01 - 10.50.1.181
soporten1db
7&2olKxPU&SeW%nIp%b7

cd dbn1
. gem.env
History (sqlplus)

validar instancia
+++++++++++++++++++++++
set linesize 1000
col HOST_NAME format a35;
select unique gi.inst_id, host_name, instance_name,open_mode, log_mode, status,
to_char(startup_time, 'DD-MON-YY HH24:MI') "Startup time",gi.LOGINS
from gv$instance gi, gv$database gd;
+++++++++++++++++++++
ejecuta el script que mandaron
+++++++++++++++++++++++
!date
+++++++++++++++++
y listo

You might also like