首页 > 代码库 > Oracle 创建 Schema

Oracle 创建 Schema

-- 查看当前已有的用户SELECT Username FROM dba_users;-- 创建临时CREATE USER gzmpc IDENTIFIED BY PASSWORD;-- 授权GRANT CREATE SESSION TO gzmpc;CREATE TABLESPACE gzmoc_wk DATAFILE gzmoc_wk.dat SIZE 10M AUTOEXTEND ON;CREATE TEMPORARY TABLESPACE gzmoc_wk_tablespace_temp TEMPFILE gzmoc_tabspace_temp.dat SIZE 5M AUTOEXTEND ON;DROP USER gzmpc;-- 开始创建数据库CREATE USER gzmpcIDENTIFIED BY PASSWORDDEFAULT TABLESPACE gzmoc_wkTEMPORARY TABLESPACE gzmoc_wk_tablespace_temp;-- 授权grant create session to gzmpc;grant create table to gzmpc;grant unlimited tablespace to gzmpc;-- 最后修改一下密码ALTER USER gzmpc IDENTIFIED BY gzmpc;

 

Oracle 创建 Schema