Oracle常用命令

-- 查看db文件存储目录
select * from dba_data_files;

-- 创建用户及表空间

create temporary tablespace DB_TEMP
tempfile 'D:\app\hudson_user\oradata\DB_TEMP.dbf'
size 400m
autoextend on
next 200m maxsize unlimited
extent management local;
create tablespace DB
logging
datafile 'D:\app\hudson_user\oradata\DB.dbf'
size 800m
autoextend on
next 400m maxsize unlimited
extent management local;

create tablespace DBINDEX
logging
datafile 'D:\app\hudson_user\oradata\DBNDEX.dbf'
size 400m
autoextend on
next 200m maxsize unlimited
extent management local;

create user username identified by password
default tablespace DB
temporary tablespace DB_TEMP;

grant create session to username;
grant select any dictionary to username;
grant create any table, create any procedure to username;
grant unlimited tablespace to username;
grant exp_full_database to username;
grant imp_full_database to username;

你可能感兴趣的:(Oracle常用命令)