Sys-Admin Information’s

Share Knowledge, Distribute Knowledge, Capture & Modify Knowledge, Create Knowledge

Author Archive

Show Locking Proccess

without comments

SQL> SELECT s1.username || '@' || s1.machine|| ' ( SID=' || s1.sid || ' )  is blocking '|| s2.username || '@' || s2.machine || ' ( SID=' || s2.sid || ' ) ' AS blocking_status, s1.SQL_ID
FROM v$lock l1, v$session s1, v$lock l2, v$session s2
WHERE s1.sid=l1.sid AND s2.sid=l2.sid
AND l1.BLOCK=1 AND l2.request > 0
AND l1.id1 = l2.id1
AND l2.id2 = l2.id2;

Written by Eriek Regandono

January 21st, 2008 at 1:36 pm

Posted in Oracle, Scripting

kill sesion oracle in windows

without comments

path: …/Oracle Home/bin/orakill.exe or find manually
command: orakill <sid> <spid>
example: C:\Oracle9\bin\orakill ORCL 2760

Written by Eriek Regandono

November 15th, 2007 at 6:39 pm

Posted in Oracle

Copy Tape to Tape

without comments

The ” tcopy ” tility used to copies the magnetic tape mounted on the tape drive specified by the source argument. Simply, the ” tcopy ” used for copies one tape to another tape.

Rewind the tape first
# mt -f /dev/rmt/0 rewind
# mt -f /dev/rmt/1 rewind

And then ” tcopy
# tcopy /dev/rmt/0 /dev/rmt/1

Note
rmt = raw magnetic tape device

Written by Eriek Regandono

August 21st, 2007 at 1:25 pm

Posted in Solaris, Tape

Shutdown Oracle

without comments

$ su - oracle
SQL> sqlplus /nolog
SQL> connect / as sysdba
SQL> shutdown immediate

If No Response

SQL> shutdown abort

Monitoring Instance when restart database

$ tail -f $ORACLE_HOME/admin/bdump/alert_$ORACLE_SID.log

Written by Eriek Regandono

July 18th, 2007 at 12:51 pm

Posted in Oracle

Performance Monitoring Commands

without comments

Monitoring Commands
nmon
vmstat
iostat
sar
topas
nmon
svmon
filemon
rmss

Read the rest of this entry »

Written by Eriek Regandono

July 5th, 2007 at 11:02 pm

Posted in AIX

Get WWN of Fibre cards

without comments

A World Wide Name (WWN) or World Wide Identifier (WWID) is a unique identifier in a Fibre Channel or Serial Attached SCSI storage network. Each WWN is an 8-byte number derived from an IEEE OUI (for the first 3 bytes) and vendor-supplied information (for the rest) … quote from wiki

To get your wwn at your Solaris machine, you can use this command

bash> prtpicl -v | grep wwn
:node-wwn      50  01  04  f0  00  5f  0a  85
:port-wwn      50  01  04  f0  00  5f  0a  83
:node-wwn    50  06  0e  80  04  2a  b0  04

or

bash> luxadm -e port
/devices/ssm@0,0/pci@18,700000/SUNW,qlc@2/fp@0,0:devctl            CONNECTED
/devices/ssm@0,0/pci@18,700000/SUNW,qlc@1/fp@0,0:devctl            CONNECTED
/devices/ssm@0,0/pci@18,600000/fibre-channel@1/fp@0,0:devctl       CONNECTED
/devices/ssm@0,0/pci@18,700000/SUNW,qlc@2,1/fp@0,0:devctl          NOT CONNECTED
/devices/ssm@0,0/pci@18,700000/SUNW,qlc@1,1/fp@0,0:devctl          NOT CONNECTED

And then grab one of the luxadm output

bash> luxadm -e dump_map /devices/ssm@0,0/pci@18,700000/SUNW,qlc@2/fp@0,0:devctl
Pos  Port_ID Hard_Addr Port WWN         Node WWN         Type
0    10000   0         200400a0b818aad4 200400a0b818aad3 0x0  (Disk device)
1    10300   0         200500a0b818aad4 200400a0b818aad3 0x0  (Disk device)
2    20000   0         200400a0b818aad5 200400a0b818aad3 0x0  (Disk device)
3    20300   0         200500a0b818aad5 200400a0b818aad3 0x0  (Disk device)
4    20900   0         210000e08b829a76 200000e08b829a76 0x1f (Unknown Type,Host Bus Adapter)

At your HP-UX machine, you can use this command

bash> fcmsutil /dev/td9
Vendor ID is = 0x001254
Device ID is = 0x001159
XL2 Chip Revision No is = 2.3
PCI Sub-system Vendor ID is = 0x05103c
PCI Sub-system ID is = 0x01128c
Topology = PTTOPT_FABRIC
Link Speed = 2Gb
Local N_Port_id is = 0x0a1650
N_Port Node World Wide Name = 0x50060b000023c458
N_Port Port World Wide Name = 0x50060b000023c459
Driver state = ONLINE
Hardware Path is = 0/0/14/0/0
Number of Assisted IOs = 32763725
Number of Active Login Sessions = 2
Dino Present on Card = NO
Maximum Frame Size = 2048
Driver Version = @(#) libtd.a HP Fibre Channel Tachyon TL/TS/XL2 Driver B.11.11.12 PATCH_11.11 (PHSS_31326) /ux/kern/kisu/TL/src/common/wsio/td_glue.c: Sep 5 2005, 10:14:40

At your Linux machine, used this..

bash> cat /proc/scsi/qla2xxx/* |grep port|grep -v port-0
scsi-qla0-adapter-port=210000145e254fca;
scsi-qla0-port-1=50060160b021b712:500601683021b712:018100:82;
scsi-qla1-adapter-port=210000145e254fcb;
scsi-qla1-port-1=50060160b021b712:500601693021b712:018100:82;

Written by Eriek Regandono

July 5th, 2007 at 10:58 pm

Posted in *Nix, Fibre Channel, Solaris

Tagged with

System Startup and Shutdown

without comments

System boot process:

  • Power on
  • PDC executes CPU, Memory and other tests
  • PDC initialize the console to display messages
  • Looks for Primary boot path
  • It loads and executes Initial System Loader (ISL). Roll of boot ROM ends.
  • ISL loads the secondary system loader called “hpux”. It resides on boot area of the disk
  • “hpux” loads “/stand/vmunix” into memory and hands control over to kernel
  • Kernel loads the device drivers
  • Swapper process started. It has process ID 0. It manages memory for swapping in and out. It schedules all other process. Its first job is to startup the init process.
  • /sbin/pre_init_rc getting executed. It checks and repairs root file system.
  • /sbin/init started. Process ID is 1.
  • It refers /etc/inittab. It does the following.
    1. read the /etc/inittab for default run level
    2. ioinitrc – It invokes insf command with -e option to find any new devices.
    3. bcheckrc – activates LVM and run fsck on file systems if required.
    4. /sbin/rc – It brings the system to the default run level. This script is run whenever the system moves from to a higher one or vice versa.
    5. /usr/bin/getty

    Read the rest of this entry »

    Written by Eriek Regandono

    July 4th, 2007 at 10:03 am

    Posted in HPUX, System Properties

    Show Information On HP-UX Machine

    without comments

    This optional software, you must install Ignite-UX, work only in HP-UX 11.11 n later
    And only root

    # print_manifest | more

    System Information

    Your Hewlett-Packard 9000 computer has software installed and
    configured as follows.

    The system was created January 09, 2003, 12:10:05 SST.
    It was created with Ignite-UX revision B.4.1.61.

    ————————————————————-
    NOTE: You should retain this information for future reference.
    ————————————————————-
    Serial number: XXXXXXXXX
    Order number: XXXXXXXX~XXX~XXXX

    System Hardware

    Model: 9000/800/rp7410
    Main Memory: 16376 MB
    Processors: 4
    OS mode: 64 bit
    LAN hardware ID: 0×00306E47C21B
    Software ID: Z3e10656fcb112572
    Partition ID: Z3e10656fcb1c2125_P0
    Keyboard Language: USB_PS2_DIN_US_English

    Storage devices HW Path Interface

    (some output removed for brevity)

    Written by Eriek Regandono

    July 3rd, 2007 at 6:37 pm

    Posted in HPUX