Posts

Showing posts from July, 2022

Auditing in Oracle database

Unified Auditing: Oracle Database 12c Release 1 introduces a new auditing feature called Unified Auditing (12.1). Oracle Unified Auditing modifies the database's fundamental auditing capabilities. In earlier versions of Oracle, each component has its own audit trail. With unified auditing, all auditing is compiled into a single repository and view. Due to the fact that all audit data is now in a single location and a single format, there is a double simplification as a result. This data is made available in a consistent format in the UNIFIED AUDIT TRAIL data dictionary view, which is made possible by the unified audit trail, which is stored in a read-only table in the AUDSYS schema in the SYSAUX tablespace.  DBAs can build audit rules and then assign them to various users using Oracle 12c Unified Auditing, which has the same advantages as giving users varying system capabilities based on their responsibilities. The unified_audit_trail database will contain all of the audit records....

Tuples unpacking in Python

  Tuples: my_tup = [(1,2),(2,3),(4,5),(6,7),(8,9)] for tup in my_tup:     print(tup) Output: (1, 2) (2, 3) (4, 5) (6, 7) (8, 9) Tuple unpacking methods: Method-1: using (a,b) my_tup = [(1,2),(2,3),(4,5),(6,7),(8,9)] for a,b in my_tup: print(a) print(b) Output: 1 2 2 3 4 5 6 7 8 9 Dictionaries: my_dict = {'Apple':2, 'Grapes':1, 'Orange':1 } for dict in my_dict: print(dict) Output: Apple Grapes Orange Note: By default, it prints only the Keys but not the values. To print both the keys and pairs we have to use items() like my_dict.items() my_dict.values() my_dict = {'Apple':2, 'Grapes':1, 'Orange':1 } for dict in my_dict.items(): print(dict) Output: ('Apple', 2) ('Grapes', 1) ('Orange', 1) Again Here you could use tuple unpacking technique. my_dict = {'Apple':2, 'Grapes':1, 'Orange':1 } for key,value in my_dict.items(): print(key) print(value) Output: Apple 2 Grapes...

How to know which node is the master node in oracle RAC

 You can verify by using these blow options: 1. grep the ocssd logfile contents by searching a key word "master node" Go to the location of cssd logfile and run the below command: grep -i "master node" ocssd.log | tail -1 Output:  [CSSD]CLSS-3001: local node number 1, master node number 1 2. grep crsd logfile contents by searching a key word "MASTER" Go to the location of crsd logfile and run the below command: grep MASTER crsd.log | tail -1 3. By querying the database view  "V$GES_RESOURCE"  4. by locating the OCR backup, because the node that store OCR backups is the master node. ocrconfig -showbackup

Oracle RAC Interview Questions

Questions related to: Basic RAC Questions RAC installation Questions RAC Upgrade/Patching Questions RAC Data Guard Configuration Questions RAC troubleshooting Questions RAC Basics: 1. What are the Clusterware processes in RAC?  Ans: ocssd: Cluster synchronization services crsd: Cluster ready services evmd: Event manager daemon oprocd: Process monitor daemon 2. What are background process in RAC? LMS LMD LMON LCK DIAG 3. What are clusterware components? Voting disk OCR 4. How to backup OCR? RAC Troubleshooting: 1. How to troubleshoot node reboot/eviction?