1. 创建表空间: BEGIN DECLARE cnt integer := 0; BEGIN SELECT 1 INTO cnt FROM dual WHERE exists(SELECT * FROM user_tablespaces WHERE tablespace_name = UPPER(TRIM('TEST'))); IF cnt != 0 THEN DECLARE s VARCHAR2(500); BEGIN s := 'DROP TABLESPACE TEST INCLUDING
Oracle 使用时间长了, 新增了许多user 和tablespace. 需要清理一下 对于单个user和tablespace 来说, 可以使用如下命令来完成. 步骤一: 删除user drop user ×× cascade 说明: 删除了user,只是删除了该user下的schema objects,是不会删除相应的tablespace的. 步骤二: 删除tablespace DROP TABLESPACE tablespace_name INCLUDING CONTENTS AND D
CREATE TABLESPACE dna36 DATAFILE 'D:\oracle\oradata\orcl\dna36.dbf' SIZE 100M AUTOEXTEND ON NEXT 10M maxsize unlimited;CREATE USER dna36 IDENTIFIED BY dna36 DEFAULT TABLESPACE dna36;GRANT CONNECT, RESOURCE, CREATE VIEW TO dna36;GRANT dba TO dna36;