Wednesday, March 16, 2016

[RDBMS] File /etc/oratab is not accessible

Situation:When running the Database Configuration Assistant (DBCA) a dialog window appears with the following error message:

File /etc/oratab is not accessible.

After installing Oracle Database 11gR2, you missed to run the two scripts and

As root user, execute 

[Cloud Control 12c] OMS installation fails with ORA-14400

During the installation of Oracle Enterprise Manager 12c Cloud Control, at the OMS Configuration phase you found it fails because of the following error:

INFO: ORA-14400: inserted partition key does not map to any partition
INFO: at line 1

INFO: deploy operations failed. Check the trace file:/u01/app/oracle/product/Middleware/oms/cfgtoollogs/omsca/omsca_20140402160051.log
Check the OMS Configuration Assistant logs at: /u01/app/oracle/product/Middleware/oms/cfgtoollogs/omsca

INFO: plug-in OMS Configuration has failed its perform method

The partitions are not created on the database used for OMS Repository when using the DB Template, hence OMS Configuration fails.

To solve this issue, execute the following as SYSMAN:
SQL> exec gc_interval_partition_mgr.partition_maintenance; SQL> exec mgmt_audit_admin.add_audit_partition;

Then, retry the OMS Configuration on the OUI. If OUI is closed then execute the following operating system command (be sure to have $OMS_HOME set):
$OMS_HOME/oui/bin/ ORACLE_HOME=$OMS_HOME MODE=perform ACTION=configure COMPONENT_XML={encap_oms.1_0_0_0_0.xml}

Thursday, August 27, 2015

[Linux] Stale NFS file handle

This problem happens when listing or creating a file within a NFS. In my case, I was creating a controlfile for a standby database. I saw this error:

SQL> alter database create standby controlfile as '/stage/solusoft/backup/ESCOGRD.ctl';
alter database create standby controlfile as '/stage/solusoft/backup/ESCOGRD.ctl'
ERROR at line 1:
ORA-01580: error creating control backup file
ORA-27037: unable to obtain file status
SVR4 Error: 151: Stale NFS file handle
Additional information: 1

Friday, June 12, 2015

[Cloud Control 12c] Agent Unreachable + [UPLOAD_SYSTEM_FATAL_ERROR]

Apparently the agent shows in the Cloud Control that it is unreachable from the OMS. When you try to restart it from the console (as the Oracle best practices says) it succeeded but still no green arrow on the agent.

Sorry but you have to go a little deeper than the console control to start and stop, no worries when you see it is pretty easy.

With the owner of the agent check the status of the agent from the server:

emctl status agent
Oracle Enterprise Manager Cloud Control 12c Release 3  
Copyright (c) 1996, 2013 Oracle Corporation.  All rights reserved.

Agent is Not Running

Monday, June 1, 2015

[ODA] How to create a database in Oracle Database Appliance on an existing Oracle Home

Is not the same… there are different opinions about creating databases in ODA (Oracle Database Appliance). There are Team oackli and Team DBCA. Regarding ODA, I'm totally supporting Team oackli.

As far as I read, when you create databases in ODA with DBCA tool, some "hidden parameters"  are not set in the parameter file of your database (for me this is an urban legend, but let's believe it for this time). So the guide recommends you create your database with the oackli tool. (very ODA)

First let’s create a parameter file, from root execute the following syntax:

[root@my-oda1 ~]# oakcli create db_config_params -conf odadb17
Please select one of the following for Database Block Size  [1 .. 4]:
1    => 4096
2    => 8192
3    => 16384
4    => 32768
Selected value is: 8192

Specify the  Database Language (1. AMERICAN 2. Others) [1]:1
Selected value is: AMERICAN

Specify the  Database Characterset (1. AL32UTF8 2. Others) [1]:2

If you need another character set different than AL32UTF8, you will need to enter “0” until you find the number that match the character set that you need, in my case I needed WE8ISO8859P1, which number is 95 (from 116 Characterset). Fact, you need to choose the number characterset in the range given by the tool to avoid this error:

Tuesday, May 26, 2015

Open-OVF not available for Oracle Linux 6

There is no Open-OVF RPM for Oracle Linux 6. That RPM is a necessary requisite which it used by the Oracle Virtual Assembly Builder to create assembly files.

Download the RPM open-ovf-1.1-1.0.47.el6.noarch.rpm from this link.  What I did is to recreate the Oracle Linux 5 RPM package for Oracle Linux 6.

Then install it using the following command:
rpm -ivh open-ovf-1.1-1.0.47.el6.noarch.rpm

Wednesday, May 6, 2015

[MySQL] Calculate database size (Part I)

There are two ways to calculate the size of the databases on a MySQL installation: using SQL script and measuring the MySQL stored data files (ibdata).

In this tutorial we will emphasise in the SQL script way.

With the following SQL script we can get the size of the entire database:
SELECT table_schema "Database Name", SUM( data_length + index_length) / 1024 / 1024 "Database Size in MB" FROM information_schema.tables GROUP BY table_schema;
To get the detailed size of each table on a database, execute the following SQL script:
SELECT table_name, table_rows, data_length, index_length, ROUND(((data_length + index_length) / 1024 / 1024),2) "Size in MB" FROM information_schema.tables WHERE table_schema = "schema_name";