用户:nr
表空间:mdm_dat
--创建表空间
create tablespace NR --表空间
datafile 'F:\Oracle\orcaleTablespace\nr' --文件路径
size 20M --分配的表空间大小
autoextend on;
create temporary tablespace NR_temp --临时表空间
tempfile 'F:\Oracle\orcaleTablespace\NR_temp'
size 5m
autoextend on;
--创建用户并指定表空间
create user nr identified by nr default tablespace NR temporary tablespace NR_temp;
--给新建用户分配权限
grant connect,resource,dba to nr ;
--给新建用户解锁
alter user nr account unlock ;
--dmp文件导入 doc下执行
imp nr/nr@orcl full=y file=D:\testDb.dmp ignore=y
exp Test/Test@8.8.8.8:1521/orcl file=C:\test.dmp log=C:\test.log owner=Test
exp nr/nr@orcl file=D:/sampleDB.dmp full=y ignore=y
exp nr/x8MiL9H2@172.22.33.197:1521/mzzw file=./nr.dmp full=y ignore=y
exp nr/nr@127.0.0.1:1521/orcl file=D:\nr.dmp full=y ignore=y
exp nr/x8MiL9H2@172.22.33.197:1521/mzzw file=./nr.dmp log=./test.log owner=nr
create tablespace eova datafile 'D:\tableSpace\eova.dbf' size 1024M
autoextend on extent management local segment space management auto;
create tablespace main datafile 'D:\tableSpace\main.dbf' size 1024M
autoextend on extent management local segment space management auto;
CREATE USER eova PROFILE "DEFAULT" IDENTIFIED BY eova DEFAULT TABLESPACE eova TEMPORARY TABLESPACE "TEMP" ACCOUNT UNLOCK;
CREATE USER main PROFILE "DEFAULT" IDENTIFIED BY main DEFAULT TABLESPACE main TEMPORARY TABLESPACE "TEMP" ACCOUNT UNLOCK;
grant dba to eova;
grant dba to main;
-----------------------------例子
create tablespace newccbiz datafile 'D:\tableSpace\newccbiz.dbf' size 1024M
autoextend on extent management local segment space management auto;
create tablespace ccbiz datafile 'D:\tableSpace\ccbizp.dbf' size 1024M
autoextend on extent management local segment space management auto;
--删除表空间
--drop tablespace newccbiz including contents and datafiles;
CREATE USER ccbiz PROFILE "DEFAULT" IDENTIFIED BY ccbiz DEFAULT TABLESPACE ccbiz TEMPORARY TABLESPACE "TEMP" ACCOUNT UNLOCK;
CREATE USER newccbiz PROFILE "DEFAULT" IDENTIFIED BY newccbiz DEFAULT TABLESPACE newccbiz TEMPORARY TABLESPACE "TEMP" ACCOUNT UNLOCK;
grant dba to ccbiz;
grant dba to newccbiz;
drop user newccbiz cascade;
------------------------------game
create tablespace NEWCCBIZZ datafile 'D:\tableSpace\NEWCCBIZZ.dbf' size 1024M
autoextend on extent management local segment space management auto;
CREATE USER newccbiz PROFILE "DEFAULT" IDENTIFIED BY newccbiz DEFAULT TABLESPACE newccbizz TEMPORARY TABLESPACE "TEMP" ACCOUNT UNLOCK;
grant dba to newccbiz;