Oracle XE Note

10:11 2015/11/30

Oracle Database 11g Express Edition Release 11.2.0.2.0 - 64bit Production
安装时sys和system的管理密码设成了/,造成syatem在sqldeveloper可以登录而用sql命令行无法登录。改成a。
create user chris identified by c;
grant connect,resource to chris;
alter user hr account unlock;
alter user hr identified by h;
Create Application Express Workspace
Database Username : HR
Application Express Username : hr_apex
Value Required Password : e
Value Required Confirm Password : e


14:53 2015/12/9
PLSQL会使用:
TNS_ADMIN D:\db\tns
NLS_LANG SIMPLIFIED CHINESE_CHINA.ZHS16GBK
NLS_DATE_FORMAT YYYY-MM-DD HH24:MI:SS
NLS_TIMESTAMP_FORMAT YYYY-MM-DD HH24:MI:SS.FF3
nls_timestamp_tz_format yyyy-mm-dd HH24:MI:SS.FF3 TZR

sqldeveloper和toad都不用。
NLS_DATE_FORMAT 应该不能带.FF6,造成sqlplus和plsql、toad一连接就闪退。

sqldeveloper内设置使用32位C:\instantclient_12_1
toad自动使用系统安装的64位oracleXE作为ORACLE_HOME:C:\oraclexe\app\oracle\product\11.2.0\server
toad使用的tns文件也是找TNS_ADMIN环境变量目录
toad时间格式在View/toad options/Data Grids/Data,精度默认6位没法改

PLSQL连接断开卡住的问题,Tools->Preferences->connection:勾选check connection
toad也会卡一下,应该是check connection之后重连,而不是保持。
tools->Preferences->Files->backup选择disabled
关掉不需要的view之后,window->save layout
默认只执行当前语句,tools->Preferences-->Window types-->sql window:勾选AutoSelect Statement

20160330
估计安装时选择的字符集是SIMPLIFIED CHINESE_CHINA.AL32UTF8
从SIMPLIFIED CHINESE_CHINA.ZHS16GBK的oracle服务器导char类型带中文的值过来会超长;GBK中文2字节,UTF8中文3字节
create tablespace ESB
  logging
  datafile 'C:\oraclexe\app\oracle\oradata\XE\ESB.dbf'
  size 1M
  autoextend on
  next 1M maxsize 64M
extent management local;
create user esb identified by esb default tablespace esb;
grant connect,resource to esb;
修改dmp文件,notepad++正则替换,TABLESPACE "\w*" 替换为空,
INITIAL \d* NEXT \d*全部替换成INITIAL 64K NEXT 64K,数据超长的VARCHAR2字段定义加长。
drop tablespace esb including contents and datafiles;
序列和存储过程不在表空间里

drop user pay cascade;
notepadd++正则查找:INITIAL (?!65536 )\d*和NEXT (?!1048576)\d*

$exp usera/pass@orcl file=e:\userb_20160328.dmp owner=(userb)
$imp usera/[email protected]/orc file=e:\userb_20160329.dmp fromuser=userb touser=userc
conn usera/[email protected]/serv
disconn
create database link usera
  connect to usera identified by pass
  using '10.0.0.0:1521/orcl';
$exp遇到EXP-00106,drop database link usera;
修改主机名要改C:\oraclexe\app\oracle\product\11.2.0\server\network\admin\listener.ora

猜你喜欢

转载自areca3.iteye.com/blog/2287634