--1、在PLSql或者navicat等数据库客户端工具管理员账户下:建表空间
create tablespace DEMO_TABLESPACE logging datafile 'D:\Oracle\database\tablespace\demo.dbf'
size 100M autoextend on next 100M maxsize 500M extent management local;
--2、创建用户并授权
CREATE USER demo_usename IDENTIFIED BY demo_pwd
DEFAULT TABLESPACE DEMO_TABLESPACE TEMPORARY TABLESPACE temp;
GRANT CREATE SESSION TO demo_usename;--这样确保该用户可以登录数据库
GRANT CREATE TABLE TO demo_usename;--这样该用户可以创建表
grant connect to demo_usename;
grant exp_full_database to demo_usename;
grant imp_full_database to demo_usename;
grant resource to demo_usename;
grant create procedure to demo_usename;
grant create trigger to demo_usename;
grant execute any procedure to demo_usename;
grant grant any privilege to demo_usename;
grant restricted session to demo_usename;
grant select any table to demo_usename;
grant unlimited tablespace to demo_usename;
grant create any view to demo_usename;
--3、创建恢复目录
--(路径需要提前建好,注:linux上需要使用:/ )
create directory VBMCARDDUMP as 'D:\Oracle\database\dump';
grant read, write on directory VBMCARDDUMP to public;