日期:2014-05-16  浏览次数:20455 次

通过命令行创建Oracle数据库

临时表空间
CREATE SMALLFILE TEMPORARY TABLESPACE LWTEMP
TEMPFILE 'E:\oracle\product\10.1.0\oradata\tms\LWtemp'
SIZE 50M AUTOEXTEND ON NEXT 10M MAXSIZE UNLIMITED
EXTENT MANAGEMENT LOCAL UNIFORM SIZE 1M;
创建用户
CREATE USER LW PROFILE DEFAULT IDENTIFIED BY LW DEFAULT TABLESPACE LW TEMPORARY TABLESPACE LWTEMP ACCOUNT UNLOCK;
授权
GRANT UNLIMITED TABLESPACE TO LW;
GRANT CONNECT TO LW;
GRANT DBA TO LW;

导入数据库
imp LW/LW@tms file=d:\dsd.dmp fromuser=zxut touser=LW
RELEASE_DSD
RELEASE_DSD

表空间
CREATE SMALLFILE TABLESPACE LW
DATAFILE 'E:\oracle\product\10.1.0\oradata\tms\LW'
SIZE 80M AUTOEXTEND ON NEXT 10M
MAXSIZE UNLIMITED LOGGING EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO;
临时表空间
CREATE SMALLFILE TEMPORARY TABLESPACE LWTEMP
TEMPFILE 'E:\oracle\product\10.1.0\oradata\tms\LWtemp'
SIZE 50M AUTOEXTEND ON NEXT 10M MAXSIZE UNLIMITED
EXTENT MANAGEMENT LOCAL UNIFORM SIZE 1M;
创建用户
CREATE USER LW PROFILE DEFAULT IDENTIFIED BY LW DEFAULT TABLESPACE LW TEMPORARY TABLESPACE LWTEMP ACCOUNT UNLOCK;
授权
GRANT UNLIMITED TABLESPACE TO LW;
GRANT CONNECT TO LW;
GRANT DBA TO LW;