What is OraInventory? why do we set it?

What is Oracle Inventory? ?

The Oracle Inventory directory (oraInventory) stores an inventory 
of all software installed on the system. 

It is required and shared by all Oracle software installations on a single system.

 If you have an existing Oracle Inventory path, then Oracle Universal Installer continues to use that Oracle Inventory.

Note:
§          All Oracle software installations rely on this directory. 
       Ensure that you back it up regularly.
§           Do not delete this directory unless you have completely 
        removed all Oracle software from the system.
§          By default, the Oracle Inventory directory is not installed under the oracle base         directory. This is because all Oracle software installations share a common Oracle    Inventory, so there is only one Oracle Inventory for all users. Whereas, there is a       separate Oracle Base for each user.

OraInst.loc
When you install Oracle software on the system for the first time, Oracle Universal Installer creates the oraInst.loc file.
This file identifies:
§  the name of the Oracle Inventory group (typically, oinstall),
§  and the path of the Oracle Inventory directory.
     
       An oraInst.loc file has contents similar to the following:
inventory_loc=central_inventory_location
inst_group=group
where:
§  central_inventory_location is the location of the Oracle Central Inventory,
§  and group is the name of the group that has permissions to write to the central inventory.
To determine whether the oraInst.loc file exists, enter the following command:
# more /etc/oraInst.loc

If the oraInst.loc file exists, then the output from this command is similar to the following:
inventory_loc=/u01/app/oraInventory
inst_group=oinstall
In the previous output example:
§  The inventory_loc group shows the location of the Oracle Inventory
§  The inst_group parameter shows the name of the Oracle Inventory group (in this example, oinstall).

Group
To determine if the Oracle Inventory group exist, enter the following command:
grep oinstall /etc/group
If the oraInst.loc file does not exist, then create the Oracle Inventory group by entering the following command:
/usr/sbin/groupadd oinstall

Log
The following are the default locations for supported operating systems:
§  Linux and UNIX: USER_HOME/oraInventory/logs/
§  Windows: C:\\Program Files\Oracle\Inventory\logs\


How to configure data guard in Oracle

Step 1: Configuring standby database from primary database

[oracle@rizwan ~]$ cd $ORACLE_HOME/dbs

[oracle@rizwan dbs]$ cp initprod.ora initstand.ora

Important Parameter (make changes in both parameter files)

Both side db_name must be same

For primary db:
1. db_name = prod (use same name for all standby databases)
2. db_unique_name = hyd (a unique db name to uniquely identify 
primary and standby db because db_name is same)       
3. Log_archive_dest_1 =‘location = /u01/user20/prod/arch’  
(destination for local archive)
4. Log_archive_dest_2 = ‘service= topune’  
( destination for standby database) 
5.  Standby_file_management= auto
 (it automatically create file at standby db site)

For Standby db:
db_name  = prod;
db_unique_name =  pune;
1 .db_file_name_convert (specify the path name and datafile location of 
primary database
    datafile followed by standby location)
2. standby_archive_dest (location of archives coming from primary database)
3. log_file_name_convert (.specify the path name and redo logfile 
location of primary database redo logfile followed by standby location)
4  fal_server =’tohyd’ (the value is tns service name, to fetch archived log from primary site when log gap is detected at standby site)
5. fal_client =’topune’ (the value is tns service name to copies 
missing archive to standby  database.

Step – II:- Both side create password file with same password
at dbs location
$ orapwd file=orapwprod password=manager force=y ignorecase=y
$oracpwd file=orapwstand password=manager force=y ignorecase=y

Step – III:- Configure Listener at standby side and TNS service at
 primary side
listener name= list_stand   and TNS service= tostand

Step – IV:- Start the standby database in nomount stage 
[oracle@rizwan ~]$ export ORACLE_SID=stand
[oracle@rizwan ~]$ sqlplus / as sysdba

SYS> startup nomount

Connect to RMAN 
[oracle@rizwan ~]$ rman target / nocatalog auxiliary sys/manager@tostand

Rman> duplicate target database for standby from active database;

Step-V: At standby database side starting mrp (media recovery process)
 process

Sql>alter database recover managed standby database disconnect;

How to stop mrp process
Sql> alter database recover managed standby database cancel;

How to check mrp process is running or not
$ps –ef |grep mrp

Starting the Standby db in read only mode
Sql> alter database recover managed standby database cancel;  à stop mrp
Sql> alter database open    à opens in read only mode

Imp views
v$archive_dest            (To check if any error in transferring archives)
v$managed_standby   (Current status information for oracle database process)
v$archived_log (To check how many archives are applied at standby database                                                Side)
  

To Be Continue......



Multiplexing Redo log File in oracle 11g

Why? Redo Log Multiplexing

To protect against failure of the redo logs, Oracle allows redo logs to be multiplexed. With multiplexed redo logs two or more identical copies can be placed in separate locations. 
The log writer process (LGWR) writes the same redo information to each multiplexed log.
Multiplexing uses groups of redo log files. A group contains a redo log and all of its multiplexed copies. Each copy or member is identical. It is required that there are at least two groups and in the case of multiple members per group that all members be the same size. It is recommend but not required that each group has the same number of members.

First we take a look at our current redo log groups and see how many members are in each group.

SQL> select group#, members, bytes from v$log;

    GROUP#    MEMBERS      BYTES
---------- ---------- ----------
         1          1   52428800
         2          1   52428800
         3          1   52428800

Here we see that there are three redo log groups with one member each and that the log files are 50MB in size.

In this example we will add one member to each group using ALTER DATABASE 

ADD LOGFILE MEMBER TO GROUP.

SQL> alter database
  2  add logfile member '/u03/app/oracle/oradata/orcl/redo/redo01_b.log'
  3  to group 1;

Database altered.

SQL> alter database
  2  add logfile member '/u03/app/oracle/oradata/orcl/redo/redo02_b.log'
  3  to group 2;

Database altered.

SQL> alter database
  2  add logfile member '/u03/app/oracle/oradata/orcl/redo/redo03_b.log'
  3  to group 3;

Database altered.

SQL> host

Now when we execute the first query we see that each group has two members.
SQL> select group#, members, bytes from v$log;

    GROUP#    MEMBERS      BYTES
---------- ---------- ----------
         1          2   52428800
         2          2   52428800
         3          2   52428800

SQL>

If you happen to be need another redo log group you can multiplex the group at creation by specifying two file names. Below is an example of creating a multiplexed redo log group with two members with ALTER DATABASE ADD LOGFILE GROUP.
Now looking at V$LOG we see four groups with two members each.
SQL> alter database
  2  add logfile group 4
  3  ('/u02/app/oracle/oradata/orcl/redo/redo04.log','/u03/app/oracle/oradata/orcl/redo/redo04_b.log')
  4  size 50M;

Database altered.

SQL>
SQL> select group#, members, bytes from v$log;

    GROUP#    MEMBERS      BYTES
---------- ---------- ----------
         1          2   52428800
         2          2   52428800
         3          2   52428800
         4          2   52428800

SQL>

Oracle Parameter Lisit

Green = New in Oracle 10g
Red = Deprecated in 10g
Bold = Static Parameter
Blue = new in 11g
 

Oracle init.ora parameter list 

active_instance_count
aq_tm_processes
archive_lag_target
asm_diskgroups
asm_diskstring
asm_power_limit
audit_file_dest
audit_sys_operations
audit_trail
background_core_dump
background_dump_dest
backup_tape_io_slaves
bitmap_merge_area_size
blank_trimming
circuits
cluster_database
cluster_database_instances
cluster_interconnects
commit_point_strength
compatible
control_files
core_dump_dest
cpu_count
create_bitmap_area_size
create_stored_outlines
cursor_sharing
cursor_space_for_time
current_schema
db_2k_cache_size
db_4k_cache_size
db_8k_cache_size
db_16k_cache_size    
db_32k_cache_size    
db_block_buffers      
db_block_checking    
db_block_checksum  
db_block_size                
db_cache_advice           
db_cache_size                 
db_create_file_dest        
db_create_online_log_dest_n                    
db_domain                                 
db_file_multiblock_read_count                                
db_file_name_convert                                  
db_files                                  
db_flashback_retention_target                                 
db_keep_cache_size                
db_name                                 
db_recovery_file_dest           
db_recovery_file_dest_size  
db_recycle_cache_size            
db_unique_name                    
db_writer_processes              
dblink_encrypt_login            
dbwr_io_slaves                       
ddl_wait_for_locks                
dg_broker_config_filen           
dg_broker_start                        
disk_asynch_io                       
dispatchers                               
distributed_lock_timeout     
dml_locks                                
drs_start                                  
error_on_overlap_time     
enqueue_resources          
event                                  
fal_client                            
fal_server                           
fast_start_io_target           
fast_start_mttr_target        
fast_start_parallel_rollback                                  
file_mapping                                              
fileio_network_adapters                          
filesystemio_options                                  
fixed_date                                                   
gc_files_to_locks                                       
gcs_server_processes                                
global_context_pool_size                         
global_names                                             
hash_area_size                                           
hash_join_enabled                                      
hi_shared_memory_address                   
ifile                                                        
instance_groups                                        
instance_name                                          
instance_number                                      
instance_type                                            
isolation_level                                         
java_max_sessionspace_size                
java_pool_size                                        
java_soft_sessionspace_limit                
job_queue_processes                               
large_pool_size                                       
license_max_sessions                             
license_max_users                                  
license_sessions_warning                       
local_listener                                           
lock_name_space                                   
lock_sga                                                  
log_archive_config                                
log_archive_dest                                     
log_archive_dest_n                                 
log_archive_dest_state_n                        
log_archive_duplex_dest                        
log_archive_format                               
log_archive_local_first                          
log_archive_max_processes                   
log_archive_min_succeed_dest              
log_archive_start                                   
log_archive_trace                                    
log_buffer                                               
log_checkpoint_interval                          
log_checkpoint_timeout                          
log_checkpoints_to_alert                        
log_file_name_convert                          
log_parallelism                                      
logmnr_max_persistent_sessions        
max_dispatchers                                    
max_dump_file_size                               
max_enabled_roles                                
max_rollback_segments                       
max_shared_servers                             
memory_max
memory_max_target
mts_circuits                                            
mts_dispatchers
mts_listener_address
mts_max_dispatchers
mts_max_servers
mts_multiple_listeners                      
mts_servers                                        
mts_service                                         
mts_sessions                                       
nls_calendar                                         
nls_comp                                             
nls_currency                                        
nls_date_format                                   
nls_date_language                               
nls_dual_currency                               
nls_iso_currency                                 
nls_territory
nls_language                                        
nls_length_semantics                          
nls_nchar_conv_excp                          
nls_numeric_characters                       
nls_sort                                                
nls_territory                                             
nls_time_format                                      
nls_time_tz_format                                  
nls_timestamp_format                             
nls_timestamp_tz_format                        
o7_dictionary_accessibility                     
object_cache_max_size_percent             
objects max
object_cache_optimal_size                      
objects min
olap_page_pool_size                               
open_cursors                                            
open_links                                              
open_links_per_instance                       
optimizer_dynamic_sampling                 
optimizer_features_enable                      
optimizer_index_caching                           
optimizer_index_cost_adj                          
optimizer_max_permutations                    
optimizer_mode                                         
oracle_trace_collection_name                 
oracle_trace_collection_path                  
oracle_trace_collection_size                    
oracle_trace_enable                                 
oracle_trace_facility_name                     
oracle_trace_facility_path                       
os_authent_prefix                                       
os_roles                                                      
operating system
parallel_adaptive_multi_user                     
parallelism
parallel_automatic_tuning                          
parallel_execution_message_size              
parallel_instance_group                             
parallel_max_servers                               
parallel_min_percent                                  
parallel_min_servers                                
parallel_server                                            
parallel_threads_per_cpu                           
partition_view_enabled                                
pga_aggregate_target                                   
plsql_code_type                                          
plsql_compiler_flags                                    
plsql_debug                                                  
plsql_native_c_compiler
plsql_native_library_dir                               
plsql_native_library_subdir_count              
plsql_native_linker                                       
plsql_native_make_file_name                      
plsql_native_make_utility                            
plsql_optimize_level
plsql_v2_compatibility                                 
plsql_warnings                                            
dba_plsql_object_settings
pre_page_sga                                              
processes                                                      
query_rewrite_enabled                                 
query_rewrite_integrity                                
rdbms_server_dn                                        
read_only_open_delayed                           
recovery_parallelism                                  
remote_archive_enable                              
remote_dependencies_mode                                                        
remote_listener                                           
remote_login_passwordfile                      
password file
remote_os_authent                                     
remote_os_roles                                         
replication_dependency_tracking              
resource_limit                                             
resource_manager_plan                              
resumable_timeout                                   
rollback_segments                                      
row_locking                                                
serial_reuse                                               
service_names                                            
session_cached_cursors                              
session_max_open_files                            
session can open
sessions                                                       
sessions
sga_max_size                                             
sga_target                                                  
shadow_core_dump                                  
shared_memory_address                         
shared_pool_reserved_size                        
shared_pool_size                                         
shared_servers                                              
shared_server_sessions                              
skip_unusable_indexes                                 
smtp_out_server                                         
configuration parameter
sort_area_retained_size                                
sort_area_size                                               
spfile                                                       
sp_name                                                       
sql92_security                                             
update/delete
sql_trace                                                       
sqltune_category                                         
sql_version                                                   
compatibility
standby_archive_dest                                   
destination
standby_file_management                            
star_transformation_enabled                        
statistics_level                                              
streams_pool_size                                       
tape_asynch_io                                            
thread                                                        
timed_os_statistics                                       
seconds
timed_statistics                                             
time_zone                                                     
trace_enabled                                                
tracefile_identifier                                        
transaction_auditing                                     
transactions                                                 
transactions_per_rollback_segment        
undo_management                                     
undo_retention                                              
undo_suppress_errors                                   
mode
undo_tablespace                                           
use_indirect_data_buffers                            
use_private_outlines                                     
use_stored_outlines                                      
user_dump_dest                                            
utl_file_dir
workarea_size_policy