infodb

scripts>infodb

 


— Especificacion: Con este script se pretende obtener toda la informaci\363n necesaria para recrear, en
— caso de necesario, una Base de Datos.

— ——————————————————————————————————-

!echo $ORACLE_SID

spool ScriptInfoBBDD_Apolo_$ORACLE_SID.log

prompt ############################################################################
prompt ##
prompt ## Script Para Obtener toda la informaci\363n necesaria para recrear una BBDD #
prompt ##
prompt ############################################################################

prompt
prompt

set linesize 180
set pagesize 5000

Select name Nombre_BBDD from v$database;
select instance_name Nombre_Instancia from v$instance;

! echo Oracle_Home = $ORACLE_HOME

prompt
prompt
prompt VERSION DE ORACLE
prompt #################

prompt

select * from x$version;

prompt
prompt
prompt VERSION DEL SISTEMA OPERATIVO
prompt #############################

prompt

! uname -a

prompt
prompt
prompt OBTENER LOS PAR\301METROS DE INIT<SID>.ORA
prompt #######################################

PROMPT

set linesize 180
col name format a80
col value format a80

select distinct name, value
from v$parameter
where isdefault=’FALSE’;

prompt
“ScriptInfoBBDD.sql” 179 lines, 4134 characters

prompt
prompt
prompt CREACI\323N DE LOS SEGMENTOS DE ROLLBACK
prompt #####################################

prompt

col Segmento format a15
col Tablespace format a15
col Inicial format 999999999
col Next format 999999999
col MinExtent format 999999999
col MaxExtent format 999999999
col PctInc format 999

select segment_name Segmento, tablespace_name Tablespace, initial_extent Inicial, next_extent Next, min_extents MinExtent,
max_extents MaxExtent,pct_increase PctInc
from dba_rollback_segs;
select ‘create rollback segment ‘||segment_name||’ tablespace ‘||tablespace_name||’ storage (‘||’initial ‘||initial_extent||
‘ next ‘||next_extent||’ minextents ‘||min_extents||’ maxextents ‘||max_extents||’);’ Crear_Segmentos_Rollback
from dba_rollback_segs
where segment_name!=’SYSTEM’;

select ‘alter rollback segment ‘||segment_name||’ online;’ Poner_ONline_Segmentos
from dba_rollback_segs
where segment_name!=’SYSTEM’;
spool off;

Comment

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s