- 浏览: 27141 次
- 性别:
- 来自: 北京
最新评论
1. tablespace,segment,extent,block
tablespace: database logical is divided into more tablesapces.
segment: a special storage structure(table,index),span more datafiles
extents:allocate unit
block: use unit,write/read unit
db_block_size, default block size. standand block size,system tablespace use.
db_nk_block_size,not standand block size, other tablespace
Any given tablespace will have a consistent block size
any given segment(which is contained in a tablespace) will consist of blocks of exactly the same size
head,table directory,row directory,free,data
2.Tablespace Mangement
LocaL: use bit map
Dictionary: rescusive sql, result in update,insert sql to dictionary
3. create tablespace myts1
datafile '/u01/oradata/lsh/myts1.dbf' size 100m
extent management local uniform size 10k;
create tablespace myts2
datafile '/u01/oradata/lsh/myts2.dbf' size 100m
extent management local autoallocate;
create tablespace myts3
datafile '/u01/oradata/lsh/myts3.dbf' size 100m
extent management dictionary
default storage(
initial 10k
next 10k
pctincrease 10%
maxextent 100m
)
alter tablespace myts3 minimum extent 10k;
alter tablespace myts3
default storage(
initial 10k
next 10k
);
drop tablespace myts1 including contents and datafiles;
resize tablespace
alter database datafile '/u01/oradata/lsh/myts1.dbf' autoextend on next 10m maxsize 100m;
alter database datafile '/u01/oradata/lsh/myts1.dbf' resize 100m;
alter tablespace myts1 add datafile '/u01/oradata/lsh/myts1_1.dbf' size 100m;
rename datafile
alter tablespace myts1 offline;
!cp dest one to one dest
alter tablespace myts1 rename datafile '/u01/oradata/lsh/myts1.dbf' to '/u01/oradata/lsh/myts2.dbf ';
shutdown immediate
!cp one dest to one dest
start mount;
alter database rename file '' to '';
4 status of tablespace
online/offline control access data
read only drop objects
5.System , undo ,temporary tablespace
System tablespace: created by create database or dbca
store data dictionary and system rollback segments
can not be offline
can not be delete
in oracle 9i,using dbca create database ,system tablespace is local,other tablespace must be local.
if system is local ,defualt temporary tablespace must define.
undo tablespace: store undo segment.
local management
current use undo tablespace can not be delete
current use undo tablesapce can not be offline
create undo tablespace myundo datafile '/u01/oradata/lsh/myundo.dbf' size 100m;
temporary tablespace: store temporary segment
default temporary tablespace can not be delete ,offline
create temporary tablespace mytemp tempfile '/u01/ordata/lsh/mytemp.dbf' size 100m;
alter database default temporary tablespace mytemp;
发表评论
-
from string get number data using pl/sql or sql
2012-02-16 17:32 888declare @aa varchar(80),--- ... -
SQL
2012-02-15 18:01 7241.select sal salary from emp; ... -
modify ip
2012-02-10 17:45 7911.netconfig 2./etc/sysconfig/n ... -
MULTI dbwr or io slaves
2012-02-10 15:21 878thanks dukope of itpub. ... -
FAQS
2012-02-09 15:59 7531.How can I get the largest amo ... -
HOW TO STUDY ORACLE FROM Yong Huang
2012-01-18 14:48 798Assuming you want to study orac ... -
RMAN
2012-01-14 17:07 7031.components of the rman ... -
INSTANCE and CRASH RECOVERY
2012-01-12 10:12 7481.type of checkpoint full c ... -
STARTUP PFILE=
2011-12-31 14:11 11951.vi initdbs.ora spfile=&quo ... -
MANAGE TABLE
2011-12-26 16:50 5671.heap table IOT PARTI ... -
MONITOR redo size
2011-12-21 17:48 6421.set autot on stat 2.unsin ... -
What do rollback and commit
2011-12-21 11:21 738When we COMMIT, all that is lef ... -
What is the schema ?
2011-12-20 15:18 588A schema is a collection of dat ... -
MANAGE UNDOTABS
2011-12-19 17:15 6771.manual undo_management=ma ... -
DBA SQL
2011-12-19 15:21 4351.select a.name,b.status from v ... -
SEGMENT EXTENTS ORACLEBLOCK
2011-12-15 16:11 7881.SEGMENT: allocated fo ... -
ORACLE NET
2011-12-12 09:49 6841.net_service_name: servive ... -
SQLPLUS TIPS
2011-12-09 17:51 9031.SQLPLUS : a tool that execute ... -
ORACLE ENVIRONMENT VARIABLES
2011-12-09 17:15 652ORACLE_HOME ORACLE_SID : or ... -
Exam Test1
2011-12-09 16:18 6341.utl_file_dir: indicate the di ...
相关推荐
rlv方式增加oracle tablespace datafile
drop user oldoa cascade create tablespace tbsoa DATAFILE 'F:\app\Administrator\oradata\orcl\tbsoa.dbf' size 1024m autoextend on next 30m;...成为 drop tablespace mytbs01 including contents and datafiles;
DROP TABLESPACE ELWY_TEMP INCLUDING CONTENTS AND DATAFILES; -- 创建临时表空间 CREATE TEMPORARY TABLESPACE ELWY_TEMP TEMPFILE 'E:\DataBase\Oracle\ELWY_TEMP.DBF' SIZE 100m AUTOEXTEND ON NEXT 50m ...
### CREATE TABLESPACE 命令详解 在数据库管理中,`CREATE TABLESPACE` 命令是用于创建新的表空间的基础指令。表空间是数据库逻辑存储结构中的一个基本单位,用于存储数据文件、索引等数据库对象。通过合理地规划和...
DROP TABLESPACE mytablespace INCLUDING CONTENTS AND DATAFILES; ``` 这将删除`mytablespace`及其所有数据文件和其中的对象。 关于【标签】中的"源码",在Oracle数据库中,虽然创建表空间和用户通常通过SQL语句...
DROP TABLESPACE mytbs INCLUDING CONTENTS AND DATAFILES; 修改数据文件可以使用 ALTER DATABASE 语句,例如修改名为 mytbs 的数据文件的大小为 100MB: ALTER DATABASE RENAME FILE 'E:\oracledata\mydatafile....
--DROP TABLESPACE MEDEXECGTYY INCLUDING CONTENTS AND DATAFILES; CREATE TABLESPACE MEDEXECGTYY DATAFILE 'E:\Oracle\MEDEXECGTYY.dbf' SIZE 20480M AUTOEXTEND OFF LOGGING ONLINE PERMANENT EXTENT ...
SQL> DROP TABLESPACE TESTEXP INCLUDING CONTENTS AND DATAFILES; ``` 8. **重新配置用户**: 修改用户`TESTEXP`的默认表空间为`USERS`: ```sql SQL> CREATE USER TESTEXP IDENTIFIED BY TESTEXP DEFAULT ...
DROP TABLESPACE tablespace_name INCLUDING CONTENTS AND DATAFILES; ``` 例如: ```sql DROP TABLESPACE sales INCLUDING CONTENTS AND DATAFILES; ``` ### 七、查看表空间使用情况 - 查看每个表空间的总...
DROP TABLESPACE tablespace_name INCLUDING CONTENTS AND DATAFILES CASCADE CONSTRAINTS; ``` - `tablespace_name`:要删除的表空间名称。 #### 3.2 删除表空间示例 删除名为`wbppcs`的表空间: ```sql DROP ...
DROP TABLESPACE '表空间' INCLUDING CONTENTS AND DATAFILES; ``` **扩展表空间**是数据库成长过程中常见的需求。当表空间空间不足时,可以通过增加数据文件或扩大现有数据文件的大小来扩展。例如: ```sql ALTER ...
DROP TABLESPACE <tablespace_name> INCLUDING CONTENTS AND DATAFILES; ``` - **参数解释:** - `<tablespace_name>`: 要删除的表空间名称。 - `INCLUDING CONTENTS AND DATAFILES`: 同时删除表空间中的所有...
9. **删除表空间**:需先删除其中的所有对象,然后使用`DROP TABLESPACE INCLUDING CONTENTS AND DATAFILES`,注意这会永久删除数据文件: ```sql DROP TABLESPACE demoindexts01 INCLUDING CONTENTS AND DATA...
DROP TABLESPACE tablespace_name INCLUDING CONTENTS AND DATAFILES; ``` 例如: ```sql DROP TABLESPACE sales INCLUDING CONTENTS AND DATAFILES; ``` **说明:** - `INCLUDING CONTENTS AND DATAFILES`: 移除表...