补充(2010-01-12,安装过程中,需要根据实际情况选择NLS_LANG (AL32UTF8 或者 ZHS16GBK),
因为后续在需要逻辑导出导入dmp文件进行数据备份恢复时需要指定如下字符集,便于避免数据乱码的情况
export NLS_LANG=american_america.ZHS16GBK
如果出现乱码,可以按照如下命令修改:
./bin/sqlplus /nolog
conn /as sysdba
shutdown immediate
startup mount
alter system enable restricted session;
alter system set job_queue_processes=0;
alter system set aq_tm_processes=0;
alter database open;
alter database character set internal_use ZHS16GBK;
ALTER DATABASE NATIONAL CHARACTER SET INTERNAL_USE AL16UTF16;
shutdown immediate
startup
之后会发现已经生效:
SQL> select name,value$ from props$ where name like '%CHARACTER%';
NAME
------------------------------
VALUE$
------------------------------------------------------------------------------
logger: Warning: Database instance "SUNORA" already started.
logger: Warning: Database instance "SUNORA" possibly left running when system went down (system crash?).
logger: Action: Notify Database Administrator.
SQL*Plus: Release 10.2.0.1.0 - Production on Tue Jan 27 19:33:43 2009
Copyright (c) 1982, 2005, Oracle. All rights reserved.
SQL> Connected.
SQL> ORACLE instance shut down.
SQL> Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL*Plus: Release 10.2.0.1.0 - Production on Tue Jan 27 19:33:44 2009
Copyright (c) 1982, 2005, Oracle. All rights reserved.
SQL> Connected to an idle instance.
SQL> ORACLE instance started.
Total System Global Area 268435456 bytes
Fixed Size 1218892 bytes
Variable Size 92276404 bytes
Database Buffers 171966464 bytes
Redo Buffers 2973696 bytes
ORA-01013: user requested cancel of current operation
SQL> Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
./dbstart: Database instance "SUNORA" warm started.
,即:数据库未正常启动。
需要修改 dbstart:
[oracle@magic ~]$ vim $ORACLE_HOME/bin/dbstart
查找:
# Set this to bring up Oracle Net Listener
ORACLE_HOME_LISTNER=/ade/vikrkuma_new/oracle
应该是在78行,将其改为:
# Set this to bring up Oracle Net Listener
ORACLE_HOME_LISTNER=$ORACLE_HOME
,然后修改:oratab
[root@magic home]$ vim /etc/oratab
将最后的N改为Y:
SUNORA:/home/oracle/database:Y
LSNRCTL for Linux: Version 10.2.0.1.0 - Production on Sat Apr 25 10:27:35 2009
Copyright (c) 1991, 2005, Oracle. All rights reserved.
TNS-01106: Listener using listener name LISTENER has already been started
[oracle@magic bin]$ ./dbstart
Processing Database instance "SUNORA": log file /home/oracle/database/startup.log
[oracle@magic bin]$ ./sqlplus /nolog
SQL*Plus: Release 10.2.0.1.0 - Production on Sat Apr 25 10:28:06 2009
Copyright (c) 1982, 2005, Oracle. All rights reserved.
SQL> conn
Enter user-name: sys/您的DBA密码@SUNORA as sysdba
Connected.
启动完毕。现在就可以打开浏览器,通过http://localhost:1158/em/来访问oracle企业管理器了,或者通过sqlplus登录oracle,如:
SQL> select * from v$version ;
BANNER
----------------------------------------------------------------
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod
PL/SQL Release 10.2.0.1.0 - Production
CORE 10.2.0.1.0 Production
TNS for Linux: Version 10.2.0.1.0 - Production
NLSRTL Version 10.2.0.1.0 - Production
6、注意事项
前面开始安装时候,注意要把环境变量导出为en_US,否则安装界面会乱码,然后安装时候要加上参数-ignoreSysPreReqs,否则需要修改centos发行名称/etc/redhat-release。
另外如果已经安装了tomcat,端口8080与于oracle自带的tomcat的端口冲突,需要修改tomcat的端口配置,或者修改oracle,在sqlplus下用sys as sysdba登录后执行:
SQL> -- Change the HTTP/WEBDAV port from 8080 to 8081
SQL> call dbms_xdb.cfg_update(updateXML(dbms_xdb.cfg_get() , '/xdbconfig/sysconfig/protocolconfig/httpconfig/http-port/text()', 8081));
Call completed.
SQL> -- Change the FTP port from 2100 to 2111
SQL> call dbms_xdb.cfg_update(updateXML(dbms_xdb.cfg_get() , '/xdbconfig/sysconfig/protocolconfig/ftpconfig/ftp-port/text()', 2111));