Thursday, February 28, 2008

GNU Tar command to compress/extract files/folders in Linux

Download GNU Tar:
http://www.gnu.org/software/tar/
ftp://mirrors.kernel.org/gnu/tar/

We have many tools to compress files and folders in Linux.

1. Tar
Tar is sued to compress multiple files/folders into new file_name.tar.
It is used to create backup and archives.

2. Gzip
Gzip compress a file and replaces filename with filename.gz gunzip is used to extract filename.gz

3. Zip
Zip –r file_name , it will create new file_name.zip

Eg:
Compress
tar -zcvf file_name_newname.tarz file_name
Extract
tar -xvzf file_name_name.tarz

Wednesday, February 27, 2008

Configure ASM Using Files Instead of Real Devices in Linux

Sharing this doc from metalink Note:266028.1
This document is for Users intending to test the ASM (Automatic Storage Manager). It explains how to set up ASM, if there are no free partitions on own disk or no free disk device is available. This set-up should be used for testing or educational purposes only.
Steps needed from Linux OS point of viewFirst step: create the files, which will be used as free devices for ASM. As oracle user you can create files using 'dd' command

1- Create virtual disk file with 'dd' command of size 1Gb
$ dd if=/dev/zero of=_file_disk1 bs=1k count=1000000
$ dd if=/dev/zero of=_file_disk2 bs=1k count=1000000
$ ls -l total 200208
-rw-r--r-- 1 oracle dba 1024000000 Mar 19 23:58 _file_disk1
-rw-r--r-- 1 oracle dba 1024000000 Mar 19 23:58 _file_disk2
2- Using 'losetup' command, we will associate a loop device with a file.This time, you need the root account to execute these commands:
# losetup /dev/loop1 _file_disk1
# losetup /dev/loop2 _file_disk2
3- ASM is able to pick up block devices - i।e। /dev/loopXXX - directly without involving 'raw' interface.
If you want to use the raw devices, you need to bind a raw device to an existing block device:
# raw /dev/raw/raw1 /dev/loop1 /dev/raw/raw1: bound to major 7, minor 1 #raw /dev/raw/raw2 /dev/loop2 /dev/raw/raw2: bound to major 7, minor 1

Change the ownership of the raw devices :-
# chown oracle:dba /dev/raw/raw1
# chown oracle:dba /dev/raw/raw2
# chmod 660 /dev/raw/raw1
# chmod 660 /dev/raw/raw2

Wednesday, February 13, 2008

ORA-29701 Unable to Connect to Cluster Manager in Windows

I got this error when configuring ASM using dbca in windows server.

I have tried to delete and recreate CSS using localconfig delete/add.

But it didn't help in resolving issue. The CSS service shoes its starting....

Issue resolution:

I found there are other oracle products are installed on same server.I have changed environment variable point to new $ORACLE_HOME and restarted windows server.

From $ORACLE_HOME/bin i have deleted and recreated cluster services as given below.

localconfig delete

localconfig add

This process resolved my issue.

Monday, February 11, 2008

Commands to Monitor Memory usage in Linux























1.free

Displays total amount of free and used physical and swap memory in the system.

2.top

It is a command line interface which displays summary of all processes, free and used physical and swap memory in the system. It also includes c.p.u utilization.

3.gnome-system-monitor

Starart xserver and run gnome-system-monitor is a graphical user interface

4.vmstat

It Displays about virtual memory stats. Th information about process, memory,paging ,i/o and cpu utilization.




Ref:Red Hat Linux 9 Docs.

Thursday, February 7, 2008

Initialization Parameters for ASM in Oracle 10G

The ASM instance has its own initialization parameter file and Server Parameter file.
ASM installation in clustered environments server parameters are not used unless there is shared ASM Oracle Home

The SID for ASM defaults to +ASM for a single instance database, +ASMnode# for Real Application Clusters


Initialization Parameters

INSTANCE_TYPE: Must be set to ASM

ASM_POWER_LIMIT: Default value 1, Range 0 to 11


ASM_DISKSTRING: Default Value NULL, strings that limits the set of disks that ASM discovers. String format depends on the ASM library in use and on the operating system.

Eg:
/dev/rdsk/*s6
/dev/rdsk/c2t1d*s3

ASM_DISKGROUPS: Default Value NULL

A list of the names of disk groups to be mounted by an ASM instance at startup or

ALTER DISKGROUP ALL MOUNT


Ref: Oracle Database Administrator guide B14231-02

Tuesday, February 5, 2008

Cluster Synchronization Services in Oracle 10G ASM

Automatic storage Management

Cluster Synchronization Services - CSS

The Cluster Synchronization Services is required to enable synchronization between ASM and its client database.
The CSS daemon is configured to start upon reboot while creating database using DBCA.
If we didn't use DBCA to create the database, we must ensure that the CSS daemon is running before starting ASM instance.

How to check CSS daemon is running

Linux

1. Issue the command crsctl check cssd

If CSS daemon is running the message result is CSS appears healthy.

2.To start CSS daemon and configure the host to always start the daemon with root.

3.Ensure $ORACLE_HOME/bin in PATH environment variable

4. localconfig add

Windows

1.

C:\>crsctl check cssd
Cluster Synchronization Services appears healthy

2. Open windows services and search for OracleCSService


Ref:Oracle Doc