Skip to content

Instantly share code, notes, and snippets.

@xiangjian
Created December 13, 2012 06:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xiangjian/4274478 to your computer and use it in GitHub Desktop.
Save xiangjian/4274478 to your computer and use it in GitHub Desktop.
Oracle DBA table space
CREATE USER PCEDM_DM IDENTIFIED BY PDM123
DEFAULT TABLESPACE epdms
TEMPORARY TABLESPACE temp
QUOTA UNLIMITED ON epdms;
GRANT CREATE SESSION to PCEDM_DM;
GRANT CREATE SYNONYM TO PCEDM_DM;
GRANT CREATE PROCEDURE TO PCEDM_DM;
GRANT CREATE TABLE TO PCEDM_DM;
GRANT CREATE VIEW TO PCEDM_DM;
set ORACLE_SID=ORCL
sqlplus /nolog
conn / as sysdba
查询空闲表空间
select tablespace_name,file_id,block_id,bytes,blocks from dba_free_space;
查询表空间
select tablespace_name,file_id,bytes,file_name from dba_data_files;
增加表空间
alter database [datafile] resize 800M;
增加表空间
create tablespace epdms
datafile 'D:\EPDMS\oracle\oradata\epdms\epdms.dbf' size 128M
autoextend on
next 128M
maxsize 1024M;
更改表
alter tablespace sales add
datafile '/home/app/oracle/oradata/oracle8i/sales02.dbf' size 800M
autoextend on next 50M
maxsize 1000M;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment