Oracle Live

11/04/2016

QUERY – Database

Filed under: Queries — mogukiller @ 11:21 pm
Tags:

-- Componentes instalados en la base de datos

COL Component for a70
select comp_name "Component", status from dba_registry;

/*
Component                                                              STATUS
---------------------------------------------------------------------- -----------
OWB                                                                    VALID
Oracle XML Database                                                    VALID
Oracle Text                                                            VALID
Oracle Expression Filter                                               VALID
Oracle Rules Manager                                                   VALID
Oracle Workspace Manager                                               VALID
Oracle Database Catalog Views                                          VALID
Oracle Database Packages and Types                                     VALID
JServer JAVA Virtual Machine                                           VALID
Oracle XDK                                                             VALID
Oracle Database Java Packages                                          VALID
Oracle Real Application Clusters                                       VALID
*/

-- NLS Parameters

SELECT * FROM NLS_DATABASE_PARAMETERS ORDER BY 1;

/*
PARAMETER                      VALUE
------------------------------ ---------------------------------
NLS_CALENDAR                   GREGORIAN
NLS_CHARACTERSET               AL32UTF8
NLS_COMP                       BINARY
NLS_CURRENCY                   ?
NLS_DATE_FORMAT                DD/MM/RR
NLS_DATE_LANGUAGE              SPANISH
NLS_DUAL_CURRENCY              ?
NLS_ISO_CURRENCY               SPAIN
NLS_LANGUAGE                   SPANISH
NLS_LENGTH_SEMANTICS           BYTE
NLS_NCHAR_CHARACTERSET         AL16UTF16
NLS_NCHAR_CONV_EXCP            FALSE
NLS_NUMERIC_CHARACTERS         ,.
NLS_RDBMS_VERSION              11.2.0.4.0
NLS_SORT                       SPANISH
NLS_TERRITORY                  SPAIN
NLS_TIME_FORMAT                HH24:MI:SSXFF
NLS_TIMESTAMP_FORMAT           DD/MM/RR HH24:MI:SSXFF
NLS_TIMESTAMP_TZ_FORMAT        DD/MM/RR HH24:MI:SSXFF TZR
NLS_TIME_TZ_FORMAT             HH24:MI:SSXFF TZR
*/

-- Tamaño de los segments de una base de datos

SELECT ROUND(SUM(BYTES)/1024/1024/1024,2) "SEGMENT SIZE(GB)" FROM DBA_SEGMENTS;

/*
SEGMENT SIZE(GB)
----------------
          926,02
*/

-- Role de la base de datos e informacion de las instancias.

COL NAME FOR A30
COL HOST FOR A30
COL START FOR A30
SELECT 
	A.INSTANCE_NUMBER "INST_ID",
	A.INSTANCE_NAME "NAME",
	A.HOST_NAME "HOST",
	TO_CHAR(A.STARTUP_TIME,'YYYY/MM/DD HH24:MI:SS') "START",
	B.OPEN_MODE, B.DATABASE_ROLE 
FROM GV$INSTANCE A, V$DATABASE B ORDER BY INST_ID;

/*
   INST_ID NAME                           HOST                           START                          OPEN_MODE            DATABASE_ROLE
---------- ------------------------------ ------------------------------ ------------------------------ -------------------- ----------------
         1 PABIL01                        mogube041                      2016/01/08 13:18:50            READ WRITE           PRIMARY
         2 PABIL02                        mogube042                      2016/01/08 13:19:37            READ WRITE           PRIMARY
*/

Dejar un comentario »

Aún no hay comentarios.

RSS feed for comments on this post. TrackBack URI

Responder

Introduce tus datos o haz clic en un icono para iniciar sesión:

Logo de WordPress.com

Estás comentando usando tu cuenta de WordPress.com. Cerrar sesión / Cambiar )

Imagen de Twitter

Estás comentando usando tu cuenta de Twitter. Cerrar sesión / Cambiar )

Foto de Facebook

Estás comentando usando tu cuenta de Facebook. Cerrar sesión / Cambiar )

Google+ photo

Estás comentando usando tu cuenta de Google+. Cerrar sesión / Cambiar )

Conectando a %s

Blog de WordPress.com.

A %d blogueros les gusta esto: