Saturday, April 11, 2015

Some Useful Command

 

If the value of any kernel parameter is different from the minimum value, then perform the following:

1.        Using any text editor, create or edit the/etc/sysctl.conf file, and add or edit lines similar to the following. For example:

Note:

Include lines only for the kernel parameter values to change. For the semaphore parameters (kernel.sem), you must specify all four values. If any of the current values are larger than the minimum value, then specify the larger value.

fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 4294967295
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576

By specifying the values in the/etc/sysctl.conf file, they persist when you restart the system. On SUSE Linux Enterprise Server systems, enter the following command to ensure that the system reads the/etc/sysctl.conf file when it restarts:

# /sbin/chkconfig boot.sysctl on

2.        Enter the following command to change the current values of the kernel parameters:

3.  # /sbin/sysctl -p

Review the output from this command to verify that the values are correct. If the values are incorrect, edit the/etc/sysctl.conf file, then enter this command again.

4.Enter the command /sbin/sysctl -a to confirm that the values are set correctly.

5. After updating the values of the kernel parameters in the /etc/sysctl.conffile, either restart the computer, or run the command sysctl -p to make the changes in the /etc/sysctl.conf file available in the active kernel memory.

Checking UDP and TCP Kernerl Parameters

 with IPv4, use the following command to check your current range for ephemeral ports:
 cat /proc/sys/net/ipv4/ip_local_port_range
32768 61000

If necessary, update the UDP and TCP ephemeral port range to a range high enough for anticipated system workloads, and to ensure that the ephemeral port range starts at 9000 and above. 

# echo 9000 65500 > /proc/sys/net/ipv4/ip_local_port_range

 

Make following changes permanent

as root, use a text editor to open /etc/sysctl.conf, and add or change to the following:net.ipv4.ip_local_port_range = 9000 65500, and then restart the network (# /etc/rc.d/init.d/network restart)

 

Checking ASMLIB

Find kernel version and architecture of the system

uname –rm

rpm -ivh oracleasm-support-version.arch.rpm \oracleasm-kernel-version.arch.rpm
oracleasmlib-version.arch.rpm

To load oracleasm kernel moduke

# /usr/sbin/oracleasm init

Configure disk for ASM

Enter the following command to identifiy the device name for the disks to use

# /sbin/fdisk -l

To verify that the environment has been set correctly, enter the following commands:

 $ umask
 $ env | more

Verify that the umask command displays a value of 22022, or 0022 and that the environment variables you set in this section have the correct values.

 

About Oracle ASM with Oracle ASM Filter Driver

 

Starting with Oracle Database 12c Release 1 (12.1.0.2), Oracle ASM Filter Driver (Oracle ASMFD) is installed with an Oracle Grid Infrastructure installation

Oracle Automatic Storage Management Filter Driver (Oracle ASMFD) rejects write I/O requests that are not issued by Oracle software. This filter helps to prevent users with administrative privileges from inadvertently overwriting Oracle ASM disks, thus preventing corruption in Oracle ASM disks and files within the disk group. 

Oracle ASMFD simplifies the configuration and management of disk devices by eliminating the need to rebind disk devices used with Oracle ASM each time the system is restarted

Configuring Oracle ASM Disk Groups Manually using Oracle ASMCA

After installing Oracle Grid Infrastructure for a standalone server, you can also use Oracle ASMCA to create and configure disk groups, Oracle ADVM and Oracle ACFS.

To create additional disk groups or manually configure Oracle ASM disks, you can run the Oracle ASMCA as follows:

$ cd Grid_home/bin
$ ./asmca

Installing Oracle Grid Infrastructure for a Standalone Server Using a Software-Only Installation

A software-only installation only copies the Oracle Grid Infrastructure for a standalone server binaries to the specified location
 After the installation, manually configure Oracle Grid Infrastructure for a standalone server and Oracle ASM
When you perform a software-only installation of Oracle Grid Infrastructure software, you must complete a few manual configuration steps to enable Oracle Restart after you install the software
Performing a software-only installation involves the following steps:

Installing the Software Binaries

Run the runInstaller command from the relevant directory on the Oracle Database 12c installation media or download directory
Complete a software-only installation of Oracle Grid Infrastructure for a standalone server
Verify that the server meets the installation requirements using the command runcluvfy.sh stage -pre hacfg. Ensure that you complete all storage and server preinstallation requirements.

Configuring the Software Binaries

Log in as the root user and run the roothas.sh script from Grid_home using the following syntax:

Grid_home/perl/bin/perl -I Grid_home/perl/lib -I Grid_home/crs/install Grid_home/crs/install/roothas.sh

For example, if your Oracle Grid Infrastructure for a standalone server home isu01/app/oracle/product/12.1.0/grid, then run the following script:

è  # /u01/app/oracle/product/12.1.0/grid/perl/bin/perl -I /u01/app/oracle/product/12.1.0/grid/perl/lib -I 
/u01/app/oracle/product
/12.1.0/grid/crs/install 
/u01/app/oracle/product/12.1.0/grid/crs/install/roothas.sh
 

      Change the directory to Grid_home/oui/bin, whereGrid_home is the path of the Oracle Grid Infrastructure for a standalone server home.

 Log in as the Oracle Restart software owner user and enter the following command:

è  ./runInstaller -updateNodeList ORACLE_HOME=Grid_home -defaultHomeName CLUSTER_NODES= CRS=TRUE

è For example:

è  $ ./runInstaller -updateNodeList ORACLE_HOME=/u01/app/oracle/product/12.1.0/grid
è  -defaultHomeName CLUSTER_NODES= CRS=TRUE

Use the SRVCTL utility along with Oracle Network Configuration Assistant and Oracle ASMCA to add the listener, the Oracle ASM instance, and all Oracle ASM disk groups to the Oracle Restart configuration.

To verify that the Oracle High Availability Service is installed properly, run

./crsctl check has

Relink Oracle Grid Infrastructure for a standalone server using the following procedure:

1.Log in as root

2.  # cd Grid_home/crs/install

# roothas.sh -unlock

  1. Log in as the Oracle Grid Infrastructure for a standalone server owner:

2.  $ export ORACLE_HOME=Grid_home

3.  $ Grid_home/bin/relink

  1. Log in as root again:

5.  # cd Grid_home/rdbms/install/

6.  # ./rootadd_rdbms.sh

7.  # cd Grid_home/crs/install

# roothas.sh -patch

 

You must relink the Oracle Restart and Oracle ASM binaries every time you apply an operating system patch or after an operating system upgrade

 

No comments:

Post a Comment

  Diagnosing a long parsing issue in Oracle Database Slide 1: Topic: Diagnosing a Long Parsing Issue in Oracle Database Slide 2: Parsing is ...