Monday, August 30, 2010

How to find Master Node in Oracle RAC

I have seen many users asking how to find “Master node” in Oracle RAC, let me clear some of their doubts.

There are two types of Masters in Oracle RAC, one is Mater node at Oracle Clusterware level and other is Master node for specific resource or block or object.

The node which gets the active state during startup is authorized to be a master node by Cluster Synchronization Service.

Run the below command to find which node is master at Clusterware level
$cat $ORA_CRS_HOME/log/`hostname`/cssd/ocssd* |grep master
or
$ for x in `ls -tr $ORA_CRS_HOME/log/`hostname`/cssd/ocssd* `; do grep -i "master node" $x ; done | tail -1

The OCR Automatic backups are taken only by master node. If the Master fails, the OCR backups will be created on the new Master. The Master node which has OCR backups goes down due to failure then we cannot be recover the OCR that’s why Oracle recommends taking backups using “ocrconfig” and also integrating OCR backups with backup strategy.

Run the below command to find which node is OCR Master and taking automatic backups.
$ocrconfig –showbackup
testrac02 2010/08/30 16:29:52 /oracle/crs/cdata/crs
testrac02 2010/08/30 16:29:52 /oracle/crs/cdata/crs
testrac02 2010/08/30 12:29:49 /oracle/crs/cdata/crs
testrac02 2010/08/30 08:29:46 /oracle/crs/cdata/crs
testrac02 2010/08/29 00:29:23 /oracle/crs/cdata/crs

The block level masters are used by Cache fusion while transferring the block. Any node can become the master node of a particular block and you can also see which node acting as master in V$GES_RESOURCE table (MASTER_NODE column)

You can manually remaster an object with oradebug command:
SQL> oradebug lkdebug -m pkey "object_id"

Regards
Satishbabu Gunukula
http://www.oracleracexpert.com

13 comments:

  1. Hi,

    First off, thanks for this very informative article. I hope I can be as good as you but use of Oracle in US is light years away compare to where I am.

    Anyway, I just want to ask if the Master Node is the same as the PREFERRED NODE? If they are different, how to check which one is the PREFERRED NODE or how does Oracle decide which one is the PREFERRED NODE or how to configure which node should be the PREFERRED NODE? I've asked our resident RAC gurus heap of times and they do not want to provide answers ... grrrrr

    ReplyDelete
  2. Please note that Master node is not same as preferred node. By default Oracle starts the service on preferred node and the available node will take over, in case of any failure of preferred node.

    Run the below command to find the Preferred and available nodes.
    $ srvctl config service -d database_name

    You can configure preferred node and available node using DBCA or srvctl (command-line).

    Regards
    Satishbabu Gunukula
    http://www.oracleracexpert.com

    ReplyDelete
    Replies
    1. Hi,

      can u explain how to identify which service is configured on which node and ways to identify them and relocate to the correct node.
      please explain preferred current available nodes in RAC

      Delete
  3. Hi Satish:
    Thanks for this nice article.
    I am trying to execute the below command to find the Preferred nodes but it dont show any output . No Error also. Just after executing the command the prompt appear -
    [oracle@rac1 cssd]$ srvctl config service -d rac
    [oracle@rac1 cssd]$

    Appreciate for your early reply.

    Thanks
    Ram

    ReplyDelete
  4. Run below command to find the status of the service and provide theo output.
    $ srvctl status service -d rac

    ReplyDelete
  5. Vencer,

    Run the below commands to find the preferred node and available node info, which service configured on which node.
    $srvctl config service -d database_name
    $ srvctl status service -d database_name

    Hope this helps

    ReplyDelete
  6. Hi Satish:
    Thanks for your reply.
    Here is the output -
    $ srvctl status service -d rac
    $

    Still I dont see any output after executing the above command. Do I need to do any changes in the configuration of the database?

    Thanks for your help.

    ReplyDelete
  7. Hi Satis,

    Is there a way for developers to identify what are the preferred and available nodes/instances for a service using any dictionary views.

    Thanks,
    Santosh

    ReplyDelete

  8. تقوم شركة تنظیف بالخبر بتنظیف الأوجة الزجاجیة التي تتعرض للأمطار والأتربة وضوء الشمس مما یؤثر بطریقة سلبیة على شكلھا، ولذا فتقوم شركة تنظیف بالخبر بتنظیفھا لتصبح لامعة وجمیلة ویمكن الاعتماد على شركة تنظیف بالخبر في تنظیف تلك الأوجة الزجاجیة سواء كنت عزیزي العمیل صاحب شركة أو منزل. شركة تنظيف بالخبر
    تقوم شركة تنظیف بالخبر بتنظیف : جمیع أنواع السجاجید بمواد النظافة التي تحمیھا من أن تتلف وذلك بواسطة ماكینة بخاریة كما تقوم الشركة بتنظیف ما یوجد من بلتكنات أو ستائر التي من الصعب أن یتم تنظیفھا من غیر فكھا، ویتم كذلك تنظیف تلك الستائر بمواد ذات رائحة عطرة ت شركة نظافة بالخبر
    كما تقوم الشركة بغسل النوافذ وتلمیع الزجاجیة والقضاء على البقع منھا، وكذلك تنظیف الأوجة الرخامیة والأوجة الألمونیوم كما أن شركتنا شركة تنظیف بالخبر من أفضل الشركات التي تقوم باستخدام أفضل المنظفات العالمیة والتي تعمل على نظافة رائعة ونتائج باھرة حیث أن شركتنا شركة تنظیف بالخبر من أفضل الشركات التي تقوم باستخدام أفضل مواد التنظیف على الإطلاق. شركة تنظیف شقق بالخبر شركة تنظيف شقق بالخبر

    ReplyDelete
  9. تتمیز شركة تنظیف المكیفات بالدمام بوجود نخبة من أفضل المھندسین من ذوي الخبرة في مجال التبرید والتكییف للإشراف على عملیات تنظیف المكیفات بجمیع أشكالھا المختلفة شركة تنظيف مكيفات بالدمام
    شركة تنظيف كنب بالدمام نقوم بغسیل و تنظیف الكنب بأنواعھ المصنوع من الأقمشة والجلد وتنظیف المجالس الأرضیة بجمیع أشكالھا.. شركة تنظیف كنب ومجالس للخدمات المنزلیة ھي من أقدم و افضل شركات غسیل وتنظیف الكنب و المجالس الأرضیة بالدمام ففى شركة غسیل كنب بالدما شركة تنظيف كنب بالدمام
    شركة غسيل كنب بالدمام

    ReplyDelete
  10. دمام فبالطبع كلنا نعلم تماما ان غسیل الكنب من اھم العملیات لذلك فاننا بالتاكیید في شركة غسیل كنب بالدمام نقوم باجراء ھذاا علي اعلي مستوي فاننا ایضا في شركة تنظیف كنب بالدمام قد جعلنا ھذه العملیھ من اھم الملیات التي نقوم داخل شركتنا بالقیام بھا , یجب ان تكون انت ایھا العمیل علي علم باننا ایضا في نظافھ الكنب بالدمام نقوم باجراء ھذا بادوات تختلف عن باقي تنظیف المنزل فیوجد لدینا في تنظیف الكنب بالدمام معدات و مخصصھ تمام شركة تنظيف كنب بالقطيف
    شركة تنظيف خزانات بالدمام
    شركة تنظیف خزانات بالدمام اھلا وسھلا بك عزیزى القارئ ھل لدیك خزانات میاه ؟ ترد تنظیفة وتعقیمة من الجراثیم والمیكروبات ؟ ھل ترد الحصول على شركة موثوقة فى اعمال تنظیف وتعقیم خزانات المیاه نعم عزیزى القارئ انتا الان فى المكات الصحیح تعتبر شركة ركن كلین للصیانة والنظافة من افضل شركات تنظیف شركة تنظيف خزانات بالقطيف
    شركه مكافحة حشرات بالقطيف

    ReplyDelete
  11. اجود وارخص الشركات التي توجد في منطقة مكة المكرمة والتي تعمل في مجال نقل العفش مع الفك والتركيب تلك الشركة الجيدة التي تقدم خدمات جيدة وتسمى افضل شركة نقل اثاث بجدة ايضا وهي التي تختص بنقل العفش من بيت الى بيت آخر في مدينة جدة وما جاورها من مناطق تابعة وايضا من افضل شركات نقل العفش مع الفك والتركيب تلك التي توجد في العاصمة المقدسة مكة المكرمة وقد نالت شركة نقل اثاث بمكة شهرة واسعة لأنها تعتمد على اساليب حديثة في اعمال نقل العفش مع الفك والتركيب وفي مدينة الطائف تطورت خدماتنا واصبحنا نقدم خدمات جيدة في اعمال نقل العفش مع الفك والتركيب ولهذا السبب اصبحت شركتنا
    شركه نقل عفش بالطائف من افضل واحسن واقوى شركات النقل في مدينة الطائف فلو تريد نقل عفش بيتك وانت في الطائف تواصل معنا او اطلع على خدماتنا في شركة نقل عفش في كل من جدة ومكة والطائف

    ReplyDelete
  12. أحمد عبد السلام هو أحد أكثر تكلفة عملية الفتق بالمنظار شهرة في القاهرة، مصر. لقد أكسبه التزامه بتقديم أفضل رعاية ممكنة لمرضاه وتفانيه في مواكبة أحدث التقنيات احترام أقرانه وثقة مرضاه. وهو معروف جيدًا بمعرفته العميقة بجراحة الفتق التنظيرية وقدرته على توفير الإجراءات الجراحية البسيطة التي تحقق نتائج ممتازة. يتبع نهجًا شخصيًا لرعاية كل مريض، مما يضمن حصول كل فرد على أفضل نتيجة ممكنة. يمكن أن يشعر المرضى بالثقة وهم يعلمون أنهم في أيد أمينة مع أحمد عبد السلام.

    ReplyDelete