2008年12月23日星期二

Together卸载时的问题

今天在卸载borland together 2006 R2(执行$TogetherInstallDir/UninstallData/uninstall)时出现了错误:
...
error while loading shared libraries: libpthread.so.0: cannot open shared object file: No such file or directory

google一把后,找到问题答案:脚本中的LD_ASSUME_KERNEL值有问题。
改成当前kenerl值后,就OK了。

2008年12月22日星期一

讲真话的官员

查看原文

2008,中国官员“讲真话元年”


      唠叨多年“讲真话”的《巴金终于可以死(瞑目)了》。他若能耳充目明地活到今天,面对当下众多国家干部的“大实话”,只怕会被社会进步得如此之快,吓得昏死过去。


     说起来,号召全党乃至平头百姓“讲真话”,这可是神州大地一贯持之以恒的传统,直到用了近乎一个甲子的60年,终于在国家干部身上,频频结出轰动全国的硕果了。


      朱大可说2008是“灾难元年”;我以为2008也可以说是“官员讲真话元年”。举几个例子:


      “以前没有网络的时候多好啊,想让他们怎么说就怎么说。”


      ——《南方人物周刊》记者回访陕西绥德校长找县长签字被拘事,接待记者的绥德宣传部长说感慨:“以前不来报道我们绥德的大好形势,现在一出这事你们就过来,这不是给我们的工作添乱吗?”。绥德宣传部部长这句泄露国家机密的话,放在从前,估计打死他,他也是不敢说的。


      “你们算个屁啊...你知道我是谁吗?我是北京交通部派下来的,级别和你们市长一样高,敢跟我斗!”。


      ——2008年10月28日,深圳海事局党组书记、副局长林嘉祥涉嫌猥亵11岁女童,当女孩父母找其讲理时,林书记如是说。实践是检验真理的唯一标准,事实果然证明屁们能奈林书记何。


      “你们将来受了处分,吊销了你们的记者证,你们不要后悔!”


       ——太原市杏花岭区检察院检察长何书生对记者如是说。嘿嘿,何书生的能量已经充分展示了,而且不止于吊销记者的证件。


      “公安机关依法打击一批,精神司法鉴定治疗一批,集中办班培训管教一批”。


       ——2008年新泰县政务网上的一篇官方文章,在总结“怎么依法处置信访工作”时这样写道。这话还不够赤裸裸,那么这世上就没有真话了。


    “我是法院的,我代表国家罗汉,花100万弄死你这个农民。”


      ——江西抚州临川区人民法院公职人员芦涛在上班期间和一名包工头跑到工地上,对一位男子一边拳打脚踢,一边如是说。其实按比比皆是的同类事件来看,要弄死个农民的善后成本根本无需花这么多钱。这个法院的罗汉看来钱多得没地方花了。


     “叫门卫把她扣下来!我今天要做一个轰动全国的事情!”


     ——西安电子科技大学与银行秘密勾结大规模出卖学生身份证信息,面对记者的采访,宣传部部长强建周如此叫嚣。


    “这是啥考试,还弄得和真的一样;我掏钱买文凭,你有啥资格管我!”


      ——12月20日下午,西北五省(区)党校研究生班考试,陕西乾县科技局局长王显亮大闹官员考场时如是说。 王局长连“认认真真走过场”的程序都懒得走了,真是率性得可以。


    打住吧!


    各位看官应该知道这样一个常识:一个人是否敢讲真话,通常取决于利害的判断。上述大实话都有一个共同的背景,已经没有什么力量能约束这些官员,他们的感觉好极了。


(草完)



2008年12月2日星期二

Access EBS R12 Form from Firefox

edit $HOME/.mozilla/firefox/[*****ssl.default/]pluginreg.dat (different directory under Windows)
find section: Java(TM) Plug-in ver:$

before modification:
33
0:application/x-java-vm:Java::$
...
32:application/x-java-bean;jpi-version=1.6.0_10:Java::$

after modification:
34
0:application/x-java-vm:Java::$
...
32:application/x-java-bean;jpi-version=1.6.0_10:Java::$
#add a new line
33:application/x-java-applet;jpi-version=1.5.0_13:Java::$

2008年12月1日星期一

bad signature problems

When running a routine package update, I sometimes get errors like this:

$ sudo apt-get update
...
W: A error occurred during the signature verification. The repository is not updated and the previous index files will be used.GPG error: http://security.ubuntu.com hardy-security Release: The following signatures were invalid: BADSIG 40976EAF437D05B5 Ubuntu Archive Automatic Signing Key
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/intrepid-updates/Release
W: Some index files failed to download, they have been ignored, or old ones used instead.
W: You may want to run apt-get update to correct these problems

This ubuntu bugs page suggests this:

$ sudo apt-get update -o Acquire::http::No-Cache=true

but the problem persists.

By deleting the incorrectly signed Release and Release.gpg files that were downloaded in the last try:

$ sudo rm -f /var/lib/apt/lists/partial/security.ubuntu.com_ubuntu_dists_intrepid-updates_Release*

Now apt-get works successfully.

2008年9月27日星期六

Migrating Oracle EBS R12 from linux 32-bit to 64-bit

1. Prerequisites
Section 1: Prerequisites of the Cloning Oracle Applications Release 12 with Rapid Clone document details the prerequisite steps to clone an Oracle E-Business Suite system. The platform migration process in this document requires cloning the application tier components from the Linux 32-bit environment to the Linux 64-bit environment. Perform all steps in Section 1: Prerequisites to prepare both the source and target systems for the migration of the Oracle E-Business Suite system.
# Verify OS requirements on Target System
Before cloning to a new server, ensure the Target System meets all the requirements for Oracle Applications Release 12 stated on the Oracle Applications Release Notes and on the Oracle Applications Installation and Upgrade Notes for each Platform. For the latest installation guidelines refer to OracleMetaLink Document 405565.1.
# Verify source and target nodes software versions
In addition to the Oracle Applications software requirements (see Oracle Applications Installation Guide: Using Rapid Install, Release 12), the following software component versions must exist on the source and/or target nodes. The location column indicates the node where the software component must be present.
# Apply the latest AD patch
Apply patch 6510214 (R12.AD.A.DELTA.4) or higher. Refer to OracleMetaLink to obtain the latest AD patch available.
# Apply the latest AutoConfig Template patch
Update the Oracle Applications file system with the latest AutoConfig template files by applying the TXK AutoConfig Template rollup patch to all application tier server nodes. Refer to Document 387859.1 in OracleMetaLink for details of the latest AutoConfig Template rollup patch.
# Apply the latest Rapid Clone patches
Update the Oracle Applications file system with the latest Rapid Clone files by applying the following patches to all Applications nodes:
* 5484000 : Oracle E-Business Suite 12.0.2 Release Update Pack (RUP2)
* 6776948 : R12 RAPIDCLONE CONSOLIDATED FIXES JUL/2008
Warning: If new Rapid Clone or AutoConfig updates are applied to the system, steps 6, 7 and 8 below must be executed again in order to apply the new files into the Database Node.
# Run AutoConfig on the Application Tiers
Follow the steps under section " Run AutoConfig on the Application Tiers " in OracleMetaLink Document 387859.1 to Run AutoConfig on all application tier nodes.
# Synchronize appsutil on the Database Tier Nodes
Follow the steps under section "Copy AutoConfig to the RDBMS ORACLE_HOME" in OracleMetaLink Document 387859.1 to copy AutoConfig and Rapid Clone files to each database node via the admkappsutil.pl utility.

# Run AutoConfig on the Database Tier
Follow the steps under section "Run AutoConfig on the Database Tier" in OracleMetaLink Document 387859.1 to Run AutoConfig on the database tier nodes.

# Maintain Snapshot information
Log in to each Applications Node as the APPLMGR user, and run "Maintain Snapshot information" in AD Administration.
See Oracle Applications Maintenance Utilities for more information.

Use the R12 Rapid Install to install the 10.2.0 database Oracle home on the target Linux 64-bit machine. See the Installing Technology Stack Components chapter of the Oracle Applications Installation Guide: Using Rapid Install.
$ rapidwiz -techstack
select the 'Database Technology Stack (10gR2 RDBMS)' option

2.Migration
The migration of the E-Business Suite system from the 32-bit environment to the 64-bit environment is a two steps process of migrating the database using the process documented in Using Oracle E-Business Suite Release 12 with a Database Tier Only Platform on Oracle 10g Release 2 and migrating the application tier using the process documented in Cloning Oracle Applications Release 12 with Rapid Clone.
Migrate the Database
# Shut down the application tier services
Log on to each machine in the application tier and stop the Oracle E-Business Suite services.
$ cd /admin/scripts/
$ adstpall.sh apps/

# De-register the original database
De-register the original database server machine from the AutoConfig repository in the Applications database.
As the ORACLE user, log on to the machine with the existing database and run the following commands:
$ cd /appsutil/bin
$ perl adgentns.pl appspass= contextfile= -removeserver

# Migrate OLAP analytical workspaces
To migrate from a 32bit installation to a 64bit installation of Oracle OLAP, the basic steps are:
1) On the original 32-bit installation, export user created AWs and then delete these AWs.
2) Remove OLAP from the 32bit installation using the Oracle Universal Installer.
OLAP delete and reinstall,metalink:386990.1
3) For the new 64-bit installation make certain Oracle OLAP is installed.
4) Import all AWs from the 32bit installation.

Detailed steps:
--export user created AWs and then delete these AWs.
declare
ex_dir varchar2(200) := '/home/oracle/aw';
begin
for x in (select owner#||'.'||awname fullaw from sys.aw$ where owner# != 0) loop:
dbms_aw.execute('aw attach '||x.fullaw||' rw');
dbms_aw.execute('allstat');
dbms_aw.execute('export all to eif file '''||ex_dir||'/'||x.fullaw||'.eif ''');
dbms_aw.execute('aw detach '||x.fullaw);
dbms_aw.execute('aw delete '||x.fullaw);
end loop;
end;


--import each of the exported AWs
begin
for x in (select fullaw, eif from ?TAB) loop:
dbms_aw.execute('aw attach '||x.fullaw||' rw');
dbms_aw.execute('import all from eif file '''||x.eif||''' data dfns');
dbms_aw.execute('update');
commit;
dbms_aw.execute('aw detach '||x.fullaw);
end loop;
end;

# Create a .trc file to use as template to recreate the control files on the target machine
$ sqlplus/nolog
SQL> connect / as sysdba
SQL> alter database backup controlfile to trace

# Shut down the original (source) database
Perform a SHUTDOWN NORMAL on the source database, and stop the database listener.

# (Option A) Migrate Linux 32-bit database to Linux Itanium
Perform the following steps to move the Linux 32-bit database to Linux Itanium:
1. Copy the database (.dbf) files from the source machine to the target machine
2. Copy the database configuration files init.ora and ifilecbo.ora
3. Modify configuration files on target machine to reflect the new environment. Also, set _system_trig_enabled=false
4. Start up the database in nomount mode
5. Recreate the database control files
copy $ORACLE_HOME/admin/$SID/udump/orcl_ora_xxxx.trc to the target machine, Edit the file to point the path of the datafiles and redologfiles.
CREATE CONTROLFILE REUSE DATABASE "ORCL" RESETLOGS ARCHIVELOG
MAXLOGFILES 5
MAXLOGMEMBERS 3
MAXDATAFILES 14
MAXINSTANCES 1
MAXLOGHISTORY 226
LOGFILE
GROUP 1 '$ORACLE_HOME\ORADATA\VIS\REDO01.LOG' SIZE 100M,
...
DATAFILE
'$ORACLE_HOME\ORADATA\VIS\SYSTEM01.DBF',
...
CHARACTER SET WE8MSWIN1252
;
and rename it to ctl.sql
Then startup the database in nomount mode and run the ctl.sql file as sys as sysdba user
SQL> startup nomount
SQL> @ctl.sql
create temporary tablespace TEMP2 TEMPFILE '/home2/oracle/oradata/sysmon/temp02.dbf'
6. Upgrade the database from 32-bit to 64-bit (recompile pl/sql modules and change the word size) by running
and utlrp.sql (in ORACLE_HOME/rdbms/admin/). Refer to the usage and notes sections in each of these scripts for instructions on how to run them.

1. Query returning the number of invalid objects remaining. This
number should decrease with time.
SELECT COUNT(*) FROM obj$ WHERE status IN (4, 5, 6);

2. Query returning the number of objects compiled so far. This number
should increase with time.
SELECT COUNT(*) FROM UTL_RECOMP_COMPILED

在utlrp.sql执行过程中出现错误_intel_fast_memcpy.A()+10, 是由于32bit的OLAP没有删除引起的。
1. Remove OLAP:
At the system prompt 'cd' to the ORACLE_HOME/olap/admin directory then:
SQL> @?/olap/admin/catnoamd.sql
SQL> @?/olap/admin/catnoaps.sql
SQL> @?/olap/admin/catnoxoq.sql
SQL> @?/olap/admin/olapidrp.plb

2. Add OLAP

Add the OLAP option to an existing Enterprise Edition Database
Assuming that you created your database manually or via DBCA, Enterprise
Edition in Oracle Database 10g:
SQL> connect SYS as SYSDBA
SQL> @?/olap/admin/olap.sql SYSAUX TEMP;

3. Recompile any invalid objects:
SQL> @?/rdbms/admin/utlrp

4. Check for any invalid OLAPSYS objects:
SQL> select owner, object_name, object_type, status from dba_objects where status = 'INVALID' and OWNER = 'OLAPSYS' ;

5. Check OLAP components in the DBA_REGISTRY.
SQL> column comp_name format a35
SQL> SELECT comp_name, status, substr(version,1,10) as version from dba_registry;

7. Remove _system_trig_enabled=false from init.ora


8. Shutdown and restart the database normally

Migrate the Application Tier
# Prepare the source system
* Prepare the source system application tier for cloning
# Copy the source system to the target system
* Copy the application tier file system
Update the Target System
# Update environment variable
On the target system, set the environment variable LDEMULATION to elf_i386.
# Update CTXORIG.xml
Update the the value of the s_platform parameter in CTXORIG.xml from Linux to LINUX_X86-64. The CTXORIG.xml file is located in the /clone/context/apps directory of the target system. A sample entry is shown below:
LINUX_X86-64

Post-Migration
执行下列步骤配置目标系统并同步应用层和数据层
Database Tier
Refer to Section 4: Post-Migration tasks of Using Oracle E-Business Suite Release 12 with a Database Tier Only Platform on Oracle 10g Release 2 and perform the following steps.
1. Natively recompile PL/SQL code
Setting up Initialization Parameters for PL/SQL Native Compilation
This section describes the initialization parameters that are used to set PL/SQL native compilation.
* PLSQL_NATIVE_LIBRARY_DIR
* PLSQL_NATIVE_LIBRARY_SUBDIR_COUNT
* PLSQL_CODE_TYPE, ALTER SYSTEM SET PLSQL_CODE_TYPE=NATIVE

$ORACLE_HOME/plsql/spnc_commands
Run the $ORACLE_HOME/rdbms/admin/dbmsupgnv.sql script as the user SYS to update the plsql_code_type setting to NATIVE
This update must be done when the database is in UPGRADE mode
Shut down the database and restart in NORMAL mode.
ALTER SYSTEM ENABLE RESTRICTED SESSION;
$ORACLE_HOME/rdbms/admin/utlrp.sql
If for any reason the script is abnormally terminated, rerun the utlrp.sql script to recompile any remaining invalid PL/SQL modules.

Checking for PLSQL Compilation Type
SELECT TYPE, PLSQL_CODE_TYPE, COUNT(*) FROM DBA_PLSQL_OBJECT_SETTINGS
WHERE PLSQL_CODE_TYPE IS NOT NULL
GROUP BY TYPE, PLSQL_CODE_TYPE
ORDER BY TYPE, PLSQL_CODE_TYPE;
Any objects with a NULL plsql_code_type are special internal objects and can be ignored.

2. Start the new database listener
3. Implement and run AutoConfig on the database server node
cd /appsutil/scripts/.
./adautocfg.sh
4. Re-create custom database links
Application Tier
Refer to Section 2: Clone Oracle Applications Release 12 of Cloning Oracle Applications Release 12 with Rapid Clone and perform the following steps.
* Configure the target system
o Configure the target system application tier server nodes
cd /clone/bin
perl adcfgclone.pl appsTier
Refer to Oracle Applications Maintenance Procedures and perform the following steps using AD Administration.

1. Relink AD executables (Use AD Relink for this step)
cd /d01/oracle/VIS/apps/apps_st/appl
. APPSVIS_demo2.env
adrelink.sh force=y backup_mode=all "ad adadmin" "ad adadminnew" "ad adadmin_wrapper" "ad adaimgr" "ad adchkdig" "ad adctrl" "ad adctrlnew" "ad adctrl_wrapper" "ad addefgen" "ad addmimp" "ad adgenhnm" "ad adgetreg" "ad adident" "ad adjava" "ad adjkey" "ad admrgpch" "ad adncnv" "ad adodfcmp" "ad adpatch" "ad adpatchnew" "ad adpatch_wrapper" "ad adprmkey" "ad adpwmask" "ad adrebase" "ad adregenv" "ad adsplice" "ad adsplicenew" "ad adsplice_wrapper" "ad adsstart" "ad adurs" "ad adwait" "ad adworker" "ad adxerr.pl"
2. Relink Applications programs
adadmin
'Shut down servers
'go to the Maintain Applications Files
'menu. Then, choose the "Relink Applications programs" task
Product library for product "izu" not found
3. Generate message files

4. Generate form files
5. Generate report files
6. Generate product JAR files

Refer to Section 3: Finishing Tasks of Cloning Oracle Applications Release 12 with Rapid Clone and perform the following steps.

1. Update profile options
2. Update printer settings
3. Update Workflow configuration settings
if the following error is received
ORA-04063: rule set "APPLSYS.WF_DEFERRED_R" has errors
ORA-06512: at ""
solution:
sqlplus applsys/
declare
lagent sys.aq$_agent;
subscriber_exist exception;
pragma EXCEPTION_INIT(subscriber_exist, -24034);
begin
lagent := sys.aq$_agent('WF_DEFERRED',null,0);
dbms_aqadm.add_subscriber(queue_name=>'APPLSYS.WF_DEFERRED',subscriber=>lagent,rule=>'1=1');
exception
when subscriber_exist then
-- just add the rule if subscriber exists
dbms_aqadm.alter_subscriber(queue_name=>'APPLSYS.WF_DEFERRED',subscriber=>lagent,rule=>'1=1');
end;
/
4. Verify APPLCSF variable setting
5. Update the SESSION_COOKIE_DOMAIN value in ICX_PARAMETERS