2012年4月20日星期五
2012年4月14日星期六
How to add logical volume and filesystem by command
For Logical Volume :
Example :
Logical Volume Name : lv06
Filesystem Type : jfs2
Volume Group Name : rootvg
Logical Partition : 508
Physical Volume Name : hdisk3
Command : mklv -y'lv06' -t'jfs2' rootvg 508 hdisk3
For Filesystem :
Example :
Mount point : /share
Block Size : 4096
crfs -v jfs2 -d'lv06' -m'/share' -A''`locale yesstr | awk -F: '{print $1}'`'' -p'rw' -a agblksize='4096
How to Extend file system size
chfs -a size='138412032' /share
How to handle "Fork too many process"
For example,
The maximum process is now 500 and you need set it to 1000
1. lsattr -El sys0 |grep max results shows that maximum process allowed is 500.
2. ulimit shows unlimited.
3. The /etc/security/limits shows unlimited.
chdev -l sys0 -a maxuproc='1000'
Please take care that this change is re boot required.
Please also consider the following factor
No. of Concurrent Users x @1 job
System Demons ~15+ jobs
No. of integration productions x @10+ jobs
How to monitor the I/O of a specified application
I had found the following explanation from internet :
Quote :
To monitor the I/O activity for logical and physical volumes only, while controlling the monitored intervals using the trcon and trcoff commands, enter:
filemon -d -o fmon.out -O pv,lv
The filemon command automatically starts the system trace and puts itself in the background. After this command, you can enter the unmonitored application programs and system commands to be run at this time, then enter:
trcon
After this command, you can enter the monitored application programs and system commands to be run at this time, then enter:
trcoff
After this command, you can enter the unmonitored application programs and system commands to be run at this time, then enter:
trcon
After this command, you can enter the monitored application programs and system commands to be run at this time, then enter:
trcstop
In this example, the -O flag is used to restrict monitoring to logical and physical volumes only. Only those trace events that are relevant to logical and physical volumes are enabled. Also, as a result of using the -d flag, monitoring is initially deferred until the trcon command is issued. System tracing can be intermittently disabled and reenabled using the trcoff and trcon commands, so that only specific intervals are monitored.
Example :
/usr/bin/filemon -o $LOG -O lf,lv,pv
sleep 10
trcstop
2012年4月13日星期五
期望的落差...
你有沒有發現有時你真的會對一個人好失望,因為那個人總是不能達到你的期望.
你越是對他/她有期望,你就越失望.....
但請你先想一想,你為什麼會對他/她有期望,你想他/她變得更好,變得更像你心目中的那個他/她嗎?
但他/她也是這樣想嗎?
請你先問一問自己吧!
愛並不是要對方能做到什麼你才愛他/她,而是他/她不做什麼你也愛才算是愛.
如果你必須要有期望,請你先對自己有期望吧!我相信這樣你一定會過得比現在快樂!
快試試吧!
你越是對他/她有期望,你就越失望.....
但請你先想一想,你為什麼會對他/她有期望,你想他/她變得更好,變得更像你心目中的那個他/她嗎?
但他/她也是這樣想嗎?
請你先問一問自己吧!
愛並不是要對方能做到什麼你才愛他/她,而是他/她不做什麼你也愛才算是愛.
如果你必須要有期望,請你先對自己有期望吧!我相信這樣你一定會過得比現在快樂!
快試試吧!
2012年4月12日星期四
情緒問題
我相信大家都會有個情緒問題,但是大家會如何去處理呢?
1. 收收埋埋
2. 先收埋,到了忍冇可忍才爆發
3. 立即爆發
我想大部份人都可能會選擇"2",包括我自己....
但原來這是不正確的,因為收埋得太久,到爆發的一刻可能已經不可收拾.
因此有問題時應該立即說出來,不是要你爆出來,而是要慢慢地將"它"表達出來,不要等到無法挽救才說出來
向他/她表達你的不滿吧,讓他/她聆聽,讓他/她了解你的痛苦,這樣對大家都好!
1. 收收埋埋
2. 先收埋,到了忍冇可忍才爆發
3. 立即爆發
我想大部份人都可能會選擇"2",包括我自己....
但原來這是不正確的,因為收埋得太久,到爆發的一刻可能已經不可收拾.
因此有問題時應該立即說出來,不是要你爆出來,而是要慢慢地將"它"表達出來,不要等到無法挽救才說出來
向他/她表達你的不滿吧,讓他/她聆聽,讓他/她了解你的痛苦,這樣對大家都好!
Database Hang and Recover Procedure
In our example, we assume the database is hanging for unknown reason.
1. Try to identify process ID the top loading process
2. Try to check the oracle user session detail by using the above process ID
3. If there is no particular high load process or we cannot connect to oracle database to check user session detail (i.e. connect via sqlplus but seem hang). We assume the database is hang.
4. Dump System Statistics
e.g. export ORACLE_SID=DB_SID
sqlplus -prelim / as sysdba
oradebug setmypid
oradebug unlimit
oradebug dump systemstate 10
-> wait 90 seconds (i.e. This is not a command)
oradebug dump systemstate 10
-> wait 90 seconds (i.e. This is not a command)
oradebug dump systemstate 10
exit
5. Perform Hang Analysis
e.g. export ORACLE_SID=DB_SID
sqlplus -prelim / as sysdba
oradebug setmypid
oradebug unlimit
oradebug hanganalyze 3
-> wait 90 seconds (i.e. This is not a command)
oradebug hanganalyze 3
exit
6. Create SR in oracle and update the trace files generated in Step 5 and Step 6 to Oracle SR
7. Shutdown Database abnormally by killing the Oracle SMON process and all related process will be killed
8. Check all process related to target instance still existed. If they are still existed, please kill them manually.
9. Start oracle instance in restricted mode
e.g. export ORACLE_SID=DB_SID
sqlplus / nolog
connect / as sysdba
startup restrict
10. If the database startup normally, please shutdown it to make sure database can be shutdown normally.
11. Start oracle instance in restricted mode and check the date integrity first.
12. If everything ok, please disable restricted mode and notify user that the system is back to normal
Clone Configuration Procedure After Copy to Target Server
1. Create User in target server
e.g. appldev,oradev,oracle(for discover)
2. Copy the following files to target user
/home/oraprd/scripts/prod/startdb.sh
/home/oraprd/scripts/prod/stopdb.sh
/home/oraprd/.profile
/home/oraprd/set_perl.env
/home/applprd/scripts/prod/change_password.sh
/home/applprd/scripts/prod/concurrent_ctl.sh
/home/applprd/scripts/prod/startappl.sh
/home/applprd/scripts/prod/stopappl.sh
/home/applprd/.profile
/home/applprd/set_perl.env
e.g. rcp -r -p /home/oraprd/scripts/prod/startdb.sh [TARGET_SERVER]:/home/oradev/scripts/prod/.
Remarks :
if we copy from production, please remember to remove all production password.
3. Change mount point
e.g. if you copy the source from production to development, you may need to change from
ebsprd to ebsdev
4. Change Folder permission
e.g. chown -R oradev:dba /oracle/ebsdev
chown -R appldev:dba /app/ebsdev
chown -R oradev:dba /ebsdevdata
chown -R oradev:dba /home/oradev
chown -R appldev:dba /home/appldev
chmod o-rx /oracle/ebsdev
chmod o-rx /app/ebsdev
chmod o-rx /ebsdevdata
chmod o-rx /home/oradev
chmod o-rx /home/appldev
chmod o-rx /home/oradev/.profile
chmod o-rx /home/oradev/set_perl.env
chmod o-rx /home/appldev/.profile
chmod o-rx /home/appldev/set_perl.env
5. Clone DB Tier
Copy DB environment setting to target host :
e.g. rcp /oracle/ebsdev/product/10.2.0/ebsprd_source_db_server.env target_hostname:/oracle/ebsdev/product/10.2.0/ebsdev_target_hostname.env
Modify ERP environment setting(both .profile and ebsdev_target_hostname.env) :
Source SID to Target SID -> ebsprd to ebsdev
Source Host to Target Host -> source_db_server to target_hostname
Remarks :
If you have not copy the .profile from source host, please add the following lines to the end of .profile
. /oracle/ebsdev/product/10.2.0/ebsdev_target_hostname.env
PATH=$ORACLE_HOME/OPatch:/usr/vac/bin:$PATH
export PATH
6. Set Perl version to 5.8.3
Using Current or Copy other set_perl.env to home directory
e.g modify the content of set_perl.env
-> ebsprd to ebsdev
. set_perl.env
perl -v -> make sure the perl version is 5.8.3
8. Make sure the group of /etc/oratab and /etc/oraInst.loc are equal to dba. Otherwise, you will hit the following error while performing step 12 :
The file oratab needs to have group write permissions: /etc/oratab
If you hit this error, please run the script /tmp/orainstRoot.sh as root
9. Check /etc/hosts
Make Sure no duplicate host otherwise the next step will fail
e.g. 172.16.3.249 target_hostname.domain_name target_hostname
172.16.3.249 source_app_server.domain_name source_app_server
It will use source_app_server instead of target_hostname for your host record
i.e. You will see the following while performing step 13 :
Target system Display [source_app_server:0.0]:
But it should be [target_hostname:0.0]
10. Check /etc/oraInventory/locks permission, it should be group writeable.
Otherwise, please run "chmod g+w /etc/oraInventory/locks"
11. Check AIO Sync Status :
a. smitty aio
b. Select the menu item "Change/Show Characteristics of Asynchronous I/O"
c. This field "STATE" must be equal to "AVAILABLE". Otherwise, please perform the following steps :
i. smitty aio
ii. Select "Configure Defined Asynchronous I/O" or run "mkdev -l aio0"
iii. Select the menu item "Change/Show Characteristics of Asynchronous I/O"
iv. Change the field "STATE" to be configured at system restart" from DEFINED to AVAILABLE.
or just run the following command :
chdev -l aio0 -a autoconfig='available'
Remarks :
Although it said it request us to reboot machine, actually we don't need to do so.
12. Check Kernel Bit
bootinfo -K
-> it should return 64bit. Otherwise, please change the kernel from 32bit to 64bit :
ln -sf /usr/lib/boot/unix_64 /unix
ln -sf /usr/lib/boot/unix_64 /usr/lib/boot/unix
bosboot -ad /dev/ipldevice
shutdown -Fr
bootinfo -K
13. Start Clone(Make sure the database is shutdown)
env | grep SID ->ORACLE_SID=ebsdev
cd $ORACLE_HOME/appsutil/clone/bin
perl adcfgclone.pl dbTier
-> Enter APPS password
-> follow manual answer
-> Enter New Oracle SID : ebsdev
-> Enter New ORACLE HOME : /oracle/ebsdev/product/10.2.0
-> Enter New utl_file path : /oracle/ebsdev/product/10.2.0/appsutil/temp
-> Enter New Datafile location : /ebsdevdata
-> Change preserver Display : n and change to current host e.g. source_db_server:0.0
-> Change preserve port value : y(care -> how to determine which port it will use?)
Port Assignment :
No 0 1 ....99
db 1521 1522 ....1620
apps 0000 8001 ....8099
type Prod
Remarks :
It will create initebsdev.ora and ebsdev_source_db_server.env
Full Question and Answer :
Provide the values required for creation of the new Database Context file.
Do you want to use a virtual hostname for the target node (y/n) [n] ?:
Target instance is a Real Application Cluster (RAC) instance (y/n) [n]:
Target System database name [ebsuat]:ebsdev
Target system domain name [whis.org]:domain_name
Target system RDBMS ORACLE_HOME directory [/oracle/ebsuat/product/10.2.0]:/oracle/ebsdev/product/10.2.0
Target system utl_file accessible directories list [/oracle/ebsuat/product/10.2.0/appsutil/temp]:/oracle/ebsdev/product/10.2.0/appsutil/temp
Number of DATA_TOP's on the target system [1]:
Target system DATA_TOP 1 [/ebsuatdata]:/ebsdevdata
Do you want to preserve the Display set to source_db_server:1.0 (y/n) [y] ?:n
Target system Display [target_hostname:0.0]:
Perl executable location is set to:
/oracle/ebsdev/product/10.2.0/perl/bin/perl
Do you want to preserve the port values from the source system on the target system (y/n) [y] ?: n
Enter the port pool number [0-99]: e.g. 11 -> Database port is 1532
14. Check Clone DB Tier Result
e.g. egrep -i "error|fail|ora-" /oracle/ebsdev/product/10.2.0/appsutil/log/ebsdev_target_hostname/ApplyDBTier_12021226.log
Remarks :
It should be ok with the registration error.
15. Check the environment control exist in .profile or not
e.g. ". /oracle/ebsdev/product/10.2.0/ebsdev_target_hostname.env"
16. Cleanup old setting
sqlplus apps/<APPS PASSWORD>
exec FND_CONC_CLONE.SETUP_CLEAN
commit
17. Clone APPS Tier
Check and Modify symbolic link
cd /app/ebsdev/product/iAS
$ ls -tlr | grep lrw
lrwxrwxrwx 1 215 dba 26 Aug 25 11:17 6iserver -> /app/ebsseed/product/8.0.6
lrwxrwxrwx 1 215 dba 10 Aug 25 11:21 JRE -> appsjre118
rm 6iserver
ln -s /app/ebsdev/product/8.0.6 6iserver
chown -h appldev:dba JRE (you may need root privilege)
18. Set Perl version to 5.005_03
Using Current or Copy other set_perl.env to home directory
e.g login source_app_server
rcp -p /home/applprd/set_perl.env [TARGET_SERVER]:/home/appldev/.
chown appldev:dba /home/appldev/set_perl.env
modify the content of set_perl.env
-> ebsprd to ebsdev
. set_perl.env
perl -v -> make sure the perl version is 5.005_03
19. Start Clone Procedure
cd /app/ebsdev/comn/clone/bin
perl adcfgclone.pl appsTier
-> Enter APPS password
-> follow manual answer
-> Enter New Oracle SID : ebsdev
-> Enter Domain Name : domain_name
-> Enter Database Server Node : target_hostname
-> Enter Database Domain Name : domain_name
-> Enter Application tier server node : n
-> Enter New APPL_TOP mount point : /app/ebsdev/appl
-> Enter New COMMON_TOP : /app/ebsdev/comn
-> Enter New 8.0.6 ORACLE_HOME : /app/ebsdev/product/8.0.6
-> Enter New iAS ORACLE_HOME : /app/ebsdev/product/iAS
-> Enter New Display set : n and change to current host e.g. target_hostname:0.0
-> JDK Path : /usr/java14
-> Change preserve port value : n
set the no same as before(i.e. while you clone db tier)
set 0 for prd(Please check operation manual detail)
-> Enter UTL_FILE_DIR : 2(/oracle/ebsdev/product/10.2.0/appsutil/temp)
-> Reset Custom variable : n
Full Question and Answer :
Do you want to use a virtual hostname for the target node (y/n) [n] ?:
Target system database SID [ebsuat]:ebsdev
Target system domain name [whis.org]:domain_name
Target system database server node [source_db_server]:target_hostname
Target system database domain name [whis.org]:domain_name
Does the target system have more than one application tier server node (y/n) [y] ?:n
Is the target system APPL_TOP divided into multiple mount points (y/n) [n] ?:n
Target system APPL_TOP mount point [/app/ebsuat/appl]:/app/ebsdev/appl
Target system COMMON_TOP directory [/app/ebsuat/comn]:/app/ebsdev/comn
Target system 8.0.6 ORACLE_HOME directory [/app/ebsuat/product/8.0.6]:/app/ebsdev/product/8.0.6
Target system iAS ORACLE_HOME directory [/app/ebsuat/product/iAS]:/app/ebsdev/product/iAS
Do you want to preserve the Display set to source_app_server:0.0 (y/n) [y] ?:n
Target system Display [target_hostname:0.0]:
Location of the JDK on the target system [/usr/java14]:
Do you want to preserve the port values from the source system on the target system (y/n) [y] ?:n
Clone Context uses the same port pool mechanism as the Rapid Install
Once you choose a port pool, Clone Context will validate the port availability.
Enter the port pool number [0-99]: e.g. 11
Checking the port pool 11
done: Port Pool 11 is free
Complete port information available at /app/ebsdev/appl/admin/out/ebsdev_target_hostname/portpool.lst
Verifying Database Connection...
Database Connection on Port 1532: Successful
UTL_FILE_DIR on database tier consists of the following directories.
1. /usr/tmp
2. /oracle/ebsdev/product/10.2.0/appsutil/temp
3. /oracle/ebsdev/product/10.2.0/appsutil/outbound/ebsdev_target_hostname
4. /usr/tmp
Choose a value which will be set as APPLPTMP value on the target node [1]:2
Do you want to reset custom variable settings(y/n) [n]:
20. Check Clone Apps Tier Result :
e.g. egrep -i "error|fail|ora-" /app/ebsdev/appl/admin/ebsdev_target_hostname/log/ApplyAppsTier_12021652.log
21. Change owner of some symbolic link
chown -h appldev:dba /app/ebsdev/appl/xx* (you may need root privilege)
22. Add the following lines in APPS User .profile(after "export $PATH")
. /app/ebsdev/appl/APPSORA.env
PATH=/usr/vac/bin:$PATH
23. Check variable $APPLPTMP
login in as appldev
echo $APPLPTMP -> /oracle/ebsdev/product/10.2.0/appsutil/temp
Modify Oracle UTL_FILE_DIR in parameter file of oradev
Modify utl_file_dir to the following (please remember to change the SID and hostname, you must use ebsprd parameter file to update) :
utl_file_dir = /oracle/ebsdev/product/10.2.0/appsutil/temp,/oracle/ebsdev/product/10.2.0/appsutil/outbound/ebsdev_target_hostname,
/interface/ebsdev/ABCDARI01/in,/interface/ebsdev/ABCDARI02/in,/interface/ebsdev/ABCDARI03/in,
/interface/ebsdev/ABCDGLI01/in,/interface/ebsdev/ABCDGLI02/in,/interface/ebsdev/ABCDGLI03/in,
/interface/ebsdev/ABCDINVI02/in,/interface/ebsdev/ABCDPOI02/in,/interface/ebsdev/ABCDAPO01/out,
/interface/ebsdev/ABCDARO04/out,/interface/ebsdev/ABCDARO05/out,/interface/ebsdev/ABCDARO06/out,
/interface/ebsdev/ABCDINVO01/out,/interface/ebsdev/ABCDINVO03/out,/interface/ebsdev/ABCDINVO04/out,
/interface/ebsdev/ABCDPOO01/out
chmod g+w /oracle/ebsdev/product/10.2.0/appsutil/temp
24. Restart both apps and database servers
25. Make Sure the following line in $APPL_TOP/admin/adovars.env(Called by $APPL_TOP/ebsdev_target_serverenv)
IX_RENDERING=$FND_TOP/resource/pasta.cfg; export IX_RENDERING
IX_PRINTING=$FND_TOP/resource/ixlib.cfg; export IX_PRINTING
26. Modify all path in $FND_TOP/resource/*.cfg
e.g. grep ebs *.cfg | cut -f1 -d":" | sort | uniq
change all ebsxxx to ebsdev
Use the following line to check any missing files :
grep ebs *.cfg | grep -v ebsdev
27. Make Sure the following line in $FND_TOP/resource/pasta.cfg
displayfontpath=/app/ebsdev/appl/fnd/11.5.0/resource/ALBANYWT.ttf
28. Check connection information exist in tnsnames.ora or not for Oracle Discoverer 10g
su - oracle
cd $ORACLE_HOME/network/admin
vi tnsnames.ora
if not, please add them back.
29. Copy Secure file from $FNP_TOP to $ORACLE_HOME/discoverer/secure
e.g. cp /app/ebsdev/appl/fnd/11.5.0/secure/target_server_ebsdev.dbc /app/ebs/product/disco/discoverer/secure/ebsdev.dbc
cd /app/ebs/product/disco/discoverer/secure
chown oracle:dba ebsdev.dbc
30. Remove all unnecessary files in both database and application
find . -name *<Old SID>*
31. Reset User Password
Change "system" Password
e.g. su - oradev
connect / as sysdba
alter user system identified by xxxxxx;
Change "apps" Password
Make Sure the application server is not running
/home/appldev/scripts/change_password.sh
-> Enter SYSTEM password
-> Enter apps old password
-> Enter apps new password
Remarks :
Run adautocfg.sh after changing apps password
$COMMON_TOP/admin/scripts/ebsdev_target_server/adautocfg.sh
Change "sysadmin" password
/home/appldev/scripts/change_password.sh
-> Enter SYSTEM password
-> Enter apps password
-> Enter sysadmin password
32. Check Auto Config Result
e.g. egrep -i "error|fail|ora-" /app/ebsdev/appl/admin/ebsdev_target_server/log/12291032/adconfig.log
33. Start Application Server
34. Test Application Server Connection
e.g. http://target_server.domain_name:8010
Remarks :
Please make sure the following schedule job is suspended
"Synchronize Workflow LOCAL tables (1) (Report Set)
-> Login SYSADMIN
-> Choose "System Administrator"
-> Choose "Requests" under "Concurrent"
-> Choose "Find"
-> Scroll down until you find "Synchronize Workflow LOCAL tables (1) (Report Set)"
-> Choose "Synchronize Workflow LOCAL tables (1) (Report Set)"
-> Choose "Hold Request"
-> The Phase should change to "Inactive"
-> The Status should change to "On Hold"
Please make sure the parameter of the following schedule job is changed
Synchronize Workflow LOCAL tables (Report Set)
-> Login SYSADMIN
-> Choose "System Administrator"
-> Choose "Set" under "Concurrent"
-> Press "F11"
-> Input "Sync%" in the field "Set"
-> Press "CTRL" + "F11"
-> Choose "Link Stages"
-> Change "Success","Warning" and "Error" of "ENG_LIST" to "GBX"
-> Choose "Done"
-> Choose "Define Stages"
-> Choose "FND_RESP"
-> Choose "Requests"
-> Choose "Parameters"
-> Change the value of "Orig System" from "FND_RESP" to "ENG_LIST"
-> Choose "Save"
-> Choose "FND_USR"
-> Choose "Requests"
-> Choose "Parameters"
-> Change the value of "Orig System" from "FND_USR" to "ENG_LIST"
-> Choose "Save"
35. Test Discoverer Connection
http://target_server.domain_name:7777/
Choose "Discoverer Viewer"
-> Choose "Oracle Applications"
-> Input "sysadmin" in User Name
-> Input "ebsdev" in Database
-> Choose any in responsibility
-> If you can retrieve any result, it mean the service is up and running
Remarks :
If discoverer is not yet started, please use the following command to start the service :
su - oracle
/home/oracle/scripts/start_discoverer.sh
36. Reset Notification Mailer
-> Login SYSADMIN
-> Choose "System Administrator"
-> Choose "Dashboard" under "Oracle Applications Manager"
-> Choose "Site Map"
-> Choose "Notification Mailer"
-> Choose "Edit"
-> For production environment, please change "Server Name" to "domain_name". Otherwise, you can just use the hostname of target server
-> Choose "Apply"
-> Choose "Service Components"
-> Choose "Stop" in Action and press "Go" to stop "Workflow Notification"
-> Choose "Workflow Mailer Service" after "Workflow Mailer Service" is stopped (i.e. Status = "User Deactivated")
-> Choose "Stop All" and press "Go" to stop all components (i.e. State = "Deactivated")
-> Choose "Start All" and press "Go" to start all components after all components are stopped
-> Choose "Start" in Action and press "Go" to start "Workflow Notification" after all components are started
-> You may ask target user to test mail later
Remarks :
If it cannot connect to the server, it will prompt the following error :
Validation error occurred. Please check indicated fields below.
For production environment, please make sure the following record is inside /etc/hosts
10.16.100.246 domain_name
36. Check Database Parameter UTL_FILE_DIR
-> Login SYSADMIN
-> Choose "System Administrator"
-> Choose "System Configuration Overview" under "Oracle Applications Manager"
-> Choose "Database"
-> Choose "Init.ora Parameters"
-> Choose "Next" until you find "UTL_FILE_DIR"
-> Please verify the setting
37. Update Profile Option
-> Login SYSADMIN
-> Choose "System Administrator"
-> Choose "System" under "Profile"
-> Input "Site Name%" in Profile and press "Find"
-> Change to "ABCD ERP Development Environment" and press "Save" (need restart apps)
-> Choose "Find" button for next search
-> Input "ICX%" in Profile and press "Find"
-> Validate/Update the following variable(You may refer to ERP System Operation Manual) :
ICX: Discoverer use Viewer = No
ICX: Discoverer Launcher = http://target_server.domain_name:8010/discoverer/plus?Connect=[APPS_SECURE]
ICX: Discoverer Viewer Launcher = http://target_server.domain_name:8010/discoverer/viewer?Connect=[APPS_SECURE]
ICX: Forms Launcher = http://target_server.domain_name:8010/dev60cgi/f60cgi
ICX: Report Launcher = http://target_server.domain_name:8010/dev60cgi/rwcgi60
BNE UIX Physical Directory = /app/ebsprd/comn/html/cabo
Application Framework Agent = http://target_server.domain_name:8010
Applications JSP Agent = http://target_server.domain_name:8010
Applications Web Agent = http://target_server.domain_name:8010/pls/ebsdev
Apps Servlet Agent = http://target_server.domain_name:8010/oa_servlets
-> Choose "Application Developer"
-> Choose "Message" under "Application"
-> Press "F11"
-> Input "FND_SSO_WELCOME%"
-> Press "CTRL" + "F11"
-> Change to "ABCD ERP Development Environment" (need restart apps)
-> Choose "Save"
38. Set Temporary Directory in XML Publisher Administrator
-> Check $APPLPTMP of appldev
-> Login SYSADMIN
-> Choose "XML Publisher Administrator"
-> Choose "Administration" under "Home"
-> Choose "General" Under "Properties"
-> Input $APPLPTMP to "Temporary Directory"
e.g. /oracle/ebsdev/product/10.2.0/appsutil/temp
-> Choose "Save"
39. Restart all services
Remarks :
Any hostname above is just an example, you should replace them with the source and target server hostname.
Any username above is just an example, you should replace them with the source and target user.
Prepare The Source System (Pre-Clone)
1. Stop and Backup both database and application server
2. Startup database server only
su - oraprd
/home/oraprd/scripts/prod/startdb.sh
3. Shutdown both database and application server
Login Application server (i.e. app_server)
su - applprd
/home/applprd/scripts/prod/stopappl.sh
4. Run Auto-Config in app_server
$COMMON_TOP/admin/scripts/ebsprd_app_server/adautocfg.sh
5. Prepare appsutil.zip contains the DB Node Autoconfig files in app_server
cd $AD_TOP/bin (e.g. /app/ebsprd/appl/ad/11.5.0/bin)
perl admkappsutil.pl
Remarks :
make sure /usr/local/bin is added to PATH
6. Copy appsutil.zip to db server $ORACLE_HOME
Login as root in app_server
rcp /app/ebsprd/appl/admin/out/appsutil.zip db_server:/home/oraprd/.
login as root in db_server
chown oraprd:dba /home/oraprd/appsutil.zip
7. Uncompress appsutil.zip in db_server
cd $ORACLE_HOME
mkdir appsutil_20091106
cp -r -p ./appsutil/* ./appsutil_20091106/.
mv /home/oraprd/appsutil.zip .
unzip appsutil.zip <- Replace all existing file in appsutil
8. Make sure the perl related variables are correct in the following file :
/oracle/ebsprd/product/10.2.0/ebsprd_db_server.env :
#
# Add perl to the PATH and set PERL5LIB
#
PERLBIN=`dirname /oracle/ebsprd/product/10.2.0/perl/bin/perl`
PATH=${PERLBIN}:${PATH}
PERL5LIB=/oracle/ebsprd/product/10.2.0/perl/lib/5.8.3/aix-thread-multi:/oracle/ebsprd/product/10.2.0/perl/lib/5.8.3:
/oracle/ebsprd/product/10.2.0/perl/lib/site_perl/5.8.3/aix-thread-multi:/oracle/ebsprd/product/10.2.0/perl/lib/site_perl/5.8.3:
/oracle/ebsprd/product/10.2.0/perl/lib/site_perl:.:/oracle/ebsprd/product/10.2.0/appsutil/perl:/oracle/ebsprd/product/10.2.0/appsutil/perl:
/oracle/ebsprd/product/10.2.0/appsutil/perl
ADPERLPRG=/oracle/ebsprd/product/10.2.0/perl/bin/perl
export PATH
export PERL5LIB
export ADPERLPRG
------------------------------------------------------------------------------------
/oracle/ebsprd/product/10.2.0/appsutil/ebsprd_db_server.xml :
<ADPERLPRG oa_var="s_adperlprg" osd="unix">/oracle/ebsprd/product/10.2.0/perl/bin/perl</ADPERLPRG>
<PERL5LIB oa_var="s_perl5lib" osd="unix">/oracle/ebsprd/product/10.2.0/perl/lib/5.8.3/aix-thread-multi:
/oracle/ebsprd/product/10.2.0/perl/lib/5.8.3:/oracle/ebsprd/product/10.2.0/perl/lib/site_perl/5.8.3/aix-thread-multi:
/oracle/ebsprd/product/10.2.0/perl/lib/site_perl/5.8.3:/oracle/ebsprd/product/10.2.0/perl/lib/site_perl:.
:/oracle/ebsprd/product/10.2.0/appsutil/perl:/oracle/ebsprd/product/10.2.0/appsutil/perl:/oracle/ebsprd/product/10.2.0/appsutil/perl</PERL5LIB>
------------------------------------------------------------------------------------
9. Run Auto-Config in db_server (it may issue core dump error)
su - oraprd
cd /oracle/ebsprd/product/10.2.0/appsutil/scripts/ebsprd_db_server
./adautocfg.sh
Remarks :
If it cause core dump error [/oracle/ebsprd/product/10.2.0/appsutil/bin/adconfig.sh[274]: 1126468 Illegal instruction(coredump)],
please run the following script to rollback :
/oracle/ebsprd/product/10.2.0/appsutil/out/ebsprd_db_server/11101613/restore.sh
10. Check adconfig.log
egrep -i "ORA-|fail|error" /oracle/ebsprd/product/10.2.0/appsutil/log/ebsprd_db_server/11101612/adconfig.log
11. Start Preclone of database tier (DB need to be on)
cd /oracle/ebsprd/product/10.2.0/appsutil/scripts/ebsprd_db_server
perl adpreclone.pl dbTier
12. Check DB preclone result :
egrep -i "ORA-|fail|error" /oracle/ebsuat/product/10.2.0/appsutil/log/ebsuat_db_server/StageDBTier_11241431.log
13. Start Preclone of application tier
cd $COMMON_TOP/admin/scripts/ebsprd_db_server/
perl adpreclone.pl appsTier
14. Check Apps preclone result :
egrep -i "ORA-|fail|error" /app/ebsuat/appl/admin/ebsuat_app_server/log/StageAppsTier_11241448.log
15. Shutdown Database Server
Login Database server (i.e. db_server)
Shutdown Database Server
su - oraprd
/home/oraprd/scripts/prod/stopdb.sh
16. Copy Source System(Both DB, Apps and Discoverer) to target server
Remarks :
We better use Tape instead of rsync.
Include Data file, oracle base , apps base and discoverer(actually no need)
Cleanup Procedure After Unclear Shutdown of ERP Application Server
1. Login user apps and run the following SQL :
connect apps
select running_processes,max_processes from fnd_concurrent_queues where running_processes>0 or max_processes>0;
select status_code,phase_code from fnd_concurrent_requests where status_code = 'T';
If any result return, please run the following SQL :
update fnd_concurrent_queues set running_processes=0, max_processes=0;
commit;
delete from fnd_concurrent_requests where status_code = 'T';
commit;
3. Check table fnd_dual :
select * from fnd_dual;
DUMMY
----------
1
1
If retreive more than one row, please run the following SQL :
delete from fnd_dual where rownum < (select max(rownum) from fnd_dual);
commit;
How To Retreive Date and Time Information In Oracle
How To Retreive Date and Time Information In Oracle
SQL> select to_char(sysdate,'DD/MM/YYYY HH24:MI') "Started" from dual;
Started
----------------
30/12/2009 16:54
SQL> select sysdate from dual;
SYSDATE
---------
30-DEC-09
SQL> select sysdate-1 from dual;
SYSDATE-1
---------
29-DEC-09
SQL> select trunc(sysdate-1) from dual;
TRUNC(SYS
---------
29-DEC-09
SQL> select '29-DEC-09' from dual;
'29-DEC-0
---------
29-DEC-09
How to Perform Date Calculation in AIX
How to Perform Date
Calculation in AIX
1. Create a unix script with the following content :
#!/bin/sh
#
date
date '+%m%d%Y'
TZ=HKT+40
date
date '+%m%d%Y'
2. Run the script and you should get back the following result ::
Sat Jan 2 12:42:36 HKT 2010
01022010
Fri Jan 1 12:42:36 HKT 2010
01012010
Remaks :
24-hours before => TZ=HKT+16
48-hours before => TZ=HKT+40
1. Create a unix script with the following content :
#!/bin/sh
#
date
date '+%m%d%Y'
TZ=HKT+40
date
date '+%m%d%Y'
2. Run the script and you should get back the following result ::
Sat Jan 2 12:42:36 HKT 2010
01022010
Fri Jan 1 12:42:36 HKT 2010
01012010
Remaks :
24-hours before => TZ=HKT+16
48-hours before => TZ=HKT+40
2012年4月11日星期三
How to use awk to check array length
$ echo "1 2 4" | awk '{print NF}'
3 -> 3 characters in an array
$ echo "1 2 6 4" | awk '{print NF}'
4 -> 4 characters in an array
How to backup and Restore a volume group(VG)
Lists the contents of a rootvg backup. For example:
listvgbackup -f /dev/rmt0
Restoring a Backup
Restoring a User Volume Group Backup
restvg -f backup_location
Remakes the user volume group and restores the contents of the backup. The following are two
examples:
restvg -f /dev/cd0
restvg -f /savevg_images/savevg1
Restoring a User Volume Group Backup Minimizing Space
restvg -s -f backup_location
Remakes the user volume group and restores the contents of the backup while minimizing the
space required. The following are two examples:
restvg -s -f /dev/cd0
restvg -s -f /savevg_images/savevg1
Restoring Files from a rootvg Backup
restorevgfiles -d restore_location -f backup_location list_of_files
Restores the specified files from a rootvg backup. The following are two examples:
restorevgfiles -d /tmp -f /dev/cd0 ./tmp/file1 ./tmp/file2 ./tmp/file3
restorevgfiles -d /tmp -f /images/rootvg_image1 ./tmp/file1 ./tmp/file2 ./tmp/file3
Restoring Files from a User Volume Group Backup
restorevgfiles -s -d /tmp -f backup_location list_of_files
Restores the specified files from a rootvg backup. The following are two examples:
restorevgfiles -s -d /tmp -f /dev/cd0 ./pictures/pic1 ./pictures/pic2
restorevgfiles -s -d /tmp -f /savevg_images/savevg1 ./pictures/pic1 ./pictures/pic2
Setup DNS in AIX
1. add the following to /etc/resolv.conf
domain xyz.org.hk
nameserver 192.168.1.196
nameserver 192.168.1.194
2. add the following to /etc/netsvc.conf
hosts = local, bind
Remarks:
1. if the first dns server is down, it cannot resolv name.
Check Backup Tape Block Size
用以下的腳本可以很方便地知道備份帶的塊大小(Block Size)和類型(Type):
#!/bin/ksh
tctl rewind
chdev -l rmt0 -a block_size=0
dd if=/dev/rmt0 bs=128k of=blksz_file count=1
echo Tape Block Size = $(ls -l ./blksz_file | awk '{print $5}')
echo Tape Format = $(file ./blksz_file | while read a b;do echo $b;done)
Display Controller Rechargeable Battery Information
Display Controller Rechargeable Battery Information
sisraidmgr -M -o0 -l'sisioa0'
Change Paging Size in AIX
chps -s'4' hd6
4 = 4 LP
1 LP = 1PP
if PP=256MB
4 LP = 1024 MB
/etc/swapspaces
swapon -a
The lsps command, mkps command, rmps command, swap command, swapon
command, swapoff command.
The Paging space in Operating system and device management explains
paging space and its allocation policies.
The File systems in Operating system and device management provides
information on working with files.
For information on installing the Web-based System Manager, see Chapter
2: Installation and System Requirements in AIX 5L Version 5.3 Web-based
System Manager Administration Guide.
The System management interface tool in Operating system and device
management explains the structure, main menus, and tasks that are done
with SMIT.
Paging File can be added online.
Shell Script using array
Content of t.sh :
#!/bin/sh
#
ADMIN=(1 2 3)
echo ${ADMIN[0]}
echo ${ADMIN[1]}
echo ${ADMIN[2]}
echo ${ADMIN[@]} #show all
echo ${#ADMIN[@]} #how many item with arrange
[root@system]# ./t.sh
1
2
3
3
Common Tape Control Command
lsdev -Cc tape -> to check tape
TAR folder Test append to tape rmt1(using ".1")
tar -cvf /dev/rmt1.1 ./Test
mt -f /dev/rmt1.1 fsf 1 -> move the tape pointer forward
mt -f /dev/rmt1.1 bsf 1 -> move the tape pointer backward
mt -f /dev/rmt1.1 rewind -> rewind to the beginning
will move advance 1
tar -tvf /dev/rmt0.1
Common Printing Command
Add queue
/usr/lib/lpd/pio/etc/piomisc_ext mkpq_remote_ext -q 'PRINTER1' -h '172.16.1.86' -r 'P1' -t 'aix' -C 'FALSE' -d 'Location 1 - Printer 1'
Name of QUEUE to add [ PRINTER1]
* HOSTNAME of remote server [172.16.1.86]
* Name of QUEUE on remote server [P1]
Type of print spooler on remote server AIX Version 3 or 4 +
Backend TIME OUT period (minutes) [] #
Send control file first? no +
To turn on debugging, specify output []
file pathname
DESCRIPTION of printer on remote server [Location 1 - Printer 1]
change queue
/usr/bin/chque -q 'PRINTER1' -a"host = "'192.168.1.86' -a"rq = " |
| 'P3' -a"s_statfilter = "'/usr/lib/lpd/bsdshort' -a"l_statfilter = "'/u |
| sr/lib/lpd/bsdlong'
remove print queue
/usr/sbin/piomisc_base two_devices rmpq 'LAB_BIOCHM_PRT1'
-- To print
lp -dprinter1 /tmp/test
-- To list the print queue
lpstat
-- To enable it if it is down
enable printer1
-- To cancel a print job
cancel job_no.
----------------
/usr/lib/lpd/pio/etc/piomisc_ext mkpq_remote_ext -q 'printer1' -h 'printer1' -r 'P1' -t 'aix' -C 'FALSE'
AIX iowait high explanation
iostat
% iowait Shows the percentage of time that the CPU or CPUs were idle during
which the system had an outstanding disk I/O request.
-> If iowait is high, it mean CPU need to wait for I/O since the disk is too busy(please also check the tmact)
vmstat
id CPU idle time.
wa CPU idle time during which the system had outstanding disk/NFS I/O
request(s). See detailed description above.
id high is ok, it mean the system it not busy
wa high is just similar to the case of iowait high in iostat.
AIX ftpaccess setup
Create puseronly for ftpaccess in AIX
1. create dev/null under target folder
/share/ftp/autovue/upl
according to /usr/samples/tcpip/anon.ftp
# make $FTPHOME dev/null entry
mkdir dev
#do equiv of mknod dev/null c 2 2
/usr/sbin/mknod dev/null c $(ls -l /dev/null | awk '{print $5, $6}' | tr -d ,)
chmod 555 dev
chown root dev
chgrp system dev
2. Add right permission for group and others to dev/null
3. Add the following line in /etc/ftpaccess.ctl
################################################################################
# FTP Access Control -> Take Effect Immediately -> No Need to Restart Subsystem
################################################################################
#
# Read Only Folders -> No matter what the folder right is
# writeonly : disable get command to specific folders
# readonly : disable put/delete command to specific folders
# readwrite: allow any action
# These setting apply to all users include root
# e.g.
# writeonly: /share/prd/writeonly
# readonly: /share/prd/readeonly
# readwrite: /share/prd/readwrite
#
# Anonymous Login
# with "p" = Need User Password
# Normally Nth show to user but can upload files,
# but ls command can show files
# Symbolic Link Not Work For Both "useronly" and "puseronly"
# This will override the above setting i.e. overwrite readonly setting
# e.g.
# puseronly: targetuser
# pgrouponly: targetgrp
puseronly: auvueupl,auvuednl,autovue
4. Add restrict user list to /etc/ftpusers
Please add according to your /etc/passwd
Examples :
########################################################################
# The following users will be restricted from ftp login
########################################################################
root
daemon
bin
sys
adm
uucp
guest
nobody
lpd
lp
invscout
snapp
ipsec
nuucp
esaadmin
#targetusr
#targetadm
#targetsys
########################################################################
# Allow Users List
########################################################################
#auvueupl
#auvuednl
#autovue
How to Clear AIX Front Panel Error LED
To clear the orange led, you should go to
# diag --> Task selection --> Identify and Attention Indicators --> Set
Some Command I always used in AIX
1. Check Top Process
topas -P
2. Check Disk I/O
topas -D
3. Check error report within a range
errpt -a -s 1101000008 -e 1118235908 | more
MMDDHHMMYY MMDDHHMMYY
4. Display the PGIN, SIZE, RSS, LIM, TSIZ, TRS, %CPU, %MEM fields of all processes
ps gv
5. Get the status of all subsystem or subserver.
lssrc -a
6. Display all user account attributes : user id and home directory.
lsuser -c -a id home ALL | sed '/^#.*/d' | tr ':' '\011'
Remarks :
sed '/^#.*/d' : remove the line "#name:id:home"
tr : Translate character ":" to "tab(\011)"
7. Display devices "disk" in the system and their characteristics.
lsdev -H -C -c disk
Remarks :
-H : Display the Header Information
name status location description
8. Display devices "processor" in the system and their characteristics.
lsdev -Cc processor
9. Display attribute characteristics and possible values of attributes for device "proc0" in the system.
lsattr -El proc0
10. Display devices "memory" in the system and their characteristics.
lsdev -Cc memory
11. Display attribute characteristics and possible values of attributes for device "mem0" in the system.
lsattr -El mem0
14. Display attribute characteristics and possible values of attributes for device "hdisk0" in the system.
lsattr -El hdisk0
15. Restart a subsystem
refresh -s syslogd
16. Monitors activity and reports statistics on network I/O and network-related CPU usage.
netpmon
Remarks :
Run trcstop command to signal end of trace.
17. Display System Configuration
lscfg
prtconf
Remarks :
lscfg -v : Display vital product data (VPD) such as part numbers, serial numbers
lscfg -p : Display the platform-specific device information.
18. Check AIX Maintenance Level
instfix -i|grep ML
or
instfix -ik 4330-04_AIX_ML
19. Check Installed Package
lslpp -l
20. Check File over 1M
find / -xdev -size +1048576c -ls
find /usr -xdev -size +1048576c -ls
21. Run command together with command "find"
find . | xargs grep bc
or
find /root/scripts | xargs grep bc
22. Monitor the CPU usage per process with command "ps"
ps auwx
23. General Command for device management
cfgmgr : refresh and update device database
lsdev : list device
mkdev -l : change specific device status to "Available"
rmdev -l : change specific device to "Defined"
rmdev -d : remove specific device
How to Enable Async I/O for Sqlplus
If you hit the following error, it mean you had hit the async I/O problem.
SQL> connect / as sysdba
exec(): 0509-036 Cannot load program oracleebsprd because of the following errors:
0509-130 Symbol resolution failed for /usr/lib/libc.a[aio_64.o] because:
0509-136 Symbol kaio_rdwr64 (number 0) is not exported from
dependent module /unix.
0509-136 Symbol listio64 (number 1) is not exported from
dependent module /unix.
0509-136 Symbol acancel64 (number 2) is not exported from
dependent module /unix.
0509-136 Symbol iosuspend64 (number 3) is not exported from
dependent module /unix.
0509-136 Symbol aio_nwait (number 4) is not exported from
dependent module /unix.
0509-136 Symbol aio_nwait64 (number 5) is not exported from
dependent module /unix.
0509-136 Symbol aio_nwait_timeout (number 6) is not exported from
dependent module /unix.
0509-136 Symbol aio_nwait_timeout64 (number 7) is not exported from
dependent module /unix.
0509-026 System error: Error 0
0509-192 Examine .loader section symbols with the
'dump -Tv' command.
ERROR:
ORA-12547: TNS:lost contact
Make Asynchronous I/O available on system, following the next steps to set it up:
1. Log in as root
2. Type:
mkdev -l aio0
This command attempts to verify that Asynchronous I/O services are running (available on system),
if not, they are started.
3. To ensure it is configured at each system restart :
a. Type: smitty aio
b. Select the menu item "Change/Show Characteristics of Asynchronous I/O"
c. Change the field "STATE to be configured at system restart"
from DEFINED to AVAILABLE.
Step 3 will toggle the state to be configured at system restart to be available, making
asynchronous I/O available with each system reboot.
Switch Kernel Mode Between 32-bit and 64-bit
To switch from 32-bit mode to 64-bit mode run the following commands, in the given order:
1.ln -sf /usr/lib/boot/unix_64 /unix
2.ln -sf /usr/lib/boot/unix_64 /usr/lib/boot/unix
3.bosboot -ad /dev/ipldevice
4.shutdown -Fr
5.bootinfo -K (should now show 64)
Switching From 64 To 32-Bit Mode
To switch from 64-bit mode to 32-bit mode run the following commands, in the given order:
1.ln -sf /usr/lib/boot/unix_mp /unix
2.ln -sf /usr/lib/boot/unix_mp /usr/lib/boot/unix
3.bosboot -ad /dev/ipldevice
4.shutdown -Fr
5.bootinfo -K (should now show 32)
2012年4月9日星期一
可惜我是水瓶座....
我在網路上找到對自己星座的分析 :
水瓶座的男性內心世界極為錯綜復雜,很難理解。他給人的表像是樸實爽直,但內在心理總是在悖論和矛盾的境界中徘徊。一般地說,他對人熱忱,願意幫助人。但在某些特殊的情況下,他也會表現得異常冷漠和不近人情。
他既有個性,又富有魅力,這是個能使他所愛的人神情蕩漾的人。他不願按規章制度辦事,也忍受不了任何約束。
實際上,他更多喜歡的是友誼並不是愛情,因為愛情會妨礙他形而上學的沉思:我是誰?我從哪裡來?我到何處去?但他也會狂勢地投入到愛情的懷抱,或者把一切都理想化。
由於土星的影響,水瓶座的男性性格比較冷漠、孤僻,思想富有哲理性。如果天王星和影響力大,則會使這一星座的男性變得很幽默,喜歡與人交往,並對所有新事物充滿好奇心。
水瓶座的男性在40歲左右的時候,常常會出現不可避免的注定的人生轉折。他會改變自己的生活,拋棄過去,奔向新的未來。
水瓶座的男性內心世界極為錯綜復雜,很難理解。他給人的表像是樸實爽直,但內在心理總是在悖論和矛盾的境界中徘徊。一般地說,他對人熱忱,願意幫助人。但在某些特殊的情況下,他也會表現得異常冷漠和不近人情。
他既有個性,又富有魅力,這是個能使他所愛的人神情蕩漾的人。他不願按規章制度辦事,也忍受不了任何約束。
實際上,他更多喜歡的是友誼並不是愛情,因為愛情會妨礙他形而上學的沉思:我是誰?我從哪裡來?我到何處去?但他也會狂勢地投入到愛情的懷抱,或者把一切都理想化。
由於土星的影響,水瓶座的男性性格比較冷漠、孤僻,思想富有哲理性。如果天王星和影響力大,則會使這一星座的男性變得很幽默,喜歡與人交往,並對所有新事物充滿好奇心。
水瓶座的男性在40歲左右的時候,常常會出現不可避免的注定的人生轉折。他會改變自己的生活,拋棄過去,奔向新的未來。
訂閱:
文章 (Atom)