Cmd下Oracle创建数据库
登录
C:\Users\su>sqlplus / as sysdba
ORACLE创建表空间
CREATE TABLESPACE weather LOGGING DATAFILE 'F:\oracledata\weather.dbf' SIZE 100M AUTOEXTEND ON NEXT 32M MAXSIZE 500M EXTENT MANAGEMENT LOCAL;
创建数据库临时文件
create temporary TABLESPACE weather_temp tempfile 'F:\oracledata\weather_temp.dbf' SIZE 100M AUTOEXTEND ON NEXT 32M MAXSIZE 500M EXTENT MANAGEMENT LOCAL;
为数据库文件与临时文件,创建用户
CREATE USER suser IDENTIFIED BY qawe DEFAULT TABLESPACE weather TEMPORARY TABLESPACE weather_temp;
为用户添加权限
grant connect,resource,dba to username;
grant create session to username;
删除数据库
conn sys/dwh as sysdba;
drop tablespace weather including contents and datafiles;
drop tablespace weather_temp including contents and datafiles;
删除用户
drop user suser cascade;