使用XE的EPG后的新问题

使用XE的EPG后与原先使用Apache比较,产生新的问题:

1, XE 不支持db,tnslistener服务中网络帐号登录启动;

解决方法:修改程序中所有direcotry为本地目录,修改服务以Local Account登录。启动;

2, 默认不支持网络访问8080端口;

解决方法:参见

http://forums.oracle.com/forums/thread.jspa?messageID=4087000

增加8080端口后的listener.ora,黑体部分:

LISTENER =

(DESCRIPTION_LIST =

(DESCRIPTION =

(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE))

(ADDRESS = (PROTOCOL = TCP)(HOST =127.0.0.1)(PORT = 1521))

)

(DESCRIPTION=

(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=8080))(Presentation=HTTP)(Session=RAW)

)

)

3, Image是存在数据库的,原来放入images下客制的图片,在apex中ilogo.gif无法显示;

解决方法:设置xml db的ftp来上传。参见http://daust.blogspot.com/2006/03/where-are-images-of-application.html

打开IE,File, Open, Open as Folder 打开http://localhost:8080/i,以Oracle的system及密码登录即可。

或者建立FTP:

[@more@]

使用XE的EPG后与原先使用Apache比较,产生新的问题:

1, XE 不支持db,tnslistener服务中网络帐号登录启动;

解决方法:修改程序中所有direcotry为本地目录,修改服务以Local Account登录。启动;

2, 默认不支持网络访问8080端口;

解决方法:参见

http://forums.oracle.com/forums/thread.jspa?messageID=4087000

增加8080端口后的listener.ora,黑体部分:

LISTENER =

(DESCRIPTION_LIST =

(DESCRIPTION =

(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE))

(ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521))

)

(DESCRIPTION=

(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=8080))(Presentation=HTTP)(Session=RAW)

)

)

3, Image是存在数据库的,原来放入images下客制的图片,在apex中ilogo.gif无法显示;

解决方法:设置xml db的ftp来上传。参见http://daust.blogspot.com/2006/03/where-are-images-of-application.html

打开IE,File, Open, Open as Folder 打开http://localhost:8080/i,以Oracle的system及密码登录即可。

或者建立FTP:

(1) Enable FTP access to the database:

www:oraclexe[XE]> sqlplus system@xe

SQL*Plus: Release 10.2.0.1.0 - on Sun Mar 19 22:20:36 2006

Copyright (c) 1982, 2005, Oracle. All rights reserved.

Enter password:

Connected to:

Oracle Database 10g Express Edition Release 10.2.0.1.0

SQL> exec dbms_xdb.setftpport('2100');

PL/SQL procedure successfully completed.

SQL> alter system register;

System altered.

SQL> select dbms_xdb.getftpport as "FTP-Port" from dual;

FTP-Port

----------

2100

SQL> exit

(2) Modify the files via FTP:

www:oraclexe[XE]> ftp localhost 2100

Connected to localhost.localdomain.

220- www

Unauthorised use of this FTP server is prohibited and may

be subject to civil and criminal prosecution.

220 www FTP Server (Oracle XML DB/Oracle Database) ready.

Name (localhost:oraclexe): system

331 pass required for SYSTEM

Password:

230 SYSTEM logged in

Remote system type is Unix.

ftp> cd i/themes

250 CWD Command successful

ftp> dir

200 PORT Command successful

150 ASCII Data Connection

-rw-r--r-- 1 SYS oracle 3075 OCT 10 03:41 generic_list.gif

-rw-r--r-- 1 SYS oracle 1307 OCT 10 03:41 generic_nochild.gif

-rw-r--r-- 1 SYS oracle 1463 OCT 10 03:41 generic_open.gif

drw-r--r-- 2 SYS oracle 0 OCT 10 03:41 opal

drw-r--r-- 2 SYS oracle 0 OCT 10 03:41 otn

-rw-r--r-- 1 SYS oracle 216 OCT 10 03:41 rollup_minus_dgray.gif

-rw-r--r-- 1 SYS oracle 215 OCT 10 03:41 rollup_plus_dgray.gif

drw-r--r-- 2 SYS oracle 0 OCT 10 03:41 theme_1

drw-r--r-- 2 SYS oracle 0 OCT 10 03:41 theme_10

drw-r--r-- 2 SYS oracle 0 OCT 10 03:41 theme_11

drw-r--r-- 2 SYS oracle 0 OCT 10 03:41 theme_12

drw-r--r-- 2 SYS oracle 0 OCT 10 03:41 theme_2

drw-r--r-- 2 SYS oracle 0 OCT 10 03:41 theme_3

drw-r--r-- 2 SYS oracle 0 OCT 10 03:41 theme_4

drw-r--r-- 2 SYS oracle 0 OCT 10 03:41 theme_5

drw-r--r-- 2 SYS oracle 0 OCT 10 03:41 theme_6

drw-r--r-- 2 SYS oracle 0 OCT 10 03:41 theme_7

drw-r--r-- 2 SYS oracle 0 OCT 10 03:41 theme_8

drw-r--r-- 2 SYS oracle 0 OCT 10 03:41 theme_9

226 ASCII Transfer Complete

ftp> bye

221 QUIT Goodbye.

www:oraclexe[XE]>

(3) Disable FTP access for security:

www:oraclexe[XE]> sqlplus system@xe

SQL*Plus: Release 10.2.0.1.0 - on Sun Mar 19 22:24:28 2006

Copyright (c) 1982, 2005, Oracle. All rights reserved.

Enter password:

Connected to:

Oracle Database 10g Express Edition Release 10.2.0.1.0

SQL> exec dbms_xdb.setftpport('0');

PL/SQL procedure successfully completed.

SQL> alter system register;

System altered.

SQL> exit

4, txt数据产生后,encoding为utf8,中行网银无法识别;

临时解决方法:另存txt文件Encoding改UTF8为ANSI编码后上传。

永久解决方法:安装XE Universal版的后遗症就是characterset无法在安装时选择,默认是:

http://download.oracle.com/docs/cd/B25329_01/doc/install.102/b25143/toc.htm#BABJACJJ

select * from v$nls_parameters;

NLS_CHARACTERSET

AL32UTF8

NLS_NCHAR_CHARACTERSET

AL16UTF16

以前10G是用ZHS16GBK,产生的text文件是属于ANSI的,现在先进了,属于UTF8了,倒麻烦了。

如果要进行Character Set Migration : http://download.oracle.com/docs/cd/B19306_01/server.102/b14225/ch11charsetmig.htm#sthref1441

这是整个数据库的改变,动作太大,可以考虑使用CONVERT函数来解决字符集编码问题。由于AL32UTF8是属于UNICODE范围,在生成的text文件后,encoding就是UTF8和数据库保持一致。想产生ANSI编码的文件,就要UTL_FILE写入字符串时用ZHS16CGB231280,ZHS16GBK这两种常用的中文ANSI编码。CONVERT就能达到这个目的。参见以下Oracle SQL Reference:

CONVERT

Syntax

Purpose

CONVERT converts a character string from one character set to another. The datatype of

the returned value is VARCHAR2.

■ The char argument is the value to be converted. It can be any of the datatypes

CHAR, VARCHAR2, NCHAR, NVARCHAR2, CLOB, or NCLOB.

■ The dest_char_set argument is the name of the character set to which char is

converted.

■ The source_char_set argument is the name of the character set in which char

is stored in the database. The default value is the database character set.

Both the destination and source character set arguments can be either literals or

columns containing the name of the character set.

For complete correspondence in character conversion, it is essential that the

destination character set contains a representation of all the characters defined in the

source character set. Where a character does not exist in the destination character set, a

replacement character appears. Replacement characters can be defined as part of a

character set definition.

Examples

The following example illustrates character set conversion by converting a Latin-1

string to ASCII. The result is the same as importing the same string from a

WE8ISO8859P1 database to a US7ASCII database.

SELECT CONVERT('Ä Ê Í Õ Ø A B C D E ', 'US7ASCII', 'WE8ISO8859P1')

FROM DUAL;

CONVERT('ÄÊÍÕØABCDE'

---------------------

A E I ? ? A B C D E ?

Common character sets include:

■ US7ASCII: US 7-bit ASCII character set

■ WE8DEC: West European 8-bit character set

■ F7DEC: DEC French 7-bit character set

■ WE8EBCDIC500: IBM West European EBCDIC Code Page 500

■ WE8ISO8859P1: ISO 8859-1 West European 8-bit character set

■ UTF8: Unicode 4.0 UTF-8 Universal character set, CESU-8 compliant

■ AL32UTF8: Unicode 4.0 UTF-8 Universal character set

唯一要注意的就是,使用时 dest_char_set在前,source_char_set在后。因此,很容易在过程中加上:

v_charset VARCHAR2(30);

begin

SELECT VALUE INTO V_CHARSET --v_charset will be AL32UTF8

FROM V$NLS_PARAMETERS

WHERE PARAMETER='NLS_CHARACTERSET';

SELECT CONVERT(V_FINALTXT,'ZHS16GBK',v_charset)

INTO VC_FINALTXT FROM DUAL;

UTL_FILE.PUT_LINE(v_fh, vc_finaltxt);

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/1513/viewspace-1031795/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/1513/viewspace-1031795/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值