Oracle Screenshot Install oracle11g on SAP Linux [Oracle part]

**Myself


/oracle/stage/112_64/database/SAP/RUNINSTALLER
clip_image004
Yes
clip_image006
clip_image008
clip_image010
clip_image012
 
Note 7400897 SAP license scope
clip_image014

Oracle Example Export ddl for table/index


 ** Myself
 

Export ddl for table [USR02]
set feedback off heading off pages 0 lines 3000 long 400000
# dbms_metadata.get_ddl = 'table','table name','schema'
select dbms_metadata.get_ddl('TABLE','USR02','SAPSR3') from dual;


Query index of table [USR02]
SQL>
 select INDEX_NAME from dba_indexes
 where
 TABLE_OWNER='SAPSR3'
  and TABLE_NAME='USR02' ;

INDEX_NAME
------------------------------
USR02~0
USR02~001
USR02~002


Export ddl for index   USR02~0/ USR02~001/ USR02~002
set feedback off heading off pages 0 lines 3000 long 400000
# dbms_metadata.get_ddl = 'index','index name','schema'
select dbms_metadata.get_ddl('INDEX','USR02~0','SAPSR3') from dual;
select dbms_metadata.get_ddl('INDEX','USR02~001','SAPSR3') from dual;
select dbms_metadata.get_ddl('INDEX','USR02~002','SAPSR3') from dual;

SAP Error R3load Phase from Installation New or Export/Import Heterogeneous System copy (Not Recommend may be duplicate/lost some data)

** Myself
Message
(TSK) ERROR: TSK.bck  file already seems to exist       a previous run may not have been finished cleanly file .TSK possibly corrupted job finished with  error(s)
Example
File name = SAPAPPL2_1.TSK.bck and SAPAPPL2_1.TSK

Solve
Run R3load for merge file then rerun sapinst or R3setup
Logon <sidadm>
 ->go to install/export/import directory from sapinst or R3setup
->run  R3load  to merge TSK and TSK.bck file

# Case Export heterogeneous with command file
R3load -merge_bck -e SAPAPPL2_1.cmd

# Case Import heterogeneous with command file

SAP Enhancement exit smod/cmod Logon Page

** Myself
Tcode CMOD
-> zlogon ->create
clip_image002
clip_image004
Save->back
clip_image006
-> change
clip_image008
-> components
-> Enhancement: SUSR0001

How to check SAP Standard SAP*, DDIC, SAPCPIC and EARLYWATCH user use default password or not

** Myself





SE38
-> RSUSR003

















-> uncheck “Display Profile Parameters”










-> execute

SAP Transport Request "Running" status "Hang" "Stuck"


** Myself

1)Delete this request from STMS.
STMS->
 import overview->
  select system(DEV,QAS,PRD) ->
   import monitor -> 
     select running -> delete entry

2)Check /usr/sap/trans/tmp  and find XX.LOC (Transport Lock file)
in /usr/sap/trans/tmp rename XX.LOC to XX.LOC.old 


3)Check tables TMSTLOCKR and TMSTLOCKP in SE16.
Delete record if not 0

MS SQL server Restore multiple device files

** Myself
## Query Tools
## Restore to QAS database  multiple file of B1.bak,B2,bak,B3.bak,B4.bak


RESTORE DATABASE QAS
FROM
DISK='F:\Backup\B1\B1.bak',
DISK='F:\Backup\B2\B2.bak',
DISK='F:\Backup\B3\B3.bak',
DISK='F:\Backup\B4\B4.bak'
WITH
MOVE 'PRDDATA1' TO 'E:\SAPDATA\QASDATA\QASDATA1.mdf',
MOVE 'PRDDATA2' TO 'E:\SAPDATA\QASDATA\QASDATA2.ndf',
MOVE 'PRDDATA3' TO 'G:\SAPDATA\QASDATA\QASDATA3.ndf',
MOVE 'PRDLOG1' TO 'G:\SAPDATA\QASDATA\QASLOG1.ldf'

MS SQL server Backup multiple device files


** Myself

Pros
-          Backup fasters
-          Each files small and can be separate drive letter (average db size to multiple file size)

Cons
-          Restore slow than single

Add Drive B1,B2,B3,and B4 to D:E:F:








Select & Add Drive B1,B2,B3,and B4 to Backup master DB



How To Flush DNS Cache (NAME SERVICE) Windows/UNIX


** Myself 

Windows
Start->run->cmd->
ipconfig /flushdns


UNIX
service nscd restart
-- or --
sudo /etc/init.d/nscd restart


Shell Script Example Oracle Export dumpfile(exp or expdp)

**Myself
 
#!/usr/bin/sh
#########   ENV ##############
backup_dir=/backup/expdump  #Dumpfile directory
blog=/backup/expdump/backup_expdump.log
orasid[0]=orcl1    #oracle sid1
orasid[1]=orcl2    #oracle sid2
orasid[2]=orcl3    #oracle sid3
orauser[0]=oraorcl1
orauser[1]=oraorcl2
orauser[2]=oraorcl1
orahome[0]=/app/oracle/orcl1/10g
orahome[1]=/app/oracle/orcl2/10g
orahome[2]=/app/oracle/orcl3/10g
############### Main ##################
export i=0
while (( i < ${#orasid[*]} ))
do
    su - ${orauser[${i}]}  << BOF >> ${blog}
        export ORACLE_SID=${orasid[${i}]}
        echo ${orasid[${i}]} >> ${blog}
        ${orahome[${i}]}/bin/exp system/system file='${backup_dir}/${orasid[${i}]}.dmp' full=y
    BOF
(( i = i + 1 ))
done

Shell Script Menu for Start up/Shutdown SAP with Oracle and other process (saposcol,sapstartsrv,hostctl for NW7.1)

** Myself
#====================================================================
#
# MAIN PROGRAM: Operator Menu
#
# PURPOSE:  Checks for system instances and
#           startup/shutdown system instances
#
#====================================================================
#====================================================================
# Environment
#====================================================================
#
#
#
# oracle user  ,Please change
orasid=dev
# sap user ,Please change
sapsid=dev
# SAP StartSRV MC Console Instant Name ,Please change ,for more instant add array
SAPINST[0]=DVEBMGS02
SAPINST[1]=ASCS00
SAPINST[2]=SCS01
#
#====================================================================
#====================================================================
# Main
#====================================================================
operation_menu=0
while [[ ! "x${operation_menu}x" = "x99x" ]] ; do
clear
echo "========================================"
echo "|--- Operation Menu (`hostname`) "
echo "========================================"
echo "(1) Start SAP"
echo "(2) Shutdown SAP"
echo "(99) Exit"
echo "Please select a number from the Operation Menu: "
read operation_menu
case ${operation_menu} in
        1)
                su - ora${orasid} -c "lsnrctl start"
                su - ${sapsid}adm -c "startsap"
                echo "SAP Startup"
                echo "Please key to Main Menu: "

SAP BASIS Install SAP Gui 7.20 with Patches [Thai] (Update)

** Myself
āļ‚ั้āļ™āļ•āļ­āļ™āļāļēāļĢāļ•ิāļ”āļ•ั้āļ‡ SAPGUI

Part I

Pre installation step SAPGUI

1) āļ–้āļēāļĄี SAPGui Version āđ€āļ่āļē
āļ„āļ§āļĢāļ—āļģāļāļēāļĢ uninstall SAPGUI āļ่āļ­āļ™āļ›้āļ­āļ‡āļัāļ™error āļ—ี่āļˆāļ°āđ€āļิāļ”āļ‚ึ้āļ™āļĢāļ°āļŦāļ§่āļēāļ‡ install āđ‚āļ”āļĒāļ•้āļ­āļ‡āļ›ิāļ” SAP Logon
āļ–้āļēāđ„āļĄ่ uninstall āļˆāļ°āļ—āļģāđƒāļŦ้ āđ€āļิāļ” error āļ•่āļēāļ‡āđ†āļˆāļēāļāļāļēāļĢ load library dll āđ„āļĄ่āļ‚ึ้āļ™āđ€āļŠ่āļ™ sapfewut.dll
“The procedure entry point sap load library could not be locate in the dynamic link library”

2) āļŠāļģāļŦāļĢัāļšāđ€āļ„āļĢื่āļ­āļ‡āļ—ี่āļĒัāļ‡āđ„āļĄ่āđ€āļ„āļĒ Install SAPGui āļĄāļēāļ่āļ­āļ™
āļ่āļ­āļ™ install SAPGUI āļ„āļ§āļĢāļĄีāļāļēāļĢ reboot machine āļ่āļ­āļ™āđ€āļžื่āļ­āļ›้āļ­āļ‡āļัāļ™error āļ—ี่āļˆāļ°āđ€āļิāļ”āļ‚ึ้āļ™āļĢāļ°āļŦāļ§่āļēāļ‡ install āđ‚āļ”āļĒāļ•้āļ­āļ‡āļ›ิāļ” SAP Logon
āļŦāļĢืāļ­āļ—āļģāļāļēāļĢāļ›ิāļ” MS office āļāļĢāļ“ีāđ€āļĨืāļ­āļ āļšāļēāļ‡ component āļ‚āļ­āļ‡SAPGui āļ—ี่āļĄีāļ„āļ§āļēāļĄāđ€āļี่āļĒāļ§āļ‚้āļ­āļ‡āļัāļ™

3) āļŠāļģāļŦāļĢัāļšāđ€āļ„āļĢื่āļ­āļ‡āļ—ี่ Install software āļˆāļēāļ shared drive āļ­āļēāļˆāļĄีāļ›ัāļāļŦāļēāđƒāļ™āļāļēāļĢ Install SAPGui āđ€āļžāļĢāļēāļ°Load library āļĄāļēāđ„āļ”้āđ„āļĄ่āļ„āļĢāļš
āļ„āļ§āļĢ Copy Install software āļˆāļēāļ shared drive āļĄāļēāđ„āļ§้āļ—ี่āđ€āļ„āļĢื่āļ­āļ‡ āļ•ัāļ§āđ€āļ­āļ‡āļ่āļ­āļ™ Install

Part II

Install Step SAPGUI

āļˆāļēāļāļ™ั้āļ™āļ—āļģāļāļēāļĢāļ•ิāļ”āļ•ั้āļ‡ SAPGUI
1.āđƒāļŦ้āđ€āļ‚้āļēāđ„āļ›āļĒัāļ‡ Folder
NW_7.0_Presentation\PRES1\GUI\WINDOWS\WIN32
2. āđ€āļĨืāļ­āļ SetupAll
clip_image002
āļˆāļ°āļ›āļĢāļēāļāļŽāļ‚ั้āļ™āļ•āļ­āļ™āļ•่āļ­āđ„āļ›āļ”ัāļ‡āļ™ี้
clip_image004
āļāļ” Next
āļˆāļēāļāļ™ั้āļ™āļˆāļ°āļ›āļĢāļēāļāļŽāļ‚ั้āļ™āļ•āļ­āļ™āļ•่āļ­āđ„āļ›āļ”ัāļ‡āļ™ี้

SAPGui and SAPLPD Problem Thai Font solve by Substitution/Replace for Window Vista/7 [Thai]

** Myself
For SAPGUI solve by replace font Window XP for Display
For SAPLPD solve by replace font Window XP and Substitution for printing

Font Substitution
Result
Sub cordiaUPC  font win7                            
OK.


Sub cordiaUPC  font winXP  
# Copy XP font replace win7 C:\windows\fonts 
OK.

Sub cordiaNew  font win7                          
no OK. Can’t translate āļ­่āļēāļ™āđ„āļĄ่āļ­āļ­āļ

Sub cordiaNew  font winXP
# Copy XP font replace win7 C:\windows\fonts                        
no OK. Can’t translate āļ­่āļēāļ™āđ„āļĄ่āļ­āļ­āļ

Sub angsanaUPC font win7                         
no OK. āļŠāļĢāļ°āļĨāļ­āļĒ

Sub angsanaUPC font winXP
# Copy XP font replace win7 C:\windows\fonts                      
OK.

Add /eH (control unicode to thsapwin) & sub angsanaUPC font win7
no OK. āļŠāļĢāļ°āļĨāļ­āļĒ
Add /eH (control unicode to thsapwin) & sub angsanaUPC font winXP

# Copy XP font replace win7 C:\windows\fonts 
OK.

No Sub courierNew font win7                  
no OK. Can’t translate āļ­่āļēāļ™āđ„āļĄ่āļ­āļ­āļ


Oracle 10g RAC Administration Simulators

Fix SAPGUI problem thai font ่ ้ āļģ ี ๋ ์ ๋ ๊ for Window Vista/7 [Thai]

** Myself
่ ้ āļģ ี ๋ ์ ๋ ๊
āđāļ้āļ›ัāļāļŦāļēāļāļēāļĢāļŠāļ”āđ€āļŠāļĒāļŠāļĢāļ° āļĢāļ§āļĄāļ–ึāļ‡āļ•āļģāđāļŦāļ™่āļ‡āļ‚āļ­āļ‡ space āļŦāļĢืāļ­ āļŠāļĢāļ°āļĨāļ­āļĒ āđ€āļŠ่āļ™ āļ—ี่āļ–ูāļ āļŠีāļ™้āļģ  āļ—ี่āļœิāļ” āļŠ ี āļ™้ āļģ

Sol1
Copy font from Window XP Replace Vista/7 to C:\Windows\Fonts
AngsanaUPC,Angsana New,Cordia New,CordiaUPC,Courier New,Courier Regular  [Regular/Bold/Italic]


Sol2
 Install New SAPGUI 720 with newer patch (after patch 8 up to 1X)

Shell Script Mass Change filename (Rename pattern file)

** Myself

#Create 10,000 file from CCC00001.JPG to CCC10000.JPG
#file name=CCC00001.JPG ,CCC00002.JPG .... 
mkdir -p /tmp/test
for i in {1..10000}
do
 touch /tmp/test/CCC`printf "%05d" $i`.JPG
done


#Rename 10,000 file from CCC00001.JPG to A00001.JPG
#Result file name=A00001.JPG ,A00002.JPG .... 

for T in *.JPG
do
U=$(printf $T | sed -e "s/CCC/A/g")
[[ $T != $U ]] && mv $T $U
done

Install Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Files (SAP include)

** Myself
 
JCE IBM Product JCE SUN Product
File name: unrestricted.zip File name: jce_policy-<version>.zip
jce_policy-1_4_2.zip
Content of file
· README.txt
· COPYRIGHT.html Copyright information [No file for IBM product]
· local_policy.jar Unlimited strength local policy file
· US_export_policy.jar Unlimited strength US export policy file
 
1) Download from SUN(ORACLE) or IBM product
     unrestricted.zip or jce_policy-<version>.zip
2) Extract/Install to JRE path (check java home path)
Window Unix
<java-home>\lib\security <java home>/lib/security
D:\j2sdk1.6\jre\lib\security /usr/java/jre/lib/security # SUN Solaris
/opt/java1.4/jre/lib/security # HP-UX
/usr/lib64/jvm/java-1_4_2-ibm-1.4.2_sr10/jre/lib/security # Linux64 bit
# For SAP ,SSL protocol, will be extract during installation phase
# Example SAP unix JAVA_HOME=/opt/java1.4
# JCE install at /opt/java1.4/jre/lib/security

Oracle Clear data block (logical) corrupt from dbverify

** Myself

dbverify report  (dbv) detect corrupt blocks but no physical corrupt.
for 10g

Verify after dbv
check  v$database_block_corruption or v$backup_corruption (from rman verfity)
run {
allocate channel c1 type disk;
allocate channel c2 type disk;
backup check logical validate database;
release channel c1;
release channel c2;
}



Fix
1) run analyze object  for check  integrity and run dbv again
analyze <xxx> validate structure [ONLINE]
2) or flush db buffer cache and run dbv again
   alter system flush buffer_cache

SAP Launch Java Tools

** Myself

Config Tool

Windows launch tool Unix [by Gui] launch tool
logon <sid>adm
<Drive>:\sap\<SID>\<central instance>\j2ee\admin\go.bat /sap/<SID>/<central instance>/j2ee/admin/go

Visual Admin Tool
Windows launch tool Unix [by Gui] launch tool
logon <sid>adm
<Drive>:\sap\<SID>\<central instance>\j2ee\configtool\configtool.bat /sap/<SID>/<central instance>/j2ee/configtool/configtool
Entry for connection
#SAP instance number 2 digit=$$
Entry for connection
#SAP instance number 2 digit=$$
    Direct Connection to Dispatcher Node
    User Name: j2ee_admin
    Host: localhost
    Port:  5SS04
Direct Connection to Dispatcher Node
User Name: j2ee_admin
Host: localhost
Port: 5SS04

NetWeaver Administrator (NWA)
Browser launch tool
#SAP instance number 2 digit=$$
http://<hostname>.<suffix>:5$$00/nwa
# for Dual stack refer j2ee_admin on client001 # for Jav stack refer Administrator
logon j2ee_admin logon administrator

Java with Telnet.
Windows launch tool
#SAP instance number 2 digit=$$
Unix [by Textmode] launch tool

#SAP instance number 2 digit=$$
start->run->cmd logon <sid>adm
telnet localhost 5SS08 telnet localhost 5SS08

How to start one node Veritas cluster(VCS) other nodes failed

** Myself
Case start only one Node  (because all Heartbeat other nodes lost connection or totally other nodes failed)
# Start Group Membership and Atomic Broadcast
gabconfig -cx
# Start cluster
hastart -onenode
# Option Start resource by command
hagrp –online  <resource_name>  -sys <server_Node_name>
Loading