Monday, October 27, 2008
export ORACLE_HOME from oratab
ORACLE_HOME=`cat /etc/oratab| sed 's/^ *\(.*\) *$/\1/' |grep -v ^\# |grep -w "$SID"|awk -F: '{print $2}'`
-- Vish.
Thursday, May 08, 2008
EXP-00002: error in writing to export file
EXP-00002: error in writing to export file
EXP-00002: error in writing to export fileerror closing export file
EXP-00000: Export terminated unsuccessfully
It was because crontab did not know anything about the ulimits of user "Oracle". It was using the default ulimit value and when it hit the 2GB size limit, my export errored out. I've edited my crontab entry to use the .profile file to set the environment, before it ran my export and it worked fine.
The crontab entry was modified as below.
# +---------------------------------------------------------+------------------------+
# | Daily FULL database export for DB TEST1 | Daily at 12:00 AM |
# +---------------------------------------------------------+------------------------+
00 00 * * * (./home/oracle/.profile; /oracle/app/admin/scripts/daily_export.sh TEST1 >/tmp/export_TEST1.log 2>&1)
Hope this helps.
-- Vish.
Wednesday, April 23, 2008
Active dataguard - oracle 11g !!
Here are the steps to follow.
1. Disable the redolog apply.
2. Alter database open readonly; (on standby database)
3. Enable the redolog apply.
and you are done.
-- Vish.
Tuesday, April 22, 2008
Command history for sqlplus - rlwrap !!
There’s a utility called rlwrap that you can install and once that is done, you can use UP arrow and sqlplus remembers your previous commands (as in MS-DOS).
This procedure is for Sun Solaris Sparc 64 bit OS.
Step 1 :
1. Download ncurses-5.4-sol10-sparc-local
2. Download readline and rlwrap packages from http://ivan.kartik.sk/index
Step 2 :
To install rlwrap on Solaris execute following commands:
gunzip ncurses-5.4-sol10-sparc-local
gunzip readline-5.2-solaris9-sparc.gz
gunzip rlwrap-0.28-solaris9-sparc.gz
pkgadd -d readline-5.2-solaris9-sparc
pkgadd -d rlwrap-0.28-solaris9-sparc
pkgadd -d ncurses-5.4-sol10-sparc-local
Step 3 :
As readline library is located in /usr/local/lib don't forget to add that line to LD_LIBRARY_PATH.
Also put following line to your .profile:
alias sqplus='/usr/local/bin/rlwrap sqlplus'
-
Monday, April 07, 2008
Who is using temporary tablespace
Here's the script that he has on his site.
set pagesize 1000
select a.tablespace_name, trunc(b.allocated)Allocated, trunc(a.free) Free, trunc(b.allocated-a.free) USED,
(100-trunc(((b.allocated-a.free)*100)/b.allocated)) Percentfree from
(select tablespace_name, sum(bytes)/1024/1024 free from sys.dba_free_space group by tablespace_name) a,
(select sum(bytes)/1024/1024 allocated, tablespace_name from dba_data_files group by tablespace_name ) b
where a.tablespace_name = b.tablespace_name
union
select 'Total', trunc( sum(b.allocated)), trunc(sum(a.free)), trunc(sum((b.allocated-a.free))),
00000 from
(select tablespace_name, sum(bytes)/1024/1024 free from sys.dba_free_space group by tablespace_name) a,
(select sum(bytes)/1024/1024 allocated, tablespace_name from dba_data_files group by tablespace_name ) b
where a.tablespace_name = b.tablespace_name
order by 2;
-- Vish.
Om Shanti Om
You can check it out here.
http://movies.yahoo.com/mvc/top10?lid=660
-- Vish.
Spiritualism Vs Hunger !!
Coming to Spiritualism vs Hunger. I've always wanted to write about it and finally the time has come. I believe in spiritualism and it is definitely needed for humans. I do respect people who believe in spiritualism. It gives you peace of mind and strength to face difficulties.
Coming to the point, I've seen people donating money to temples and people in India do that a lot. I don't agree with them at all. There are people in India who are in need of food. In my view hunger comes first and then spiritualism, luxury or whatever it is. HUNGER is the first thing that has to be taken care of. Feed the people first and then the temples. There's a saying in telugu (my mother tongue), "MANAVASEVE MADAVASEVA", which I believe in. It means "Service to human is Service to God", which is absolutely true.
And why do we donate money to the temples? I don't think a lot of people understand or even try to understand the reason behind it. I was doing it because my parents taught me to do so and I believe that so is the reason with so many other people. It is just that people believe in God and they believe that donating money to God is a good thing. And what is the money used for? To promote religion and to build temples? Forget about building temples when there are people around dying with hunger. Lets feed the hungry people first. I'm not saying that you leave your worldly luxuries and then spare the money to feed these people. All I'm saying is that lets spare the money that we donate to the temples and use that money to feed these hungry people.
I don't think any religion would say NO to feed hungry people. Also, at the same time, I DO NOT encourage giving money to beggars. Its an absolute NO-NO. Instead, lets pass on the money to charitable organizations who use the money in an organized way to feed hungry people and may be to send poor children to school.
I've started sponsoring a child in India and so can you. Ashanet.org is a non-profit organization where you can sponsor a child in india. They will be given food, shelter and also sent to school. I would encourage all of you to have a look at the link below and forward it to as many people as you can. You can sponsor a child at $20 to $30 a month. You can also google for "sponsor a child ashanet", in case the link below does not work.
https://www.ashanet.org/siliconvalley/sac//index.html
Lets start working towards feeding the hungry people. You can do your part by feeding one person from your earnings and if every one of us do that, the world will be HUNGER-FREE, a dream come true!!
Let me reiterate the saying, "Service to human is Service to God".
-- Vish.