Essential Maintance Of MGMTDB

Today I want to talk about the most basic maintenance we can do of the MGMTDB (MGMTDB is new database instance which is used for storing Cluster Health Monitor (CHM) data). Let’s see the minimum commands that we must keep in mind to work with this database;

To check database;

srvctl status mgmtdb

To start database;

srvctl start mgmtdb [-startoption start_options] [-node node_name]

To set up database;

srvctl config mgmtdb

Like an Oracle database, it has its own listener, and you can perform the same operations, for example (from the owner of the GRID);

lsnrctl status MGMTLSNR

To connect to the database with sqlplus we must first point to the ORACLE_SID (from the owner of the GRID);

export ORACLE_SID=-MGMTDB
sqlplus “/ as sysdba”

HTH – Antonio NAVARRO

 

Advertisements

Solaris 11.4 (Beta)

Oracle has released a fresh beta of his famous operating system Solaris. This is the last release of this OS. There are many (very importants) persons says that this release (11) would be the last because of Oracle is planning abandoned it in favour of Oracle Linux. Will see we a 12 release?.

If you want try it, please click in the next link;

Solaris 11.4 Beta download

HTH – Antonio NAVARRO

A Easy Way Of Configure Timezone In Databases From Unix

This morning talking with a partner raised the issue of having several databases at different timeszones in the same Unix machine. There are many ways to do this, some more correct than others. In this case I want show an example using the operating system (in this example I use a Solaris 11.3) this will make us independent of the database engine (Oracle, Sybase, SQL Server on linux) that we use, although all the databases have a mechanism for perform this function from inside the engine of database and that is a mandatory feature of the ISO 9075 standard (or ANSI SQL for the USA).

In Solaris by default, if we do not specify anything, when we create a user and we do not tell him anything he will use the machine, we can see it in the /etc/TIMEZONE file

 
Ghost> cat /etc/TIMEZONE
#
# Copyright 1992, 1999-2002 Sun Microsystems, Inc.  All rights reserved.
# Use is subject to license terms.
#
#ident  "@(#)init.dfl   1.7     02/12/03 SMI"
#
# This file is /etc/default/init.  /etc/TIMEZONE is a symlink to this file.
# This file looks like a shell script, but it is not.  To maintain
# compatibility with old versions of /etc/TIMEZONE, some shell constructs
# (i.e., export commands) are allowed in this file, but are ignored.
#
# Lines of this file should be of the form VAR=value, where VAR is one of
# TZ, LANG, CMASK, or any of the LC_* environment variables.  value may
# be enclosed in double quotes (") or single quotes (').
#
TZ=UTC
CMASK=022

 

If we execute a date at the level of the prompt;

Ghost> date
Tue Feb 13 16:14:00 UTC 2018

 

If we login to the same machine but with another user and we see his file .profile where we have defined the variable TZ;

Ghost> cat .profile

export TZ=Europe/Madrid

If we execute a date at the level of the prompt;

Ghost> date
Tue Feb 13 17:15:17 CET 2018

 

Once we have defined the variable TZ we can create/start the database and it must take this time.

HTH – Antonio NAVARRO

 

How To Change dbsnmp’s Password In MGMTDB

For set up the OEM 12C I ned to change the dbsnmp into the MGMTDB database. Follow the next steps to change it;For set up the OEM 12C I ned to change the dbsnmp into the MGMTDB database. Follow the next steps to change it;
connect to the machine with grid’s owner

export ORACLE_SID=-MGMTDB 
sqlplus / as sysdba
SQL> ALTER USER DBSNMP IDENTIFIED BY XXXXXX ACCOUNT UNLOCK;

HTH – Antonio NAVARRO

ORA-19511, ORA-19870, ORA-19501 And ORA-27190 Errors

Today when I arrived to the work I saw a email from Backup department about a restore failing the last Saturday. The error was the next;

 
channel aux12: ORA-27192: skgfcls: sbtclose2 returned error - failed to close file
ORA-19511: non RMAN, but media manager or vendor specific failure, error text:
   We could not read the checksum. (0:3:2)
ORA-19870: error while restoring backup piece WEBP_k3sq8u31_1_1
ORA-19501: read error on file "CLOUD_k3sf8t32_1_1", block number 1 (block size=512)
ORA-27190: skgfrd: sbtread2 returned error
ORA-19511: non RMAN, but media manager or vendor specific failure, error text:
   asdf_

After a bit of research I discovered the problem was in the network. This backup connect to serveral servers to work (Legato Server, a recover catalog and other database becouse of be a duplicate). Maybe a cut down of miliseconds order was enough to crash the restore. To verify the network stability and repeat the Rman Script solve the problem.

HTH – Antonio NAVARRO

 

Maybe The First Step Into The Relational Model

In this post I like show the origin of Relational database model. There are many books, papers, conferences about this subject, but I find out recently a serie of (very good) videos from CJ Date, one of fathers of the Relational model. Please follow the next link. No problem if you have a lot of years of experience in Relational model (I have about 20 years) and you think you know all about it.

Enjoy it.

HTH – Antonio NAVARRO

How To Install JAVA VM (12c) Manually

In this post I show the manually way of install Java VM into a database 12c. I install XML component too because of is very requeried by applications who working with XML.

 
set lines 1000 pages 1000
connect / as sysdba
startup mount
alter system set "_system_trig_enabled" = false scope=memory;
alter database open;

@?/javavm/install/initjvm.sql
@?/xdk/admin/initxml.sql
@?/xdk/admin/xmlja.sql
@?/rdbms/admin/catjava.sql
@?/rdbms/admin/catexf.sql

shutdown immediate

startup
REM Recompile all 
@?/rdbms/admin//utlrp.sql

column comp_name format a50
SELECT COMP_ID, COMP_NAME, STATUS FROM DBA_REGISTRY;

HTH – Antonio NAVARRO