Oracle 使用时间长了, 新增了许多user 和tablespace. 需要清理一下 对于单个user和tablespace 来说, 可以使用如下命令来完成. 步骤一: 删除user drop user ×× cascade 说明: 删除了user,只是删除了该user下的schema objects,是不会删除相应的tablespace的. 步骤二: 删除tablespace DROP TABLESPACE tablespace_name INCLUDING CONTENTS AND D
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
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;
create user frame identified by tiger; grant create session to frame; grant create table to frame; grant create tablespace to frame; grant create view to frame; grant dba to frame; alter user frame default role DBA; create tablespace framework dataf
oracle系统用户sys,system , sysman, scott 使用system用户登录[username/password][@server][as sysdba|sysoper]eg: system/123456 @orcl as sysdba 查看当前登录用户:show user 查看数据字典中的用户select username from dba_users; 启用禁用scott账户:alter user scott account unlock;alter user scot