1查找哪些用户用到了这些表空间
select USERNAME,ACCOUNT_STATUS,DEFAULT_TABLESPACE,TEMPORARY_TABLESPACE from dba_users;
2、创建同名new表空间
create temporary tablespace TBS_NRGL_TEMPNEW tempfile '/servyoudata/oracle/db11g/dbs/tbs_nrgl_tempnew_01.dbf' size 3g;
3、修改涉及到乱码表空间的用户,将其指定到新的表空间上
alter user NRBL temporary tablespace TBS_NRGL_TEMPNEW;
4、删除乱码的表空间
drop tablespace TBS_NRGL_TEMP including contents and datafiles;
2、修改终端字符编码
3、查看数据库字符编码,将其写到环境变量里面(查看当前的字符编码)
echo $LANG
export LANG=zh_CN.UTF-8
4、查看spfile文件里的参数配置,删除nls相关参数
将参数文件和密码文件放到 $ORACLE_HOME/dbs/ 下面
是根据本机器的home来启动数据库的
[oracle@oracle ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.4.0 Production on Tue Jul 5 09:32:31 2022
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup mount
ORA-00119: invalid specification for system parameter LOCAL_LISTENER
ORA-00130: invalid listener address '(ADDRESS=(PROTOCOL=tcp)(HOST=testdb)(PORT=1521))'
1、设置sid连接进去,创建pfile,最好设置路径 Create
create pfile='/home/oracle/test/initsfjhhx.ora' from spfile;
create pfile from spfile;
2、备份本地的spfilexxx.ora
mv spfiletestdb3.ora spfiletestdb3.ora_bak
3、修改*.local_listener里面的主机明,保存推出
4、登录进去create spfile from pfile,生成新的配置闻不见spfile
create spfile from pfile='/home/oracle/test/initsfjhhx.ora';
连接报错
ERROR:
ORA-12162: TNS:net service name is incorrectly specified
未设置sid
7、内存太小
[oracle@oracle dbs]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.4.0 Production on Tue Jul 5 10:24:11 2022
Copyright © 1982, 2013, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup mount
ORA-00838: Specified value of MEMORY_TARGET is too small, needs to be at least 2464M
修改spfile文件里面的 MEMORY_TARGET参数,具体操作如4里面改spfile