Virtual Oracle RAC. Task 13. Having some fun with RAC

Link back: This guide is a part of the Virtual Oracle RAC project, the index to the whole project is here.

We could do a few more things to make the good work perfect, for instance we can enable archive log mode in our RAC and set up backup with RMAN but this is already outside of the scope of this little (I am kidding, it feels quite big to me) project.

What I really want to do now is to connect to the RAC database, run a long query and then kill one of the nodes. Wondering if RAC will stand to its reputation.

Configure client side TNS (tnsnames.ora)

Add following lines:

(RETRIES = 180)
(DELAY = 5)

In some cases you will need to add a following line to sqlnet.ora (to overcome possible ORA-12170 error):

sqlnet.inbound_connect_timeout = 30

Connecting with sqlplus

Bring up a sqlplus in your host PC and connect to the cluster:

SQL> connect system/password@RACDB_TAF

Run this "long" query that will keep the RAC occupied for a while:

SQL:> select * from help t1, help t2;

While the query’s output is running (it may run like this for hours), we will reboot odbn1 node (I did the "shutdown" but you can do "reboot"):

Next picture shows that OCFS was stopped properly:

The other node is running happily if quite busy all the meanwhile:

And the sqlplus is still producing the output…

The odbn1 node is coming back, OCFS loaded, then ASM follows

If you log in to the console and run the "top" command filtering user "oracle" (press "u" to specify user), you will notice that for a minute or two there will be no processes for "oracle", then they will start appearing.

and finally you will have plenty of them, just as on the other node:

If noting happens within 5 minutes though, then most probably you have skipped the step where we edited "svrctl" script. Go back, edit and reboot again.

Now, just for fun, I will reboot the second node, odbn2. I do not have much hope that my query will survive this too. It would be too good.

Sure enough, just as OCFS is going down, the query dies as well, although the first node is running again:

Well, I consider this project concluded, thanks for your patience and comments.


One thought on “Virtual Oracle RAC. Task 13. Having some fun with RAC

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s