Enabling SSL in Oracle Weblogic

This how-to is based on Oracle Weblogic 10.3.3 on Solaris 10 (Unix/Linux), lately the release is faster ~.~, the environment will like three tier application where web-app-db reside in the different host.

Make sure to create generic JAVA_HOME, WLS_HOME, and Keystore directory the same in each host. In this case

JAVA_HOME = /opt/jdk1.6
WLS_HOME = /opt/oracle11
Keystore Dir. = /opt/oracle11/ssl

Continue reading

Killing Oracle Jobs

This article is not purely mine, I take this from another source, which I already forgot. However, I already used this to solve several issue regarding Oracle Jobs. To solve this issue will require Oracle SYS and Oracle OS user. Let start with listing the jobs

select j.log_user,
j.job,
j.broken,
j.failures,
j.last_date||':'||j.last_sec last_date,
j.this_date||':'||j.this_sec this_date,
j.next_date||':'||j.next_sec next_date,
j.next_date - j.last_date interval,
j.what
from (select dj.LOG_USER, dj.JOB, dj.BROKEN, dj.FAILURES,
dj.LAST_DATE, dj.LAST_SEC, dj.THIS_DATE, dj.THIS_SEC,
dj.NEXT_DATE, dj.NEXT_SEC, dj.INTERVAL, dj.WHAT
from dba_jobs dj) j;

Continue reading

ORA-27054: NFS file system where the file is created or resides is not mounted with correct options

This will happen if you want to use a mounted NFS directory with no option in mounting NFS directory. The error that will come up is like this

RMAN-03009: failure of Control File and SPFILE Autobackup command on ORA_DISK_2
channel at 08/01/2006 16:43:49
ORA-19504: failed to create file “……”
ORA-27054: NFS file system where the file is created or resides is not mounted  with correct options Additional information: 2

The workaround that need to be done is too add this option while you remounting the NFS directory

rw,bg,intr,hard,timeo=600,wsize=32768,rsize=32768,nfserver=3,tcp

Hope this will fix your error 😀

ORA-01031: “insufficient privileges”

This error is come up right after I finish all the recovery process, when I want to connect to the recovered database as sysdba. At that time I cannot even connect through RMAN or SQLPLUS, quite confusing at first. Luckily I have Metalink account and I found this workaround. Type this command to create new password file

ORAPWD FILE=/ORACLE/HOME/DBS/orapw<SID_NAME> PASSWORD=<PASSWD> ENTRIES=5

Password file format in unix is : orapw<sid>

Password file format in windows is : pwd<sid>.ora

Then edit your database PFILE by appending this command in the bottom of the file

REMOTE_LOGIN_PASSWORDFILE=EXCLUSIVE

Now you can try to connect again by typing

SQLPLUS / AS SYSDBA

GRANT SYSDBA TO SYS;

GRANT SYSOPER TO SYS;

You also need to check your SQLNET.ORA in $ORACLE_HOME/network/admin there should be this line

SQLNET.AUTHENTICATION_SERVICES=(NTS)

You also need to check if your current Oracle OS user is a member in oinstall and dba.

Hope this can help you 😀

ORA-00821: Specified value of sga_target 152M is too small, needs to be at least 304M

This error is come up when i tried to start a dummy instance by using rman in process of recovering a database. This error is caused because the SGA memory initialization is too small to start an instance. To solve this the workaround is to create an Operating System variable called ORA_RMAN_SGA_TARGET it can be done by typing

bash

export ORA_RMAN_SGA_TARGET=512M;

512M of memory is sufficient enough to start an instance. Then you can try to start the instance from rman again, hope this will help you 😀

ORA-01152: file 1 was not restored from a sufficiently old backup

I faced this error when I tried to open the database from the recovered database, at that time it was told that one of my system datafile was not restored from a sufficiently old backup. The workaround to fix it is can be done by copying all available archivelog into the directory where archivelog is stored. Then you can connect to the database using SQLPLUS

RECOVER DATABASE USING BACKUP CONTROLFILE UNTIL CANCEL;

Then it will prompt you a request to find the required archivelog, just type auto if you already put all the archivelog in the directory where you put all the archivelog according to PFILE. Otherwise you have to type it manually one by one. That will be something like this

ORA-00279: ……..

ORA-00289: ……..

ORA-00280: ……..

Specify log: {<RET>=suggested | filename | AUTO | CANCEL}

Hope that will fix your error 😀

Oracle RMAN Recovery

In my previous post I write about Oracle RMAN Backup, now I will explain a little bit about RMAN Recovery, there are many ways of using RMAN tools, but this is the way that i found to be succesfull.

Like I told you in my previous scenario I have a backup file that is copied to an NFS server from a tape server. The secondary server is also a running Oracle server that has its own instance that is being used. So my workaround for this recovery on a running Oracle server is to create a new Operating System user that is a member of oinstall and dba group, then create a new project on that user, so that the memory allocation is sufficient for the old and the recovered instance. For more detail you can see my next post on installing Oracle on Solaris. Continue reading

Oracle RMAN Backup

It’s been awhile not writing in this blog…more than a year :O Well, my old posting is all about Solaris, Linux, Sun Server, and Stuffs about System Administrations. Now I’m going to change the topics into Database Administration from now.

One of the most essential part of becoming a Database Administrator is able to do backup and restore, so that in a disaster event the data can be survive. My environment in this backup and recovery thing is using Oracle 10gR2, Solaris OS, SUN NAS.

The scenario is started by configuring the primary database to be able to create rman backup then store the backup into tape (using veritas backup). Then the backup data is restored into an NFS server that is hosted on SUN Storage 7110. Then the secondary database will mount the NFS server. Continue reading

Crontab in OpenSuse 10.2

Crontab in my opinion is a job scheduler, with crontab you can make some program at a specified time that you define. Now lets just started with the configuration. To know if the user that you’re using is allowed to make a crontab you must check if your user is in /etc/crontab.deny then you cannot make a crontab job.

There are several option in crontab command

crontab -e #this will enable you to make or edit your crontab job

crontab -l #this will show you the current crontab job

crontab -r #this will remove your crontab jobs

When you’re editing crontab, here is some of the syntax that will be used

* * * * * command to be executed
– – – – –
| | | | |
| | | | +—– day of week (0 – 6) (Sunday=0)
| | | +——- month (1 – 12)
| | +——— day of month (1 – 31)
| +———– hour (0 – 23)
+————- min (0 – 59)

Lets see some of the example:

  • 30 4 * * 0 cp /home /backup

this means that every Sunday at 4.30 am, it will copy folder /home into /backup

  • 0 1 7 7 * /sbin/reboot

this means that in july 7th at 1.00 am, the computer will be rebooted

More in crontab you can make it to execute a file that contain several commands, like this one:

  • 15 4 * * 7 /home/admin/test.sh

inside /home/admin/test.sh

cd /home

find -name “*.mp3*” -print -exec /bin/rm -f ‘{}’ +

quotaoff -avug

quotacheck -avugm

quotaon -avug

repquota -a

this file will do; go to the home directory, find all the file that contain .mp3, print them, delete them, turn off the quota, check the quota, turn it on again, and give the summary of quota.