当前位置:网站首页>5. Oracle tablespace
5. Oracle tablespace
2022-07-05 06:22:00 【Cold leaves elegant_】
- Create a table space that is automatically partitioned under local management USERTBS1, The corresponding data file is 20m
create tablespace usertbs1 datafile 'D:\app\Snakewood\oradata\orcl\usertbs1.dbf' size 20m;

- Create a table space under local management mode USERTBS2, The size of each partition is 512K
create tablespace usertbs2 datafile 'D:\app\Snakewood\oradata\mydba\usertbs2.dbf' size 20m extent management local uniform size 512k;

- modify USERTBS1 Table space size , Change the data file of the table space to automatic expansion , Maximum 100M
alter database datafile 'D:\app\Snakewood\oradata\mydba\usertbs1.dbf' autoextend on next 5m maxsize 100m;

- by USERTBS2 Add a data file to the table space , size 20M
alter tablespace usertbs2 add datafile 'D:\app\Snakewood\oradata\mydba\usertbs2_1.dbf' size 20m;

- Create a temporary table space TEMPTBS1, And set it as the default temporary table space of the database
create temporary tablespace temptbs1 tempfile 'D:\app\Snakewood\oradata\mydba\ temptbs1_1.dbf' size 20m extent management local uniform size 16m;
alter database default temporary tablespace temptbs1;

- Use SQL Command to USERTBS1 Tablespaces perform online and offline state transitions
Alter tablespace USERTBS1 offline;
Alter tablespace USERTBS1 online;

- Create a SC surface (SNO,CNO,GRADE), increase tablespace users Words and expressions , And then USERS The tablespace is set to read-only , Try to SC Add a record to the table
create table SC (
SNO varchar2(20) primary key,
CNO varchar2(20) not null,
GRADE number(3) not null
)
tablespace users;
alter tablespace users read only;
insert into SC values (‘B201801’,’C0101’,98);


- Create a rollback table space UNDOTBS2, And as the undo tablespace of the database
create undo tablespace UNDOTBS2 datafile ‘D:\app\Snakewood\oradata\mydba\ UNDOTBS2_1.DBF’ size 20m;

- take USERTBS1 Tablespace renamed to USERTBS01
alter tablespace USERTBS1 rename to USERTBS01;

- Delete tablespace USERTBS2, Delete the contents and data files of the table space at the same time
drop tablespace USERTBS2 including contents and datafiles;

边栏推荐
猜你喜欢
随机推荐
3.Oracle-控制文件的管理
Appium foundation - use the first demo of appium
What's wrong with this paragraph that doesn't work? (unresolved)
1.13 - RISC/CISC
论文阅读报告
背包问题 AcWing 9. 分组背包问题
Chart. JS - Format Y axis - chart js - Formatting Y axis
安装OpenCV--conda建立虚拟环境并在jupyter中添加此环境的kernel
Usage scenarios of golang context
【LeetCode】Easy | 20. Valid parentheses
Leetcode-6111: spiral matrix IV
P3265 [jloi2015] equipment purchase
How to set the drop-down arrow in the spinner- How to set dropdown arrow in spinner?
TCP's understanding of three handshakes and four waves
Leetcode-31: next spread
Network security skills competition in Secondary Vocational Schools -- a tutorial article on middleware penetration testing in Guangxi regional competition
Nested method, calculation attribute is not applicable, use methods
__ builtin_ Popcount() counts the number of 1s, which are commonly used in bit operations
Appium automation test foundation - Summary of appium test environment construction
博弈论 AcWing 893. 集合-Nim游戏









