Monday, November 26, 2007

Managing CRS, part 1

This CRS beasty is a bit much to chew on. Maybe it is just me.

Anyway, I started asking around how to check our mount and start options for databases registered with CRS. Strangely, nobody had an answer for me. Probably lack of me asking the right question, rather than lack of knowledge. But, I did find an easy answer:

srvctl config database -d DB_NAME -a

This helped me understand why our standby RAC databases were opening in read-only mode as opposed to mounting into a recovery mode. I had been following the MAA documentation for setting up a standby, which ostensibly does not cover the mount and start options (nor role) for standby databases. Very curious. I modified our standby databases with this kind of command:

srvctl modify database -d DB_NAME -r PHYSICAL_STANDBY -s mount -y AUTOMATIC -p +DATA/db_name/spfiledb_name.ora


While these options are well documented, you have to find it first. For those of us who are new to the scene, we do not always have the faintest idea of where to look. Is it a CRS command, or an OCR command? While you can usually depend on folks in the RAC SIG and oracle-l to help out, sometimes they are just too busy (hmm... it is Thanksgiving....). Or, in a twist of Jonathan Lewis' quotes, "Sometimes, you just get unlucky."

So now that I figured out that one small piece to the puzzle, I have stumbled upon other questions. How do you get a report for all the start/mount options for all databases? I do not really want to run srvctl config for each database. What about other services, like the listener? I tried playing around with srvctl config listener, but I am not getting anything useful out of it. Especially since there is no -a flag. I am currently trying srvctl config service, but all my half-baked guesses are not getting me anywhere. I tried variations on the listner name and what I thought the service was, and I also tried the name reported by crs_stat.

The lack of comprehensive tools (like a good 'du') still bug me with the ASM as well.

4 comments:

Anonymous said...

Not sure if this will help - with respect to checking start and stop options for oracle resources registered in the OCR.

I had been messing around myself with this a while back, and well try this - from any node:

crs_stat -p > ocr_resources.txt

Heres an example from mine for the instance crm1:

NAME=ora.crm.crm1.inst

USR_ORA_OPEN_MODE=
USR_ORA_STOP_MODE=immediate

Haven't looked into what it means when USR_ORA_OPEN_MODE is set to nothing - I assume its normal startup - since thats what we have in our case.

Hope that helps.

Naqi

Anonymous said...

My bad, just read towards the end of your initial post that the you had already tried the crs_stat command.

Anonymous said...

ASMCMD gives you (more-or-less)the "du", does not it?

Charles Schultz said...

anon: much less. =) Try doing something like "du -sk *". I am sure there are some undocumented features of du in asmcmd; or perhaps there are documented features that I have not yet found. If you know of them, please let me know.