Oracle数据库操作

删除用户:

drop user zhwg cascade;

删除表空间:

DROP TABLESPACE ZHWG INCLUDING CONTENTS AND DATAFILES;

创建表空间:

create tablespace MONITORTBSPACE

logging

datafile 'D:\Program_Files\oracle\product\10.2.0\oradata\orcl\MONITORTBSPACE.dbf'

size 50m

autoextend on next 50m maxsize 5480m  

extent management local;

创建用户,并指定表空间:

create user zhwg identified by zhwg

default tablespace MONITORTBSPACE;

给用户授予权限:

grant connect,resource to zhwg;

导入数据:

imp system/admin@orcl file=C:\Users\yan\Desktop\ZHWG_DB\data1.dmp fromuser=monitoruser touser=zhwg ignore=y statistics=none

imp system/admin@orcl file=C:\Users\yan\Desktop\ZHWG_DB\data2.dmp fromuser=monitoruser touser=zhwg ignore=y statistics=none

导出数据:

exp monitoruser/eism@eism file=C:\Users\yan\Desktop\ZHWG_DB\data.dmp owner=username1

猜你喜欢

转载自hyan.iteye.com/blog/2047365