Martin Bálint

Personal blog of IT professional

Oracle PL/SQL developer
PHP developer
Linux administrator

Jul 12 2013

Log failed statements on oracle database

If your client is getting errors while executing statements on Oracle database, and you want to see which statements are failing, try this:

Check that audit is enabled:

SQL> show parameter audit;
NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
audit_file_dest                      string      /oracle/admin/ORADB1/adump
audit_sys_operations                 boolean     FALSE
audit_syslog_level                   string
audit_trail                          string      DB
 Set audit_trail to DB_EXTENDED so you can see SQL statements, restart is required.
SQL> alter system set audit_trail=db_extended scope=spfile;
System altered.

SQL> shutdown immediate;
ORACLE instance shut down.

SQL> startup;
ORACLE instance started.

Now, set audit options

audit select table by access whenever not successful;
audit insert table by access whenever not successful;
audit update table by access whenever not successful;
audit delete table by access whenever not successful;
audit execute procedure by access whenever not successful;

You should then see failed statements using

select timestamp, os_username, username, owner, obj_name, action_name, returncode, sql_text, sql_bind from dba_audit_trail order by timestamp;

 

Feb 14 2013

Force Android 4.2.2 update

Android 4.2.2 if out for my Nexus 10, but no update suggestions on my device so far.
I didn’t want to wait too long, so I helped it a bit.

This worked for me:

Go to Settings > Apps > ALL > Google Services Framework

In this order, do:

  1. press Clear data
  2. press Force Stop

Then quickly go to Settings > About tablet > System updates and press Check now.

Now, you should see

android-4.2.2-500x316

Aug 03 2012

Install Oracle Configuration Manager on Oracle 11 and OUL 6 64bit

I did a fresh install of latest Oracle Linux 6 64bit and Oracle Database 11.2.0.3 on it, server only, no database yet. After creating database later, I wanted to register it with my My Oracle Support (MOS) account.

To my surprise, although having oracle-rdbms-server-11gR2-preinstall installed, I was missing some required packages to get OCM running.

/usr/bin/ld: crt1.o: No such file: No such file or directory

/usr/bin/ld: cannot find -lgcc_s

I had to install 32bit versions of libgcc and glibc-devel

yum install glibc-devel.i686 libgcc.i686

To install OCM run

$ORACLE_HOME/ccr/bin/setupCCR

Enter your MOS login and password. This will create scripts in %ORACLE_HOME/ccr/admin/

To register your database with MOS set your database environment (. oraenv) and run

$ORACLE_HOME/ccr/admin/scripts/installCCRSQL.sh collectconfig -s <SID>

To collect new database status just run

$ORACLE_HOME/ccr/bin/emCCR collect
Feb 14 2012

Install VMware Tools on Centos 6

To install VMware Tools on Centos 6 simply run following commands as root:

yum install gcc kernel-devel perl
reboot

mount /dev/cdrom /mnt
tar -C /tmp -zxvf /mnt/VMwareTools-*.tar.gz
umount /mnt
cd /tmp/vmware-tools-distrib/
./vmware-install.pl default
Feb 14 2012

Centos 6 netinstall url

In Centos 6, netinstall method changed URL to installation image.

You can use:

32 bit: http://mirror.centos.org/centos/6/os/i386/
64 bit: http://mirror.centos.org/centos/6/os/x86_64/ 

Czech mirror:
32 bit: http://ftp.cvut.cz/centos/6/os/i386/
64 bit: http://ftp.cvut.cz/centos/6/os/x86_64/

Read more →

Dec 26 2011

Eclipse headless on Centos 6

When I was looking for tools, which would help me with editing of RPM spec files, I decided to use Eclipse + Linux tools plugin. I found, it is unusable on my Windows desktop for 2 reasons:

  • there is no rpmlint on Windows, making Linux tools load one cpu core to 100%
  • i needed to transfer every change to linux machine and run rpm build

So I decided to create a dedicated virtual machine for rpm builds, on OpenVZ, running Eclipse and all needed plugins (git and Linux tools).
Read more →

Oct 25 2009

How I migrated my Centos staff from XEN to KVM

A quick recapitulation of XEN to KVM migration on my Centos 5.4. It was suprisingly easy.

Read more →

Dec 25 2008

“Video mode not supported” while installing Centos 5.2

While reinstalling my Centos server, I was not able to get into Anacoda installer GUI. My LCD monitor said “Video mode not supported”. Centos default video resolution is 800×600 and 24bit depth.

Read more →

Nov 28 2008

Installing Tomcat6 on Centos 5.2

Step by step instructions on how to install Tomcat 6 on Centos 5.2.

Read more →

Nov 28 2008

Installing JIRA on Centos 5.2

Step by step how I installed Atlassian Jira on Centos 5.2.

Read more →