Boss said to secretary: For a week we will go abroad, so make arrangement.
Secretary makes call to Husband: For a week my boss and I will be going abroad, you look after yourself.
Husband makes call to secret lover: My wife is going abroad for a week, so lets spend the week together.
Secret lover makes call to small boy whom she is giving private tution: I have work for a week, so you need not come for class.
Small boy makes call to his grandfather: Grandpa, for a week I don't have class 'coz my teacher is busy. Lets spend the week together.
Grandpa (the 1st boss in the beginning of this story) makes call to his secretary: This week I am spending my time with my grandson. We cannot attend that meeting.
Secretary makes call to her husband: This week my boss has some work, we cancelled our trip.
Husband makes call to secret lover: We cannot spend this week together, my wife has cancelled her trip.
Secret lover makes call to small boy whom she is giving private tution: This week we will have class as usual.
Small boy makes call to his grandfather: Grandpa, my teacher said this week I have to attend class. Sorry I can't give you company.
Grandpa (the boss) makes call to his secretary: Don't worry this week we will attend that meeting, so make arrangement.......
The situation like this in terms of Oracle will result
ORA-00060: deadlock detected while waiting for resource
So
Deadlock occurs when a session wants a resource held by another
session, but that session also wants a resource held by the first
session.
Friday, July 25, 2008
Friday, September 7, 2007
Working with Paramter files
My best practice and always prefer the following when working with the parameter files,since it will always eliminate the accidental overwriting of init.ora file,
sunbolt01:
.........
$/optware/product/oracle/10.2.0.2/dbs/initnamaste.ora
the content of the initnamaste.ora is,
$cat initnamaste.ora
pfile=/nutsnbolts/oradata/namaste/spfilenamaste.ora
(I always keep the spfile along with the database datafiles)
now when I want to edit the parameter file for changing or adding a parameter,will do as follows,
$sqlplus "/ as sysdba"
SQL>create pfile='editnamaste.ora' from spfile;
SQL>shutdown immediate;
SQL>exit
now I will work with the editnamaste.ora and change or add the new paramter to editnamaste.ora
after that I'll create the spfile from editnamaste.ora, so no hassle of missing backup of existing init.ora and spfiles and
overwriting of parameter file etc.,
SQL>sqlplus "/ as sysdba"
SQL>create spfile='/nutsnbolts/oradata/namaste/spfilenamaste.ora' from pfile='editnamaste.ora';
SQL>startup
SQL>exit
sunbolt01:
.........
$/optware/product/oracle/10.2.0.2/dbs/initnamaste.ora
the content of the initnamaste.ora is,
$cat initnamaste.ora
pfile=/nutsnbolts/oradata/namaste/spfilenamaste.ora
(I always keep the spfile along with the database datafiles)
now when I want to edit the parameter file for changing or adding a parameter,will do as follows,
$sqlplus "/ as sysdba"
SQL>create pfile='editnamaste.ora' from spfile;
SQL>shutdown immediate;
SQL>exit
now I will work with the editnamaste.ora and change or add the new paramter to editnamaste.ora
after that I'll create the spfile from editnamaste.ora, so no hassle of missing backup of existing init.ora and spfiles and
overwriting of parameter file etc.,
SQL>sqlplus "/ as sysdba"
SQL>create spfile='/nutsnbolts/oradata/namaste/spfilenamaste.ora' from pfile='editnamaste.ora';
SQL>startup
SQL>exit
Wednesday, September 5, 2007
One userid I never want to loose.....
If you ask me which is very very important in my day to day life,
I'll say and never dare to think that I can live in my career
without having that!
That is,
my Metalink Userid.
Metalink became part of my life and I cannot live with out accessing the metalink even for a single day.
What is your say?
I'll say and never dare to think that I can live in my career
without having that!
That is,
my Metalink Userid.
Metalink became part of my life and I cannot live with out accessing the metalink even for a single day.
What is your say?
Sunday, September 2, 2007
Game Theory
Two concepts of Game Theory:-
"minimizing the maximum loss and maximizing the minimum gain."
Try to apply the theory whether is managing the databases or protecting the data.
"minimizing the maximum loss and maximizing the minimum gain."
Try to apply the theory whether is managing the databases or protecting the data.
Saturday, September 1, 2007
Shell script to rename set of files
For me the need to rename the files under unix is almost a frequent task,
like backup the set of unix files while some activity will overwrite the existing files or using the database creation template scripts to create another new database.
I use the following simple shell script to rename the files,
For example we have a set of files as follows,
/var/tmp/orainstall1.sql
/var/tmp/orainstall2.sql
/var/tmp/orainstall3.sql
/var/tmp/orainstall4.sql
/var/tmp/orainstall5.sql
and I want to rename them as
oracreate1.sql,
oracreate2.sql,
oracreate3.sql,
oracreate4.sql,
oracreate5.sql
I am listing the files under /var/tmp
$cd /var/tmp
$pwd
$/var/tmp
$ls ora*.sql
$orainstall1.sql
orainstall2.sql
orainstall3.sql
orainstall4.sql
orainstall5.sql
--script start here
$for file in orainstall*.sql;do
newfile=`echo $file | sed 's/install/create/'`
mv $file $newfile
done
--script end here
Checking the files for change
$pwd
/var/tmp
$ls ora*.sql
oracreate1.sql
oracreate2.sql
oracreate3.sql
oracreate4.sql
oracreate5.sql
$
Happy testing..
like backup the set of unix files while some activity will overwrite the existing files or using the database creation template scripts to create another new database.
I use the following simple shell script to rename the files,
For example we have a set of files as follows,
/var/tmp/orainstall1.sql
/var/tmp/orainstall2.sql
/var/tmp/orainstall3.sql
/var/tmp/orainstall4.sql
/var/tmp/orainstall5.sql
and I want to rename them as
oracreate1.sql,
oracreate2.sql,
oracreate3.sql,
oracreate4.sql,
oracreate5.sql
I am listing the files under /var/tmp
$cd /var/tmp
$pwd
$/var/tmp
$ls ora*.sql
$orainstall1.sql
orainstall2.sql
orainstall3.sql
orainstall4.sql
orainstall5.sql
--script start here
$for file in orainstall*.sql;do
newfile=`echo $file | sed 's/install/create/'`
mv $file $newfile
done
--script end here
Checking the files for change
$pwd
/var/tmp
$ls ora*.sql
oracreate1.sql
oracreate2.sql
oracreate3.sql
oracreate4.sql
oracreate5.sql
$
Happy testing..
Subscribe to:
Posts (Atom)