当前位置:网站首页>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;

边栏推荐
- How to understand the definition of sequence limit?
- Modnet matting model reproduction
- Appium automation test foundation - Summary of appium test environment construction
- 1.15 - input and output system
- MySQL advanced part 1: triggers
- Bit of MySQL_ OR、BIT_ Count function
- Error ora-28547 or ora-03135 when Navicat connects to Oracle Database
- Leetcode-22: bracket generation
- Leetcode backtracking method
- Leetcode array operation
猜你喜欢

MySQL advanced part 2: the use of indexes

4. 对象映射 - Mapping.Mapster

5.Oracle-表空间

Real time clock (RTC)

Gaussian elimination acwing 884 Gauss elimination for solving XOR linear equations

2021apmcm post game Summary - edge detection

Is it impossible for lamda to wake up?

5.Oracle-錶空間

How to make water ripple effect? This wave of water ripple effect pulls full of retro feeling

【LeetCode】Easy | 20. Valid parentheses
随机推荐
1.13 - RISC/CISC
2022/6/29-日报
高斯消元 AcWing 884. 高斯消元解异或线性方程组
阿里巴巴成立企业数智服务公司“瓴羊”,聚焦企业数字化增长
Traversal of leetcode tree
LeetCode-61
Navicat连接Oracle数据库报错ORA-28547或ORA-03135
Golang uses context gracefully
博弈论 AcWing 892. 台阶-Nim游戏
MySQL advanced part 2: MySQL architecture
传统数据库逐渐“难适应”,云原生数据库脱颖而出
Leetcode recursion
What's wrong with this paragraph that doesn't work? (unresolved)
Presentation of attribute value of an item
A reason that is easy to be ignored when the printer is offline
2022-5-第四周日报
Leetcode-3: Longest substring without repeated characters
SPI 详解
11-gorm-v2-03-basic query
Leetcode-6111: spiral matrix IV