Created
December 13, 2012 06:14
-
-
Save xiangjian/4274478 to your computer and use it in GitHub Desktop.
Oracle DBA table space
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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