oracle的一些命令

2021-04-13 23:26:54 字數 1346 閱讀 6508

create tablespace *** datafile '/data/***00.dbf' size 500m;

create user *** identified by passwd default tablespace tbs_*** temporary tablespace temp;

create table *** (id integer, name varchar2(255));

create index idx_***_col on ***(col_name) tablespace indx;

create table *** partition by range(id)(

partition ***_part_01 values less than(1000)  tablespace tbs_***,

partition ***_part_02 values less than(2000) tablespace tbs_***

) pctfree 1 pctused 2 initrans 1 maxrans 250 storage ( initial 64k next 100m minextents 1 maxextents 500 pctincrease 0) as select * from ***_c ;

create index idx_***_id on ***(id) tablespace indx global partition by range(id)();

alter user *** identified by passwd;

alter tablespace *** online/offline;

alter tablespace *** add datafile '/data/***01.dbf' size  100m;

alter tablespace *** datafile '/data/***01.dbs' resize 1000m;

alter tablespace *** default storage(initextent 100m nextextent 100m minextent 1 maxextent 250 pctincrease 0);

alter rollback segment rbs0 offline;

alter table *** add column_name varchar2(255) ;

alter table *** modify column_name varchar2(300);

alter table *** drop column_name;

alter index *** rebuild;

alter table *** move tablespace tbs_***;

關於oracle的一些命令

select userenv language from dual 檢視當前資料庫所用的字符集 select from v nls parameters 或者 select from nls database parameters 或者 select userenv language from du...

oracle的一些SQL命令

第四章 1 邏輯備份 1 必備引數 exp system abc123 file d b.dmp 該命令並未指定登陸到哪個資料庫例項,因此,將使用系統環境變數 oracle sid 所指定的資料庫例項。2 owner 引數 exp system abc123 owner test,oracle fi...

Oracle 中的一些命令

檢視當前使用者所屬的表空間 select tablespace name from user tablespaces 檢視資料庫所有的表空間 檢視的使用者得有檢視的許可權 select tablespace name from dba tablespaces 檢視使用者的表空間配額 select f...