ORACLE 资料整理(一)创建
--创建用户并指定表空间 create tablespace testTablespace datafile 'D:\oracle\esunnet.dbf' size 10m autoextend on; create user testUser identified by testUser#1234 default tablespace esunnet; grant sysdba to testUser ; grant connect,resource to testUser ; grant create session to testUser ; ALTER USER testUser ACCOUNT UNLOCK; commit; alter user esun default tablespace testTablespace; --创建数据表空间 create tablespace testTablespace logging --上一层目录必须有 datafile 'G:\database\testTablespace.dbf' size 5m autoextend on next 5m maxsize unlimited; - *** ## 导出 *** windows 上进入plsql上使用exp命令,完全导出 C:\Users\Administrator>exp testUser/testUser#1234@10.33.114.20:1521/voice inctype=complete file=D:\testbak.dmp owner=(testUser) log=D:\explog.log imp testUser/testUser#1234@orcl fromuser=testUser touser=otherUser file=D:\Techsung.dmp buffer=102400 log=D:\explog.log imp testUser/testUser#1234@orcl file=D:\Techsung.dmp FULL=Y buffer=102400 log=D:\explog.log imp testUser/testUser#1234@orcl fromuser=testUser touser=otherUser file=D:\Techsung.dmp tables= --指定只导入那几张表(TableName1,TableName2,TableName3,TableName4) ignore=y buffer=102400 log=D:\explog.log ---------------------------------导入的时候使表不会导入到其他表空间 --收回无限使用表空间权限 REVOKE UNLIMITED TABLESPACE FROM testTablespace; --设置默认表空间: alter user EsunReport default tablespace testTablespace; --设置默认的表空间无限配额: alter user EsunReport quota unlimited on testTablespace; 设置Esunnet用户对其他表空间的quota为0 alter user testUser quota 0 on users; ---------------------------------- --给用户授予权限 grant sysdba to testUser ; grant connect,resource to testUser ; grant create session to testUser ; grant connect,dba,resource to testUser ;
plsql
–用户名
–密码
–127.0.0.1:1521/实例名
sqlplus Techsung/Techsung@127.0.0.1:1521/orcl
---------用户名/密码@配置名字
connect Techsung/Techsung@Techsung
---------用户名/密码@IP/port/实例名
sqlplus callout/test@127.0.0.1:1521/whtest
sqlplus Techsung/Techsung@127.0.0.1:1521/Techsung
sqlplus WeiXin/WeiXin@127.0.0.1:1521/WeiXin
sqlplus sys/pwd@10.31.114.2:1521/test as sysdba
imp Techsung/Techsung@127.0.0.1:1521/voice file=D:\rel\Techsung.dmp FULL=Y buffer=102400
imp WeiXin/WeiXin@127.0.0.1:1521/voice file=D:\rel\WeiXin.dmp FULL=Y buffer=102400
–用后对用户导入
imp EsunCallOut/EsunCallOut@127.0.0.1:1521/voice fromuser=Techsung touser=EsunCallOut file=D:\rel\Techsung.dmp buffer=102400
imp EsunReport/EsunReport@127.0.0.1:1521/voice touser=EsunReport file=D:\rel\Techsung.dmp FULL=Y buffer=102400
exp Techsung/Techsung inctype=complete file=D:\Techsung.dmp
exp WeiXin/WeiXin inctype=complete file=D:\rel\WeiXin.dmp
oracle修改字符集
select userenv(‘language’) from dual;
conn / as sysdba;
shutdown immediate;
startup mount;
alter system enable restricted session;
alter system set aq_tm_processes=0;
alter database open;
–alter database character set internal_use JA16SJIS;
ALTER DATABASE NATIONAL CHARACTER SET INTERNAL_USE UTF8;
shutdown immediate;
startup;
- 关于Oracle进程跟踪的资料整理
- 使用Oracle Data Integrator Studio创建资料档案库
- ORACLE 资料整理(二)性能优化
- ORACLE异常(整理网上资料)
- oracle创建表空间【整理】
- ROS_catkin创建工作空间_官网资料整理
- 【oracle资料整理】--【13】PL/SQL块
- 网络工作室暑假后第一次培训资料(ADO.NET创建访问数据集)整理
- 【oracle资料整理】--【1】ORACLE中字段的数据类型
- Oracle BIEE (Business Intelligence) 11g 11.1.1.6.0 学习(2)RPD资料档案库创建
- 【整理】Oracle创建/删除表空间
- 官方资料:Oracle 10g DBA 学习手册(精心整理,申请加精)
- 【oracle资料整理】--【14】游标
- 网络工作室暑假后第一次培训资料(ADO.NET创建访问数据集)整理 分类: ASP.NET 2012-10-05 20:10 911人阅读 评论(0) 收藏
- oracle创建表空间和用户授权相关资料集锦
- 【oracle资料整理】--【2】如何建表
- 【oracle资料整理】--【15】存储过程和函数
- 网络工作室暑假后第一次培训资料(ADO.NET创建访问数据集)整理
- oracle嵌套表--整理的学习资料
- 【oracle资料整理】--【3】如何插入修改删除数据