AskDba.org Weblog » Entries tagged with "Unix"
How To Discover Disk Name When LUN Number is Known (OEL5)
I am creating 11gR2 RAC setup for one of my client. Following Oracle documentation for storage, I opted for Oracle ASM and asked storage team for new physical devices. Storage admin thus provided me with a set of LUNs instead of actual physical device names like /dev/sdcxxx. Now the major task is to get the actual device name associated with LUNs. In OEL4 this is easy to get by issuing # iscsi-ls -l This command will give output like: DEVICE DETAILS: --------------- LUN ID : 0 Vendor: DELL Model: MD3000i Rev: 0670 Type: Direct-Access ANSI SCSI revision: 05 page83 type3: 6001e4f0003fa9970000083c48573c94 page80: 383438303045500a Device: /dev/sdh LUN ID : 1 Vendor: … Read entire article »
Sqlplus connection on AIX taking too long
Recently we faced a performance issue, where in sqlplus connection from application server A (AIX 5.3) to Database server DB (different physical server,10gR2 on AIX 5.3) was taking nearly 1-2 minutes. We did some quick check’s to narrow down the problematic area.i.e Is it network or database server or some issue with application server? 1)Vmstat output reported Normal Run queue’s/memory utilisation/idle cpu on Application server A and Database Server DB . Rules out resource issue. 2) Connections from other application server B was taking normal time. Rules out Database server issue 3) If incorrect password was entered in connection details, second attempt resulted in normal quick response time. Indicates some network issues. 4) System Admin checked for network issues with traceroute command and reported normal results. Even though SA confirmed that there was no network … Read entire article »
Use awk/sed in vi
Thought of sharing some useful info which can help you to do your work faster in vi.You can use awk/sed scripts in vi using following command in vi :%!scriptname Here the scriptname file should have execute privilges for user. I used this to create a useful script which I was doing by typing multiple substitution command in vi. e.g Your file contains list of table $cat t.lst BANK005 BJSTM BJS_ORG CHAINED_ROWS CORR_BAM CORR_CAM CORR_EIT CORR_GAC CORR_GAM CORR_ITC CORR_LDT CORR_LHT Create script (quotes) with following command and give execute permission to user. sed -e “s/^/’/g” -e “s/$/’,/” $1|awk ‘{printf (“%s”,$0)}’|sed -e “s/^/(/g” -e “s/,$/)/g” open t.lst in vi and type :%!quotes ('BANK005','BJSTM','BJS_ORG','CHAINED_ROWS','CORR_BAM','CORR_CAM','CORR_EIT','CORR_GAC','CORR_GAM','CORR_ITC','CORR_LDT','CORR_LHT') Similarly if you wish to remove blank lines, have a file blank like awk ‘!NF==0 {print $0}’ $1 Blank lines can also be directly removed from vi using :g/^$/d Isn’t it cool.. … Read entire article »
Filed under: Unix
Connections to DataBase Hang Including “/ as sysdba”
Recently I faced one issue where all the connection to database hung and it was also not possible to login to database using “/ as sysdba”. To get access of sqlplus I used the following syntax: $ sqlplus -prelim / as sysdba With “prelim” option we can run some commands which will help in collection useful information about the problem. This will work only in Oracle 10g and higher version. After successfully getting connected run the following commands to generate Hanganalyze and systemstate traces: SQL> oradebug setmypid SQL> oradebug unlimit SQL> oradebug dump systemstate 266 SQL> oradebug tracefile_name – This will give you the name of the tracefile generated. SQL > oradebug dump hanganalyze 2 SQL > oradebug tracefile_name To analyze these trace files one should be aware of Metalink Note: 215858.1. After analyzing these files I found that following event was active and … Read entire article »
Filed under: oracle, performance
Scheduling Job through Cron??
In case you came across this link searching for Cron syntax, then you can refer to following link http://www.adminschoice.com/docs/crontab.htm Other’s can continue reading the article …. This was a problem which I faced yesterday. We had a mview refresh which was lagging on one of the server. On checking master site, I found that there were many pending requests coming from the second materialized view site . Checking second site revealed that there were multiple sessions running in database which were waiting on ‘enq :JI Contention’ wait event. These mviews were being refreshed by job scheduled through a cron. Doing a grep for the refresh script gave following result $ps -ef|grep scott|grep -v grep oracle 11725 11714 0 13:00:00 ? … Read entire article »
Creating ASM devices on AIX
I thought of sharing few tips on creating ASM devices on AIX which I will be helpful to Oracle DBA’s. Suppose SysAdmin gives you list of Serial numbers for LUN instead of device Name pcmpath query device DEV#: 33 DEVICE NAME: hdisk33 TYPE: 2107900 ALGORITHM: Load Balance SERIAL: 75DM0111101 =========================================================================== Path# Adapter/Path Name State Mode Select Errors 0 fscsi0/path0 CLOSE NORMAL 9 … Read entire article »

Recent Comments