--创建临时表空间 CREATE TEMPORARY TABLESPACE tjtemp TEMPFILE 'D:\oracle\product\10.2.0\oradata\orcl\tjtemp.dbf' SIZE 32M AUTOEXTEND ON NEXT 32M MAXSIZE 2048M EXTENT MANAGEMENT LOCAL;
--创建用户表空间 CREATE TABLESPACE nsjx LOGGING DATAFILE 'D:\oracle\product\10.2.0\oradata\orcl\nsjx.DBF' SIZE 32M AUTOEXTEND ON NEXT 32M MAXSIZE 2048M EXTENT MANAGEMENT LOCAL;
--创建用户并赋权限 CREATE USER nsjx IDENTIFIED BY "12345678" DEFAULT TABLESPACE nsjx TEMPORARY TABLESPACE tjtemp;
grant dba, connect,resource to nsjx
--查看所有用户 SELECT * FROM DBA_USERS; SELECT * FROM ALL_USERS; SELECT * FROM USER_USERS;
--查看用户系统权限 SELECT * FROM DBA_SYS_PRIVS; SELECT * FROM USER_SYS_PRIVS;
--导出数据库(指定用户) exp tzjx/12345678@127.0.0.1/orcl file=F:\tzjx.dmp from owner=tzjx
--导入数据库 imp tzjx/12345678@orcl file=E:\tzjx.dmp full=y