Operating System - HP-UX
1748279 Members
4189 Online
108761 Solutions
New Discussion юеВ

Re: How to force oracle to hang

 
SOLVED
Go to solution
Yogeeraj_1
Honored Contributor

Re: How to force oracle to hang

hi,

how about locking a table in one session or keeping a session active.

and issuing a "shutdown normal" (instead of shutdown immediate)

haven't tried it though..

hth
Yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)

Re: How to force oracle to hang

Chris,

That did the trick - when the redo log filled everything started to hang... and my script did detect the problem.

Dietmar,

Sending a SIGSTOP to pmon didn't seem to have any effect - perhaps I needed to leave it for longer.


Yogeeraj,

I suspect that this will just produce a different error from my monitor script... it logs into the database as a seperate session every time it polls the database, so once a shutdown command has been issued, rather than a hang I'll just get a "ORA-01090: shutdown in progress - connection is not permitted" message from sqlplus.

Any other ideas will also score points. The more different methods I have to test this the better.

Cheers

Duncan

I am an HPE Employee
Accept or Kudo
Yogeeraj_1
Honored Contributor

Re: How to force oracle to hang

hi Duncan,

are you running 9i?

If yes, here's the good news!

In 9i, we have an alter database quiesce available with the resource manager.
This'll let you "pause" the system (put people on hold in effect).

Good luck
Yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
Yogeeraj_1
Honored Contributor

Re: How to force oracle to hang

hi again,

Note that you can find more info in the Oracle9i Data Guard Concepts and Administration Release 2 Chapter 4.


You would do something like:

Ensure that Resource Manager is configured. (Resource Manager is a requirement when putting the database into a quiesced state.)

then

alter system quiesce restricted;

then Unquiesce the system and and switch logfiles:
alter system unquiesce;

alter system switch logfile;


regards
Yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)

Re: How to force oracle to hang

Thanks Yogeeraj,

unfortunately I'm on 8i...

but i'll take note for when I have a 9i DB to cluster.

Cheers

Duncan

I am an HPE Employee
Accept or Kudo
R. Allan Hicks
Trusted Contributor

Re: How to force oracle to hang

The way that I've had Oracle stop on me without crashing is to fill up the archive log destination. When log writer tries to write the archive log and there is no room, it does a "polite" wait. I've gotten caugth a full times with the destination full. It doesn't do any permanent damage and as soon as space becomes available it will start back without losing data.

If you stop archiving as you said on your initial submittal, Oracle may not care if you do a switchlog unless it feels that it has to have dbwriter write the changes before it can re-use the log, it won't hang.

Hope this helps.




"Only he who attempts the absurd is capable of achieving the impossible
Indira Aramandla
Honored Contributor

Re: How to force oracle to hang

Hi Duncan,

Here is another test method to test your MC/ServiceGuard monitoring scripts.

I have picked this one form another client who accidently caused their database to hang, but seems to be a good test case.

Database will hang after a while (2 hours) if listener is started by root with "su -"

Eg:- "su - oracle -c "lsnrtl start LISTENER_name.world"

We know that the listener needs to be started by the oracle user, not root. It is started as root with the above command, so in fact it should be as if it was started by oracle. This will work fine at the command line. But if it is started in the serviceguard script, with the same command as above everything works fine for about 2 hours. Then every session will start to hang.

Another way to cause your database to hang will be to issue the suspend command.
Database will be suspended by an ALTER SYSTEM SUSPEND statement

The other ways is to fill your archivelog destination directory which others mentioned.
Never give up, Keep Trying