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
/stage/solusoft/backup/ESCOGRD.ctl
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
2
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

Situtation:
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.

Solution:
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";

Wednesday, April 29, 2015

Install Oracle Database 10gR2 on Oracle Linux 5 (Part II)

Situation:
When installing Oracle Database 10gR2 on Oracle Linux 5 you will find the following error:
[oracle@test database]$ ./runInstaller
Starting Oracle Universal Installer...
Checking installer requirements...
Checking operating system version: must be redhat-3, SuSE-9, redhat-4, UnitedLinux-1.0, asianux-1 or asianux-2
Failed <<<<
Exiting Oracle Universal Installer, log for this session can be found at /tmp/OraInstall2015-04-19_09-45-17AM/installActions2015-04-19_09-45-17AM.log
Cause:
Originally, Red Hat 5 was not supported by Oracle Database 10gR2.

Solution:
Editar el script /install/oraparam.ini para agregar la línea que incluye al sistema operativo:
[Certified Versions] Linux=redhat-3,SuSE-9,redhat-4,UnitedLinux-1.0,asianux-1,asianux-2,redhat-5

Install Oracle Database 10gR2 on Oracle Linux 5 (Part I)

Situation:
When executing the runInstaller.sh for installing Oracle Database 10gR2 on Oracle Linux 5, I got the following exception:
Exception java.lang.UnsatisfiedLinkError: /tmp/OraInstall2015-04-17_09-36-15AM/jre/1.4.2/lib/i386/libawt.so: libXp.so.6: cannot open shared object file: No such file or directory occurred.
Cause:
Missing deprecated dependencies.

Solution:
Install these packages using YUM or the installation media: xorg-x11-deprecated-libs y libXp.

Monday, April 20, 2015

ORA-04063, ORA_06508 and ORA-06512 when RCU for OID

Situation:
When trying to create the Oracle Internet Directory (OID) schema using Repository Creation Utility (RCU) I found these error messages:

ORA-04063: package body "ODS.TSPURGE" has errors
ORA-06508: PL/SQL: could not find program unit being called: "ODS.TSPURGE"
ORA-06512: at line 3

Solution:
1. Stop the RCU and drop any OID schemas already created.
2. Log into the database and execute the following commands:
GRANT EXECUTE ON sys.dbms_job TO PUBLIC;
GRANT EXECUTE ON dbms_reputil TO PUBLIC;
3. Run RCU again and create the OID schemas.

Tuesday, April 7, 2015

Change ORACLE_BASE after installation

Situation:Want to change the ORACLE_BASE after the installation regardless the environment variable is set or not.

Cause:You used a wrong ORACLE_BASE location during the installation or want to set a new one.

Solution:Use the orabase utility. It is available in 11g and above.

First, check the current value of ORACLE_BASE:
$ORACLE_HOME/bin/orabase

Then, change the value using this command:
$ORACLE_HOME/bin/orabase -d <NEW_ORACLE_BASE>

Finally, verify if the ORACLE_BASE has been changed:
$ORACLE_HOME/bin/orabase

[RUEI] Synchronise with EBS on Solaris 10 SPARC

Situation:
When trying to synchronise RUEI with E-Business Suite on Sun Solaris 10 SPARC. The following error appears:
Can't locate strict.pm in @INC (@INC contains: /u300/baru/db/tech_st/11.2.0/perl/lib/5.8.3 /u300/baru/db/tech_st/11.2.0/perl/lib/site_perl/5.8.3 /u300/baru/db/tech_st/11.2.0/appsutil/perl ../lib/5.10.0/sun4-solaris-thread-multi-64 ../lib/5.10.0 ../lib/site_perl/5.10.0/sun4-solaris-thread-multi-64 ../lib/site_perl/5.10.0 .) at create_EBS_info.pl line 13.
BEGIN failed--compilation aborted at create_EBS_info.pl line 13.

Cause:
Perl path is not valid.

Solution:
Set the required perl in PATH through PERL5LIB:
export PERL5LIB=/db/tech_st/11.2.0/perl/lib/5.10.0:/db/tech_st/11.2.0/perl/lib/site_perl/5.10.0:/db/tech_st/11.2.0/appsutil/perl