linux oracle

//create

create temporary tablespace EB_TEMP_TS tempfile '/u01/app/oracle/oradata/orcl/EB_TEMP_TS.DBF' size 32m autoextend on next 32m maxsize 1024m extent management local;


create tablespace EB_DATA_TS logging datafile '/u01/app/oracle/oradata/orcl/EB_DATA_TS.DBF'   size 32m autoextend on next 32m maxsize 102400m extent management local;

create tablespace EB_INDEX_TS logging datafile '/u01/app/oracle/oradata/orcl/EB_INDEX_TS.DBF'   size 32m autoextend on next 32m maxsize 1024m extent management local;


create user ebrowse  identified by ebrowse default tablespace EB_DATA_TS  temporary tablespace EB_TEMP_TS;

grant connect,resource to ebrowse;

//exp imp

imp ebrowse/ebrowse@orcl file=/usr/local/oracledata/ebrowse.dmp  full=y ignore=y log=/usr/local/oracledata/imp.log
exp system/oracle file=e:\db.dmp log=e:\db.log owner=(ebrowse)

 drop user ebrowse cascade;
 drop tablespace EB_TEMP_TS including contents and  datafiles cascade constraints;
 drop tablespace EB_DATA_TS including contents and  datafiles cascade constraints;
 drop tablespace EB_INDEX_TS including contents and  datafiles cascade constraints;
//字符集不正确 
 select userenv('language') from dual;-- SIMPLIFIED CHINESE_CHINA.ZHS16GBK


SQL>SHUTDOWN IMMEDIATE;

SQL>STARTUP MOUNT EXCLUSIVE;

SQL>ALTER SYSTEM ENABLE RESTRICTED SESSION;

SQL>ALTER SYSTEM SET JOB_QUEUE_PROCESSES=0;

SQL>ALTER SYSTEM SET AQ_TM_PROCESSES=0;

SQL>ALTER DATABASE OPEN;

SQL>ALTER DATABASE NATIONAL CHARACTER SET INTERNAL_USE UTF8;

SQL>SHUTDOWN immediate;

SQL>startup;


cat eb.dmp |od -x|head -1|awk '{print $2 $3}'|cut -c 3-6

select nls_charset_name(to_number('0345','xxxx')) from dual;

1在控制台
set NLS_LANG=SIMPLIFIED CHINESE_CHINA.ZHS16GBK

ps:后面不加引号。
2unix
         $NLS_LANG="simplified chinese"_china.zhs16gbk

         $export NLS_LANG

 

//不能连接
3 不能通过plsql连接数据库
关闭linux的防火墙。 /sbin/iptables -f

flush,-L(list)

你可能感兴趣的:(oracle,sql,c,linux,防火墙)