Archive for the Oracle Category

Many times you will need to quickly executa a query in PostgreSQL and dump
the results to comma delimited value (CSV) file. In this post I’ll show you
a quick way to do it with the psql command in PostgreSQL.
Just copy the following to a file called dump2csv.sql

-- ==================================================================
--
--  This script will execute and SQL query using the psql
--  command and dump the results to a file called /tmp/result.csv
--
-- ==================================================================
--
-- Uses the following psql options:
--   \a toggle between unaligned and aligned output mode
--   \t show only rows
--   \o [FILE] send query results to file or |pipe
--
\a
\t
\pset fieldsep ,
\o /tmp/result.csv

-- query
select ..

To dump the result of the query to a file do:

$ psql -h -U -d -W -f dump2csv.sql

the result of your query will be stored in /tmp/result.csv.

The first time that i had to find the exact Oracle Application Server Version I thought it would be an easy task but, it is not so simple if you don’t know where to look for it. I forgot that it was not straightforward because now I know where to find it. But the other day a friend called me and asked me where to find OAS version. That’s why i’m writing this post.

If you got a fresh install you can look into <ORACLE_HOME>/install/readme.txt and find the version.

But i prefer to take a look into <ORACLE_HOME>/config/ias.properties
For example:

$ grep Version $ORALCE_HOME/config/ias.properties
Version=10.1.2.0.2

In AIX 5L Version 5.3 when you start the iasconsole and then you access to Oracle Application Server console using a web browser, then the application hangs and the following error message is displayed in the web browser:

500 Internal Server Error


java.lang.NoClassDefFoundError: oracle/sysman/eml/app/Console
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java(Compiled Code))
at com.evermind[Oracle Application Server Containers for J2EE 10g ...

at java.lang.Thread.run(Thread.java:568)

This error occurs because the EMCTL IAS console hangs after logging in. Check the emdctl.trc file to verify the issue.

The next steps describe how to rectify this issue.

(more…)

RMan is Oracles de-facto backup and recovery application. It is used to backup the database files and archive logs. Sometimes an archive log might be mistakenly removed, moved or renamed from disk without following RMan’s backup retention policy. Since it is in the rman catalog it will try to make a backup of the missing archive log. This will cause rman to fail when it tries to make a backup of the archive log with the following error message:

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of backup command at <date>
RMAN-06059: expected archived log not found, lost of archived log compromises recoverability
ORA-19625: error identifying file <archive_log>
ORA-27037: unable to obtain file status

(more…)

  • english
  • spanish

This post just describe the shortest way to verify Oracle Applications 11i Version. You can obtain this information typing the following URL in your browser.

http://<host>:<port>/OA_HTML/OAInfo.jsp

host: Where Oracle apps mid tier is installed
port: apps mid apache listener port (default 8000)

The URL show :

  • OA Framework Version
  • MDS Version
  • UIX Version
  • BC4J Version
  • english

One of our latest projects here in Easytech was done using PHP as our programming language and Oracle as our Database. We had a lot of experience coding in PHP and developing with the Oracle Database but none using both together. The project turned out to be a great one but there isn’t a lot of information on the web since most PHP applications use MySQL or PostgreSQL as their database. Today I was looking at what blogs where available on the Oracle site and came across Christopher Cross’s blog which has a lot of interesting information for PHP developers. In it I found links to two interesting presentations: “Leveraging the Power of Oracle with PHP: Taking Advantage of the Database” and ” PHP and Performance” and a link to a book called “The Underground PHP and Oracle Manual” written by Christopher himself and Alison Holloway which covers PHP and Oracle development. For more references on using PHP and Oracle visit the PHP section in the Oracle Technology Network.