Oracle 上建立DB和用户

2021-07-20  本文已影响0人  UtopiaLee

创建数据库

CREATE TABLESPACE MyDataBase LOGGING DATAFILE 'D:\Oracle\database\MyDataBase.dbf' SIZE 100M AUTOEXTEND ON NEXT 32M MAXSIZE 500M EXTENT MANAGEMENT LOCAL

创建数据库临时文件

create temporary TABLESPACE MyDataBase_temp tempfile 'D:\Oracle\database\MyDataBase_temp.dbf' SIZE 100M AUTOEXTEND ON NEXT 32M MAXSIZE 500M EXTENT MANAGEMENT LOCAL

创建用户与上述两个文件形成映射关系

CREATE USER username IDENTIFIED BY password DEFAULT TABLESPACE MyDataBase TEMPORARY TABLESPACE MyDataBase_temp;

添加用户权限

grant connect,resource,dba to username;
grant create session to username;

删除数据库

conn sys/dwh as sysdba;

drop tablespace MyDataBase including contents and datafiles;

drop tablespace MyDataBase_temp including contents and datafiles;

删除用户

drop user username cascade; //通过级联的方式删除数据

用ODBC链接

是datasource=ip+"/"+实例名

上一篇下一篇

猜你喜欢

热点阅读