Oracle错误小记

问题1:

ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist

Linux Error: 2: No such file or directory

解决方案:

1. 查看环境变量是否设置正确,more .bash_profile

PATH=$PATH:$HOME/bin
export PATH
unset USERNAME
export LANG='AMERICAN_AMERICA.ZHS16GBK'
export ORACLE_BASE=/home/oracle
export ORACLE_HOME=$ORACLE_BASE/product/102
export ORACLE_SID=ora102
export NLS_LANG='AMERICAN_AMERICA.ZHS16GBK'
export PATH=$ORACLE_HOME/bin:/bin:/sbin:/usr/bin:/usr/ccs/bin:/usr/local/bin:/usr/ucb
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$ORACLE_HOME/network/lib:$ORACLE_HOME/oracm/lib:/usr/local/lib:/usr/lib
export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib:$ORACLE_HOME/rdbms/jlib:$ORACLE_HOME/network/jlib
export TNS_ADMIN=$ORACLE_HOME/network/admin
export TEMP=/tmp

主要是看SID和Oracle_home

2. 查看Listener状态, lsnrctl status

Services Summary...
Service "ORA102" has 2 instance(s).
  Instance "ORA102", status UNKNOWN, has 1 handler(s) for this service...
  Instance "ora102", status READY, has 1 handler(s) for this service...

3. 使用DBA,查看listener状态

SQL>    show parameter local_listener;

NAME                                 TYPE
------------------------------------ ----------------------
VALUE
------------------------------
local_listener                       

SQL> show parameter local;


NAME                                 TYPE
------------------------------------ ----------------------
VALUE
------------------------------
local_listener                       string


log_archive_local_first              boolean
TRUE

4. 设置本地listener

SQL> alter system set local_listener='(ADDRESS =(PROTOCOL=TCP)(HOST=192.168.6.193)(PORT=1521)(SID=ORA102))';                            
System altered.
SQL>  alter system register;
System altered.

5. 重新登录即可。

问题2:

ORA-02195: Attempt to create PERMANENT object in a TEMPORARY tablespace

从这个错误来看,导入数据库时,需要导入到一个tablespace而不是tempspace,那么创建一个导入所需的表空间即可

CREATE TABLESPACE DATALIST datafile  '/tmp/datalist.data' SIZE 500M REUSE AUTOEXTEND ON  NEXT 100M MAXSIZE unlimited EXTENT MANAGEMENT LOCAL UNIFORM SIZE1M;





你可能感兴趣的:(Oracle错误小记)