Power by < Khronos consulting co., ltd. > |
Oracle Example Export ddl for table/index
Export ddl for table [USR02]
set feedback off heading off pages 0 lines 3000 long
400000
# dbms_metadata.get_ddl = 'table','table name','schema'
# 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)
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 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'
## 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
Oracle DataGuard Administration on Solaris Simulators
** Credit Vladimir Grigorian (http://vgrigorian.com)
- Oracle10g on Solaris - DataGuard Switchover
- DataGuard Troubleshooting
- Oracle10g on Solaris - DataGuard Switchover
- DataGuard Troubleshooting
DataGuard Configuration on RedHat Simulators
** Credit Vladimir Grigorian (http://vgrigorian.com)
- DataGuard Configuration
- DataGuard Troubleshooting
- DataGuard Configuration
- DataGuard Troubleshooting
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
#!/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: "
#====================================================================
#
# 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
āļāļ§āļĢāļāļģāļāļēāļĢ 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 āļี่āļĄีāļāļ§āļēāļĄāđāļี่āļĒāļ§āļ้āļāļāļัāļ
āļāļ§āļĢ Copy Install software āļāļēāļ shared drive āļĄāļēāđāļ§้āļี่āđāļāļĢื่āļāļ āļัāļ§āđāļāļāļ่āļāļ Install
1.āđāļŦ้āđāļ้āļēāđāļāļĒัāļ Folder
NW_7.0_Presentation\PRES1\GUI\WINDOWS\WIN32
2. āđāļĨืāļāļ SetupAll
āļāļ°āļāļĢāļēāļāļāļั้āļāļāļāļāļ่āļāđāļāļัāļāļี้
āļāļ Next
āļāļēāļāļั้āļāļāļ°āļāļĢāļēāļāļāļั้āļāļāļāļāļ่āļāđāļāļัāļāļี้
āļั้āļāļāļāļāļāļēāļĢāļิāļāļั้āļ 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
āļāļēāļāļั้āļāļāļģāļāļēāļĢāļิāļāļั้āļ SAPGUI1.āđāļŦ้āđāļ้āļēāđāļāļĒัāļ Folder
NW_7.0_Presentation\PRES1\GUI\WINDOWS\WIN32
2. āđāļĨืāļāļ SetupAll
āļāļ°āļāļĢāļēāļāļāļั้āļāļāļāļāļ่āļāđāļāļัāļāļี้
āļāļ 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
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
** Credit Vladimir Grigorian (http://vgrigorian.com)
10g RAC Administration Simulators
- Basic RAC Administration
- RAC Backup in Grid Control
- RAC TAF and Load Balancing
- Basic RAC Performance Tuning
10g RAC Administration Simulators
- Basic RAC Administration
- RAC Backup in Grid Control
- RAC TAF and Load Balancing
- Basic RAC Performance Tuning
Fix SAPGUI problem thai font ่ ้ āļģ ี ๋ ์ ๋ ๊ for Window Vista/7 [Thai]
่ ้ āļģ ี ๋ ์ ๋ ๊
āđāļ้āļัāļāļŦāļēāļāļēāļĢāļāļāđāļāļĒāļŠāļĢāļ° āļĢāļ§āļĄāļึāļāļāļģāđāļŦāļ่āļāļāļāļ 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)
Oracle 10g RAC Installation Simulators
** Credit Vladimir Grigorian (http://vgrigorian.com)
- Installing 10g OCFS
- Installing 10g CRS
- Installing Oracle 10g RAC
- Creating 10g RAC Database
- Installing 10g OCFS
- Installing 10g CRS
- Installing Oracle 10g RAC
- Creating 10g RAC Database
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
#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
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)
# 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
JCE IBM Product | JCE SUN Product |
File name: unrestricted.zip | File name: jce_policy-<version>.zip
jce_policy-1_4_2.zip |
· 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 |
# 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
2) or flush db buffer cache and run dbv again
alter system flush buffer_cache
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
Visual Admin Tool
NetWeaver Administrator (NWA)
Java with Telnet.
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>
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>
Subscribe to:
Posts (Atom)
Loading