Power by

Unix history (from wikipedia) SunOS/Solaris/AIX/HP-UX/Unixware/IRIX/Xenix OS/BSD/GNU Linux/MacOS

** Web http://en.wikipedia.org/wiki/File:Unix_history.svg

SAP BASIS Solve Case upgrade sap kernel but start not work at dispatcher step

** Myself
SAP Work Process check step
-se.sapPRD_DVEBMGS20 Start OK.
-ms.sapPRD_DVEBMGS20 Start OK.
-co.sapPRD_DVEBMGS20 Start OK.
-dw.sapPRD_DVEBMGS20 died
Step check
Check disp work process at /usr/sap/PRD/DVEBMGS20/work/dev_disp
Example content
*** ERROR => DpWPCheck: WXX (pid XXX) died (severity=0, status=65280) [dpxxdisp.c 15787]
Check sapcpe working OK or not
###Almost case sapcpe not corrected
check kernel for example update kernel to 236 from 114
1 ) /sapmnt/PRD/exe and /usr/sap/PRD/SYS/exe/run (New kernel after upgrade 236)
- ls –lt ## for check time
- ./disp+work -version ## for check version
2 ) /usr/sap/PRD/DVEBMGS20/exe - (sapcpe not copy use old version 114)
- ls –lt ## for check time
- ./disp+work -version ## for check version
Solve 1 Copy from Develop/Test QA in case Development not problem
cp –p /usr/sap/DEV/DVEBMGS20/exe/* /usr/sap/PRD/DVEBMGS20/exe

Solve 2 Change DIR_EXECUTABLE at startup profile to correct path in “Note 1104735 - Upgrade to new instance-specific directory on UNIX

Detail Note 1104735
With SAP NetWeaver 2004s and associated products, SAP introduces a new directory structure on UNIX. This allows a kernel exchange in the running system.
The new directory structure is created only for new installations.
With the new directory structure, the SAP kernel is installed in central directory (indicated by the profile parameter DIR_CT_RUN). From there, the kernel is copied during the system start to the instance-specific kernel directories (indicated by the profile parameter DIR_EXECUTABLE). The kernel is replicated using the program sapcpe.
Each SAP instance uses the kernel from its own instance-specific directory.
This note describes how to configure SAP systems (for which you have performed an upgrade) for the new directory structure.
For releases based on SAP NetWeaver 7.10, the directory structure was changed again. The

Oracle Database Migrate oracle db files to ASM

** Myself
Step Migrate oracle database files to ASM
- install crs 1 instance
- create asm instance
- create asm disk and diskgroup(DATA)
- SQL> alter database backup controlfile to '/tmp/backcontrol.ctl';
- SQL> alter system set DB_CREATE_FILE_DEST='+DATA';
- SQL> alter system reset control_files scope=spfile sid='*';
- rman target /
- RMAN> shutdown immediate;
- RMAN> startup nomount;
- RMAN> restore controlfile from '/tmp/backcontrol.ctl';
- RMAN> alter database mount;
- RMAN> backup as copy database format '+DATA';
- RMAN> switch database to copy;
- RMAN> alter database open; --if not -- alter database open resetlog;
- SQL> create temporary tablespace temp01 tempfile size 100M;
- SQL> alter database default temporary tablespace temp01;
- SQL> drop tablespace temp;
- SQL> create temporary tablespace temp tempfile size 100M;
- SQL> alter database default temporary tablespace temp;
- SQL> drop tablespace temp01;
- SQL> alter database add logfile member '+DATA' to group 1;
- SQL> alter database add logfile member '+DATA' to group 2;
- SQL> alter database add logfile member '+DATA' to group 3;
- SQL> alter system switch logfile;
- SQL> alter system switch logfile;
- SQL> alter system switch logfile;
- SQL> alter database drop logfile member '/oracle/oradata/<SID>/redo01.log';
- SQL> alter database drop logfile member '/oracle/oradata/<SID>/redo02.log';
- SQL> alter system switch logfile;
- SQL> alter database drop logfile member '/oracle/oradata/<SID>/redo03.log';
- SQL>
select name from v$controlfile
select name from v$datafile
select name from v$tempfile
select member from v$logfile
select filename from v$block_change_tracking
select name from v$flashback_database_logfile;

SAP BASIS System can no longer create spool requests POOL_INTERNAL_ERROR, Spool Full, Spool overflow

** Myself refer Note 48284
Note 48284 - System can no longer create spool requests (SPOOL_INTERNAL_ERROR, Spool Full, Spool overflow)
Creating spool requests takes a long time. Finally, the system cannot create any more
requests and the short dump SPOOL_INTERNAL_ERROR occurs. In the dump itself and in the
syslog, the system issues the message "Spool full" or "Spool overflow".
- Spool Full
- Spool overflow
1. Log on to the system in client 000 and call transaction SNRO
2. In the "To No." column, change the upper limit of the interval SPO_NUM to 999,999 (Default numbering range is 100 - 32,000 can print to 32,000 requests buffer number 100)
[Optional Task] Not sure for change optional because Sap Note not show maximum limit by profile may be ignore by sap kernel
3. Call rz10,change profile parameter rspo/spool_id/max_number up to 99000
4. Call rz10,change profile rspo/spool_id/loopbreak up to 99000 same value as above

HP-UX 11iv1 How to boot single user mode

** Myself
Main Menu: Enter command or menu > bo pri
Interact with IPL (Y, N, or Cancel)?> y
Boot IO Dependent Code (IODC) revision 1
HARD Booted.
ISL Revision A.00.43 Apr 12, 2000
ISL> hpux -is
: disk(0/0/2/;0)/stand/vmunix
10948608 + 2043904 + 11662640 start 0x1ff3e8

Unix OS Managing Users/Groups from the Command Line

** Web
Managing Group from the Command Line
Commands for Managing Groups:
# groupadd -g 500 accts
# groupmod -n accounts accts
# groupdel accounts
# vi /etc/group
# grpck
# groupadd -g 500 accts
Create a group called accts with GID 500.
# groupmod -n accounts accts
Change the name of accts to accounts.
# groupdel accounts
Delete the accounts group.
Managing Users from the Command Line
Commands for Managing User Accounts:
# useradd -m –d /home/user1 -k /etc/skel –u 100 –g 500 –s /bin/ksh user1
# useradd -m user1
# usermod -G finance user1
# userdel -r user1
# passwd user1
# vipw
# pwck

-m Home directory.
-k /aaa/skel Define the skeleton directory copied to home.
-u 101 Use userid 101.
-g 500 Define the user's primary group.
-G finance,accounts Define the user's other group memberships.
-c "111-1111" Define the user's comment field in /etc/passwd.
-d /home/guest Define the user's home directory.
-s /usr/bin/csh Define the user's default login shell.
–o Allows the creation of users with non-unique userid's.
The /etc/skel Directory /etc/skel/.profile,.login,.cshrc copied to new accounts /home/user1,.profile,.login,.cshrc

HP-UX Make New kernel parameter manual (No Use SAM tools)

** Web
1. Change directory to the build environment:
cd /stand/build
2. Create a kernel parameters file which you can then edit. Extract the parameters from the currently running system.
/usr/lbin/sysadm/system_prep -s system
3. Use your favorite editor to edit the kernel parameter file. This is an ASCII text file
containing a list of drivers, subsystems, and parameters to define in the new kernel. To
remove a driver or subsystem, simply delete the associated line in the system file. To add a driver or subsystem, simply add a line for the desired driver or subsystem to the end of the system file. To change a kernel parameter add a line to the end of the file that lists both the parameter name and value separated by one or more spaces.
vi system
4. Build a new kernel
/usr/sbin/mk_kernel -s ./system
This creates /stand/build/vmunix_test.
5. Save the old system and vmunix files in case something goes wrong. You will still have a
bootable kernel.
mv /stand/system /stand/system.prev
mv /stand/vmunix /stand/vmunix.prev
6. Move the new system and kernel files from the build environment into their proper place,
ready to use after the next reboot. Note that the kmupdate command is new with version
11.x, so at 10.x the kernel and system files must be moved into place manually.
mv /stand/build/system /stand/system
mv /stand/build/vmunix_test /stand/vmunix
7. Reboot the system to test the new kernel.
shutdown –ry 0

HP-UX Install glance + Monitoring Tools

** Myself
Install glance +
- install glance for s800 (server )
- install glance + pack ( Keep log to DB and set alert to mail )
# install C/Ansi for s800 to informic
Start service all glance
Run perfstat to check all service if don’t start may be run manual all service
--or –
/opt/perf/bin/mwa for measure ware agent
If all service start /opt/perf/data have logfiles

HP-UX Check Physical Disk,Tape,Lun mapping for HP-UX 11.31

** Myself
--Physical Disk , tape ,lan
# Check disk mapping for HP-UX 11.31
ioscan -m dsf
Persistent DSF Legacy DSF(s)
/dev/rchgr/autoch1 /dev/rac/c6t0d1
/dev/rdisk/disk3 /dev/rdsk/c0t0d0
/dev/rdisk/disk3_p1 /dev/rdsk/c0t0d0s1
/dev/rdisk/disk3_p2 /dev/rdsk/c0t0d0s2
/dev/rdisk/disk3_p3 /dev/rdsk/c0t0d0s3
# Check disk mapping for HP-UX 11.31
ioscan -m lun
Class I Lun H/W Path Driver S/W State H/W Type Health Description
ctl 4 64000/0xfa00/0x0 esctl CLAIMED DEVICE online HP
tape 1 64000/0xfa00/0x1 estape CLAIMED DEVICE online HP
Ultrium 4-SCSI
/dev/rtape/tape1_BEST /dev/rtape/tape1_BESTn
/dev/rtape/tape1_BESTb /dev/rtape/tape1_BESTnb
autoch 1 64000/0xfa00/0x2 eschgr CLAIMED DEVICE online HP
MSL G3 Series
disk 3 64000/0xfa00/0x3 esdisk CLAIMED DEVICE online HP
IR Volume
/dev/disk/disk3 /dev/rdisk/disk3
/dev/disk/disk3_p1 /dev/rdisk/disk3_p1
--Scan hard disk
Use the ioscan command to check the S/W state of the disk. Only disks in state CLAIMED are currently accessible by the system. Disks in other states such as NO_HW or disks that are completely missing from the ioscan output are suspicious. If the disk is marked as CLAIMED, then its controller is responding. For example: # ioscan –fnCdisk
Class I H/W Path Driver S/W State H/W Type Description
disk 0 8/4.5.0 sdisk CLAIMED DEVICE SEAGATE ST34572WC
disk 1 8/4.8.0 sdisk UNCLAIMED UNKNOWN SEAGATE ST34572WC
disk 2 8/16/5.2.0 sdisk CLAIMED DEVICE TOSHIBA CD-ROM XM-5401TA
In this example the disk at hardware path 8/4.8.0 is not accessible. If the disk has multiple hardware paths, be sure to check all the paths.
--Check Disk bad sector
more /var/adm/syslog/syslog.log
And most important: make sure the online diagnostics are loaded and running. They will monitor disk error messages and can be configured to notify you when there are error messages. The file: /var/adm/syslog/syslog.log will also have disk errors logged.
--Check scan tape
ioscan - fnC tape
Class I H/W Path Driver S/W State H/W Type Description
tape 2 0/3/0/0/0/ stape CLAIMED DEVICE HP
Ultrium 4-SCSI
/dev/rmt/2m /dev/rmt/c6t0d0BEST
/dev/rmt/2mb /dev/rmt/c6t0d0BESTb
/dev/rmt/2mn /dev/rmt/c6t0d0BESTn
/dev/rmt/2mnb /dev/rmt/c6t0d0BESTnb

HP-UX interface/lancard command

** Myself
Show lancard
netstat –i or lanscan

Show ip&gateway
netstat -an

SAM Tool configuration interface and IP
No require boot
Add first interface
set_parms ip_address (require boot)
Add another interface
vi /etc/rc.config.d/netconf
change 7 line to another interface

HP-UX 11iv2 Move root disk to same/other model of machine

** Myself
Move root disk to same model of machine
-          EFI --> change boot record to hpux in disk

Move root disk to other model of machine
-          From old machine,Exported all vg to map file(ex vgexport –s –m vg00.map vg00 into root path)
-          EFI --> change boot record to hpux in disk
-          boot vmunix –lm
-          mkdir /dev/vg00
-          mknod /dev/vg00/group c 64 0x000000
-          vgimport /dev/vg00 /dev/dsk/cXtXd0
-          vgchange -a y /dev/vg00
-          repeat step to all vgs
-          mount –a
-          lvlnboot –v
-          If any errors fix it by lvlnboot
#rmlnboot -b
#rmlnboot -r
#rmlnboot -s
#rmlnboot -d
#lvlnboot -b /dev/vg00/lvol1 ===== > for boot partition
#lvlnboot -r /dev/vg00/lvol3 ===== > for root partition
#lvlnboot -s /dev/vg00/lvol2 ===== > for swap partition
#lvlnboot -d /dev/vg00/lvol2 ===== > for dump partition
- shutdown –Ry 0 (-R to reconfig)

HP-UX 11iv2 and v3 Change EFI boot Menu

** Myself

EFI menu

Change boot console graphic

->boot config -> boot from file -> Console -> select output console

If want to VGA output choose PCI short name (last below row)

EFL menu

Change boot from dvd

->boot config -> boot from file -> Removable media boot

Boot from hard drive

->first menu

Veritas Cluster (VCS) Short Command

** Myself
view license
install license
# license is able apply multiple
Software for rac (storage foundation(vxvm+vol),ha(cvm),cluster file system(cfs),cluster volume manager(cvm is extend of vxvm))
- GAB&LLT (layer 2) is heartbete
- Had (monitor hardware)
- Agent (monitor service each agent)
hagui (manage and create cluster)
- config on one node will deploy to another node
- user=admin , password=password
- if config in main.cf file will rcp to another node and restart all node
For rac agent (must be install sfrac component)
Service group oracle
- ip (resource)
- listener (resource) depend on ip
- disk group (resource)
- volumn (resource) depend on disk group
- file system (resource) depend on vol
- db (resource) depend on db
can link service to service or service group to service group

Pre config
- set rsh
- hostname
install software
- i
- 1 (cluster server)
- Node name node1 node2
- License key
- Patch must be same to require
Config cluster
/cluster_server/installvcs -configure
- Node name
- Enter………………
- Heartbeat :private first ,second interface and low priority for (Heartbeat and data)
- Web console (lan data) virtual ip for web console(port:8181)
Software path
- /opt/VRTScvs/
Freeze service for no monitoring process and service (service group) have temp or persistance
- click open for config
- click save before close
- default 1 service group clusterservice for webconsole
- system connectivity for check lan interface
Add Resouce virtual ip (manul add virtual host all node)
- create lan
- type nic (global is same 2 node lanX ,if not same must be specify) (critical,enable for resouve)
- create ip (virtual ip)
- type ipm (Bold is must be add)
- link
Add disk resource group
- create diskgroup type:disk group
- create volume type:volume (short name)
- create fs type:mount
For oracle group resource(nic,ip,disk group,volume,mount,listener)
Manual edit /etc/VRTcvs/conf/config/main.cf
- need stop cluster (hastop)
- manual remote copy to another host
install other agent
Import type (no manual add includes type in main.cf)
- click import type on gui manu file
- oracle types .cf

Shutdown/halt cluster
Example oracle resource and halt AIX machine
Use GUI Mode for stop resource/service
1.on Node1 or Node2 run
2. login username : admin
Password : xxxxx
3.right click on oracle service group -> offline -> all system
Use Command line for stop cluster
4.on Node2or Node1 run
#hastop -all
5.on Node1 run
#shutdown -F
6.on Node2 run
#shutdown -F

SAP BASIS Manual Adjust SAP Note in snote for show “Corrections incompletely copied;see change display” Valid release

** Myself
Manual Adjust SAP Note in snote for show “Corrections incompletely copied;see change display” Valid release
Example st13 rsecnote show Security Note 1453541 valid all version (4.6C->ECC6 ) For ECC5,6 OK but 4.6C,4.7 Not OK
Manual apply 4.6C and 4.7
Select object -> RPUDTEM0
Go to line 408
Cut/Delete wrong code
Show “Delta was changed”
Next step for another report

AIX Printer process,test print

** Myselft & Credit Web http://www.unet.univie.ac.at/aix/aixbman/printrgd/toc.htm
Printer process :qdaemon,lpd
Check Printer process: lssrc –s qdaemon,lssrc –s lpd
Print job:
lp –d <qname> <file>
lp –d test /etc/hosts
List job: lpstatus
Create remote priter qname
smit-->print-->add print-->remote-->
   Print server:X.X.X.X -or- hostname
   Name of Queue on remote server (Port from print server) :PR1

Guide to Printers and Printing

Setting ulimit (to unlimited) Unix

** Credit Web SAP&Oracle

/etc/security/limits.conf: (unlimited)
* soft memlock unlimited
* hard memlock unlimited
* hard nofile 65535
* soft nofile 65535

Not PAM For Bourne, Bash, or Korn shell (Example oracle user)
if [ $USER = "oracle" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
ulimit -u 16384 -n 65536

Not PAM For C shell  (Example oracle user)
if ( $USER == "oracle" ) then
limit maxproc 16384
limit descriptors 65536

Redhat LINUX
/etc/security/limits.conf: (unlimited)
* soft nofile 65535
* hard nofile 65535
Not PAM For Bourne, Bash, or Korn shell (Example oracle user)
if [ $USER = "oracle" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
ulimit -u 16384 -n 65536

Not PAM For C shell  (Example oracle user)
if ( $USER == "oracle" ) then
limit maxproc 16384
limit descriptors 65536

Sun Solaris
/etc/security/limits.conf: (unlimited)
* soft nofile 65535
* hard nofile 65535

/etc/security/limits.conf: (unlimited)
* soft nofile 65535
* hard nofile 65535

Not PAM For Bourne, Bash, or Korn shell (Example oracle user)
if [ $USER = "oracle" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
ulimit -u 16384 -n 65536

Not PAM For C shell  (Example oracle user)
if ( $USER == "oracle" ) then
limit maxproc 16384
limit descriptors 65536

/etc/security/limits : (-1 = unlimited) (Example oracle user)
        fsize = 4194302
        core = 2097151
        cpu = -1
        data = 262144
        rss = 65536
        stack = 65536
        nofiles = 2000

        fsize = -1
        data = -1
        stack = -1
        fsize_hard = -1
        nofiles = -1
        nofiles_hard = -1

Unix Determine the System Architecture,RAM,Swap

** Credit Oracle
Determine system architecture
AIX # /usr/bin/getconf HARDWARE_BITMODE
HP-UX # /bin/getconf KERNEL_BITS
Linux (x86 and Itanium) # grep "model name" /proc/cpuinfo
Sun Solaris # /bin/isainfo -kv
For SPARC systems: 64-bit sparcv9 kernel modules
For x86 systems: 32-bit i386 kernel modules

Determine the physical RAM size
AIX # /usr/sbin/lsattr -E -l sys0 -a realmem
HP-UX # grep "Physical:" /var/adm/syslog/syslog.log
Linux # grep MemTotal /proc/meminfo
Sun Solaris # /usr/sbin/prtconf | grep "Memory size"
Determine size of the configured swap space
AIX # /usr/sbin/lsps -a
HP-UX # /usr/sbin/swapinfo -a
Linux # grep SwapTotal /proc/meminfo
Sun Solaris # /usr/sbin/swap -s

AIX Booting from installation cd and restoring a mksysb tape

** Credit Web
1, Place the mksysb into the correct tape drive, and place disk 1 of the
installation cd's into the cdrom drive.
2, [For Old On a classic RS6000] turn the key switch to service.
3, Power on the machine.
4, If the machine sucessfully IPL'd from the installation cd, the first
prompt you will see is :-
******* Please define the System Console. *******
Type a ? and press Enter to use this terminal as the
system console.
5, Type the number requested (?) and press return.
6, Type 1 and press Enter to have English during install.
The next screen you should see is :-
Welcome to Base Operating System
Installation and Maintenance
Type the number of your choice and press Enter. Choice is indicated by >>>.
>>> 1 Start Install Now with Default Settings
2 Change/Show Installation Settings and Install
3 Start Maintenance Mode for System Recovery
>>> Choice [1]:

HP-UX Step to setting up a disk under LVM control and useful command

** Myself
Step to setting up a disk under LVM control
1. build PV
#pvcreate /dev/rdsk/c0t5d0
-B make physical volume bootable
-f force overwrite of file system on disk
2. build VG
#cd /dev
#mkdir vg01
#cd vg01
#mknod group c 64 0x010000
#vgcreate /dev/vg01 /dev/dsk/c0t5d0
-s PE_Size size for PE and therefore LE
-e EXENT_Num maximum number of physical extents per volume
-p DISK_Num maximum number of physical disk per volume group
3. build LV
( ถ้ามีหลาย disk array group (เช่น storage XP หรือ EVA 2 ตัวมองตัวละ 1 array group ต่อ storage ให้ใส่ –D เพื่อ distribute file )
( if multiple disk array group example storage XP and EVA 2 Please be use one array group per storage and option –D for distribute file system)
#lvcreate –L 100 /dev/vg01
-l extents
-L size
-n name(logical volumn)
4. using LV , Create file system
#newfs –F hfs /dev/vg01/rlvol1
#mount –F hfs /dev/vg01/lvol1 /database
#newfs –F vxfs –o largefile /dev/vg01/rlvol1
#mount /dev/vg01/lvol1 /database
Create swap
# lvcreate -L 10240 -n lvswap1 vg00
# /etc/fstab
/dev/vg00/lvswap1 . swap defaults 0 0
#swapon /dev/vg01/lvswap1
(from lvcreate –n swaplv)
Extending a VG
1. #pvcreate /dev/rdsk/c0t3d0
2. #vgextend /dev/vg01 /dev/dsk/c0t3d0
Extending existing LV
#lvextend –L 300 /dev/vg01/lvol1
#lvextend –L 300 /dev/vg01/lvol1 /dev/dsk/c0t13d0
extending LV will not make the space available for file system. You must update the file system.
Extending file system
1. #umount /dev/vg01/lvol1
2. #extendfs –F hfs /dev/vg01/rlvol1
#fsadm –F vxfs –b 300m /mount_point
Reduce LV space
#lvreduce –L 200 /dev/vg01/lvol1

Removing LV

#lvremove /dev/vg01/lvol1
Removing PV from VG
#vgreduce /dev/vg01 /dev/dsk/c0t3d0
(อาจใช้ตอนที่เราcreate vg แล้วใส่ minor number ผิดแล้วต้องการ mknod ใหม่แต่ไม่ต้องทำPV ใหม่)
(Use for create vg with wrong number of minor number then new make new node mknod which not create New PV)
Removing VG
#vgremove /dev/vg01
Backing up VG
#vgcfgbackup –f file /dev/vg01
(command นี้จะเก็บ file ใน file system แต่ไม่เก็บ structure ของ VG
การ backup วิธีนี้จะได้ไฟล์ /etc/lvmconf/vg01.conf มา ถ้ามีการเปลี่ยนแปลง disk ใน VG ก็ต้อง restore configuration ก่อน restore file)
command use for collect file system without VG structure
for this method will backup to /etc/lvmconf/vg01.conf in case change disk in Volume VG need to restore configuration file before restore file system
Recovering VG
Preview & Repair /etc/lvmtab
#vgscan –pv
Repair the failed disk
#vgchange –a y –q y
#lvcreate [–m copies] [-L size in MB] VG
#lvextend [-m copies] LV PV
#lvreduce [-m copies] LV PV
-m = 0, 1, 2, …
0 = ไม่มี Mirror
1 = single mirror
2 = double mirror
#lvsync LV
#vgsync VG
Mirroring boot volumes
1. Create PV with boot area reserved
#pvcreate –B /dev/rdsk/c1t6d0
2. Add the PV to root VG

HP-UX Step to create the VX rootdg(Veritas root disk not hp-uxlvm, Initialize a VX disk, and Create a VX Volume

** Myself
Step to create the VX rootdg, Initialize a VX disk, and Create a VX Volume
1. Start the VX I/O daemon, VX configuration daemon, VX daemon controller
# vxiod set 10
# vxconfigd –k –r reset –m disable
# vxdctl init
2. Check the status of the VX configuration daemon. It should be disables, since there are no VX resources to manage.
# vxdctl mode
3. Create an empty rootdg disk group.
# vxdg list
# vxdg init rootdg
# vxdg list
4. Remove the vg01 volume group
# umount /coredepot
# umount /appdepot
# vi /etc/fstab (remove the /appdepot and /coredepot line)
# lvremove –f /dev/vg01/lvol1
# lvremove –f /dev/vg01/lvol2
# vgremove vg01
# pvremove /dev/rdsk/c0t1d0
5. Configure the spare disk as a VxVM disk
# vxdisk –f init c0t1d0
6. Add the disk to the rootdg disk group
# vxdg –g rootdg adddisk disk1=c0t1d0
7. Now that the rootdg has been defined, the VX configuration daemon can be enabled.
# vxdctl mode
# vxdctl enable
8. create a volume in the rootdg, called test_vol, with a size of 10 MB.
# vxassist –g rootdg make test_vol 10m
9. create a file system on the newly create test_vol.
# newfs –F vxfs /dev/vx/rdsk/rootdg/test_vol
10. Make a mount point directory and mount the file system.
# mkdir /test
# mount /dev/vx/dsk/rootdg/test_vol /test
# bdf
Step to Remove the VX Volume, the VX Disk, and the VX rootdg.
1. Remove the volume from the rootdg disk group.
# umount /test
# vxvol stop test_vol
# vxedit –rf rm test_vol
2. Disable the VX configuration daemon (this must be done so the disk can be removed from the rootdg.)
# vxconfigd –k –r reset –m disable
3. Re-initialize the rootdg so that it doesn’t contain any disks.
# vxdg init rootdg
4. Remove the VX disk from the control of VxVM so it can be used for another purpose.
# vxdisk rm c0t1d0
5. Stop the VX configuration daemon.
# vxdctl stop

HP-UX lssf/lsdev/sysdev kernel driver and major number listing

** Myself

lssf listing device files system (driver and hardware add)

lssf /dev/rdsk/c1t6d0

Diskc3 card instance 1 scsi target 6 scsi lun 0 section 0 at address 52.6.0 /dev/rdks/c1t6d0

lssf /dev/rmt/0mn

tape2 card instance 1 scsi target 0 scsi lun 0 at&t no rewind best density available at address 52.0.0 /dev/rmt0/0mn

lsdev listing all device drivers,static kernel driver and major number


sysdef listing currently running your kernel tunable parameter


SAP BASIS can’t apply snote because object not modify then change to Modifiable component or Namespace

** Myself
If not apply snote because object not modify then change to Modifiable component or Namespace
SE03/SE06 -> Set System Change Option

From N (not modifiable) to X (modifiable)

How To Install/Use HP Tool System Management(SMH) ,ADU,ACU) Software on Linux

** Credit Web
How To Install/Use HP Tool System Management(SMH) ,ADU,ACU) Software on Linux

HP System Management (SMH)
HP Array Diagnostic Utility (ADU)
HP Array Configuration Utility (ACU)
HP Array Configuration Utility CLI

HP System Management is a management software suite that allows you to monitor and manage physical HP servers. This software package is available for RedHat Enterprise Linux 4.
Package : hpsmh-x.x.x-xxx.linux.i386.rpm (32 bit)

1. Download the HP System Management software package for RedHat Enterprise Linux 4. You will find a selection of packages on the Hewlett Packard support home page.
2. Copy the RPM file to your Host.
3. Install the package compat-libstdc++ Host using the following command:
# rpm -ivh install compat-libstdc++-XXX-x.xx-xxx.x.x

4. Install the HP System Management RPM package:
# rpm -ivh yoursoftwarepackage.rpm

5. After installation finishes successfully, you must change your firewall settings to allow communication through the ports that System Management uses, as follows:
a. Edit the firewall file:
# vi /etc/sysconfig/iptables

b. Locate the following line:
-A RH-Firewall-1-INPUT -j REJECT --reject-with icmp-host-prohibited
c. Insert the following line above the line you just located:
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 2381 -j ACCEPT
d. Save and close the file

SAP BASIS Step for Manual Apply Note (Can’t use snote) and Register object sscr

Sap (example) Note 1123815

Se38 -> Edit object put program “INCL_GET_CALC_TYPE”
Go to http://service.sap.com/sscr

->Register object
Put Program,type,object name

SAP BASIS Client copy with paralell processing

** Myself
Edit -->expert setting

Go to--> parallel processing (Example 4)

Oracle Database Query Row Chaining and Migration for Reorganize for Auxiliary Storage Quality

** Myself
Auxiliary Storage Quality Information
1.The following table shows the top tables (max. 40) that have an average record length of less than 4000 bytes, more than 100 chained rows in total, and a number of chained rows that is over 5% of the total number of rows in the table (based on the available CBO statistics).
Owner Table Name Rows Average Row Length Chain Count Chained % Last Anaylsis Date PCTFREE PCTUSED
SAPBWP DYNPSOURCE 38,295 3,360 33,204 87 14-May-08 10
SAPCRP DYNPSOURCE 44,564 3,026 35,326 79 21-Nov-09 10
SAPCRP REPOLOAD 117,761 2,818 79,333 67 15-Oct-08 10
SAPCRP TMSBUFTXT 1,580 72 826 52 22-Oct-08 10
SAPBWP TMSBUFTXT 4,130 71 2,150 52 1-Oct-08 10
SAPBWP DYNPLOAD 14,926 1,479 6,115 41 31-Oct-07 10
SAPBWP REPOLOAD 111,987 1,785 42,412 38 15-Oct-08 10
SAPCRP DYNPLOAD 19,284 1,353 6,907 36 15-Oct-08 10
SAPBWP D345T 1,252 6,149 356 28 15-Oct-08 10
SAPCRP D345T 1,518 5,882 371 24 15-Oct-08 10
SAPCRP ZDP_SALESGRAPH 551 63 106 19 17-Oct-07 10
SAPBWP /OSP/T_RAUI_TPBT 48 197 6 13 24-Oct-07 10
SAPBWP T002X 560 32 67 12 24-Oct-07 10
SAPBWP T002TX 1,120 30 130 12 24-Oct-07 10
SAPCRP T002TX 1,680 29 188 11 21-Jun-06 10
SAPBWP /BI0/TPROD_HIER 291,554 41 30,444 10 8-Jan-10 10
SAPCRP TBTCO 40,510 295 1,285 3 27-Sep-06 10
SAPBWP /BIC/DZC_OPP5 154,378 51 3,752 2 10-Apr-09 0
SAPCRP DYNPTXTLD 593 384 10 2 22-Oct-08 10
SAPBWP SWDSPROPTS 293 272 3 1 24-Oct-07 10
SAPBWP SPROXLPT 102 274 1 1 24-Oct-07 10
SAPBWP MEMGMT_PARA_TEXT 3,800 142 29 1 24-Oct-07 10
SAPCRP SMODBLTXT 4,270,283 458 30,469 1 12-Jun-09 10
SAPBWP TBTCO 54,051 299 333 1 24-Oct-07 10
SAPCRP SOES 317,730 167 1,791 1 17-Dec-08 10
SAPCRP /SSF/PTAB 12,869 731 54 0 27-Mar-09 10
SAPBWP /SSF/PTAB 12,067 632 48 0 27-Mar-09 10
SAPBWP /BIC/DZC_OPP4 847,272 72 3,295 0 26-Dec-09 0
SAPBWP SOES 3,658 166 12 0 13-Nov-09 10
SAPBWP /BIC/TZ_BWPROD 2,250,224 58 6,682 0 13-Aug-08 10
SAPBWP D346T 589 1,035 1 0 15-Oct-08 10
SAPBWP /BIC/AZO_OPPPR00 35,643 54 35 0 30-Oct-09 0
SAPBWP SDBAD 1,046 90 1 0 19-Nov-08 10
SAPCRP SMOMAKT 556,141 185 455 0 26-Dec-07 10
SAPCRP USR12 9,029 128 7 0 27-Mar-09 10
SAPCRP SDBAD 67,774 148 36 0 22-Jan-10 10
SAPECPDB KMC_DBRM_CONTENT 5,481 638 2 0 29-Aug-09 10
SAPBWP /BIC/TZ_BPMAIN 299,586 121 109 0 11-Sep-09 10
SAPCRP ADRC 282,402 363 89 0 31-Jul-09 10
SAPCRP SMODBLBIN 7,769 139 2 0 27-Feb-08 10
SAPCRP SMOAUSPH 139,127 89 33 0 24-Jan-10 10
SAPCRP SMOCATGT 120,987 141 28 0 27-Sep-06 10
SAPBWP /BIC/TZ_SUBD 20,483 147 4 0 2-Oct-09 10
SAPCRP ADRP 226,725 219 25 0 15-Jan-10 10
SAPBWP RSMONICDP 792,212 92 71 0 17-Oct-09 10
SAPCRP SMOMVKE 265,200 273 14 0 16-Jan-08 10
SAPCRP CDBD_ADDREXT 293,714 150 12 0 31-Jul-09 1

Action: Reorganization
Heavy chaining is performance-relevant and requires more disk space. The bigger the table, the more important it is to carry out reorganization. Reorganization is most effective if the average row length is small (compared to a block size of 8 KB).

Query Script
set pages 9999;
set linesize 200;
column c1 heading "Owner" format a9;
column c2 heading "Table" format a20;
column c3 heading "Rows" format 999,999,999;
column c4 heading "Average Row Length" format 99,999;
column c5 heading "Chain Count" format 999,999,999;
column c6 heading "Chained %" format 99;
column c7 heading "Last anaylisis Date" format a20;
column c8 heading "PCTFREE" format 99;
column c9 heading "PCTUSED" format 99;
set heading off;
select 'Tables with migrated/chained rows and no RAW columns.' from dual;
set heading on;
owner c1, table_name c2, num_rows c3, avg_row_len c4, chain_cnt c5, chain_cnt/num_rows*100 c6,
last_analyzed c7,pct_free c8, pct_used c9
from dba_tables where owner not in ('SYS','SYSTEM')
and table_name not in (select table_name from dba_tab_columns where data_type in ('RAW','LONG RAW') )
and chain_cnt > 0
order by c6 desc;

Oracle Database Upgrade and recompiled object command

** Myself
## Upgrade and recompiled object
sqlplus "/as sysdba"
startup upgrade;
spool uppatch.log
shutdown immediate;
spool off

##The database will now be started in STARTUP UPGRADE mode. This will disable
system triggers and replication dependency tracking, and will suppress unwanted
error messages such as ORA-904: table or view does not exist and ORA-01092: ORACLE instance terminated. Disconnection forced. This
will make it easier to screen the spool file for errors during the upgrade.

Oralce DB Restoration command

** Myself

Noarchive log mode

Recovery with
Current Control Files

Complete Recovery
(applied online redo)
   (online redo logs available)

Sql> shutdown abort
n  All datafiles
n  Controlfiles
n  Redolog files
n  Password files and Parameter files
Sql> startup

Recovery with
Backup control Files

Complete Recovery
(applied online redo)
   (online redo logs available)

Incomplete Recovery
(applied online redo)
   (online redo logs available
    or NOT available)

#Can’t used Backup control files but use to generate new control files
Sql> shutdown immediate
n  All datafiles
n  Old Controlfiles
n  Redolog files (for Noresetlog)
n  Password files and Parameter files

Sql> startup mount
Sql> database backup controlfile to trace;
Sql> shutdown
Sql> @<admin>/udumn/<*.trl>
Sql> alter database open [resetlogs]

Recovery with
New control Files

Complete Recovery
(applied online redo)
   (online redo logs available)

Incomplete Recovery
(applied online redo)
   (online redo logs available
    or NOT available)

Sql> shutdown immediate
n  All datafiles
n  Old Controlfiles
n  Redolog files (for Noresetlog)
n  Password files and Parameter files

Sql> startup mount
Sql> database backup controlfile to trace;
Sql> shutdown
Sql> @<admin>/udumn/<*.trl>
Sql> alter database open [resetlogs]