当前位置:网站首页>5.Oracle-錶空間
5.Oracle-錶空間
2022-07-05 06:22:00 【寒葉飄逸_】
- 創建一個本地管理方式下自動分區管理的錶空間USERTBS1,對應的數據文件為20m
create tablespace usertbs1 datafile 'D:\app\Snakewood\oradata\orcl\usertbs1.dbf' size 20m;
- 創建一個本地管理方式下的錶空間USERTBS2,每個分區大小為512K
create tablespace usertbs2 datafile 'D:\app\Snakewood\oradata\mydba\usertbs2.dbf' size 20m extent management local uniform size 512k;
- 修改USERTBS1錶空間大小,將該錶空間的數據文件改為自動擴展方式,最大值100M
alter database datafile 'D:\app\Snakewood\oradata\mydba\usertbs1.dbf' autoextend on next 5m maxsize 100m;
- 為USERTBS2錶空間添加一個數據文件,大小20M
alter tablespace usertbs2 add datafile 'D:\app\Snakewood\oradata\mydba\usertbs2_1.dbf' size 20m;
- 創建一個臨時錶空間TEMPTBS1,並設置為數據庫的默認臨時錶空間
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;
- 使用SQL命令對USERTBS1錶空間進行聯機和脫機狀態轉換
Alter tablespace USERTBS1 offline;
Alter tablespace USERTBS1 online;
- 創建一個SC錶(SNO,CNO,GRADE),增加tablespace users字句,然後將USERS錶空間設置為只讀,嘗試為SC錶增加一條記錄
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);
- 創建一個回滾錶空間UNDOTBS2,並作為數據庫的撤銷錶空間
create undo tablespace UNDOTBS2 datafile ‘D:\app\Snakewood\oradata\mydba\ UNDOTBS2_1.DBF’ size 20m;
- 將USERTBS1錶空間重命名為USERTBS01
alter tablespace USERTBS1 rename to USERTBS01;
- 删除錶空間USERTBS2,同時删除該錶空間的內容和數據文件
drop tablespace USERTBS2 including contents and datafiles;
边栏推荐
- MPLS experiment
- MySQL怎么运行的系列(八)14张图说明白MySQL事务原子性和undo日志原理
- 1040 Longest Symmetric String
- SQLMAP使用教程(一)
- How to generate an image from text on fly at runtime
- 1039 Course List for Student
- [rust notes] 14 set (Part 2)
- Leetcode-6110: number of incremental paths in the grid graph
- Leetcode recursion
- 【LeetCode】Day95-有效的数独&矩阵置零
猜你喜欢
P2575 master fight
SPI 详解
LeetCode 0108. Convert an ordered array into a binary search tree - the median of the array is the root, and the left and right of the median are the left and right subtrees respectively
【LeetCode】Easy | 20. Valid parentheses
Navicat连接Oracle数据库报错ORA-28547或ORA-03135
There are three kinds of SQL connections: internal connection, external connection and cross connection
Leetcode-6110: number of incremental paths in the grid graph
SQLMAP使用教程(二)实战技巧一
1.15 - input and output system
[2020]GRAF: Generative Radiance Fields for 3D-Aware Image Synthesis
随机推荐
WordPress switches the page, and the domain name changes back to the IP address
How to understand the definition of sequence limit?
Leetcode-22: bracket generation
求组合数 AcWing 889. 满足条件的01序列
P2575 master fight
1.13 - RISC/CISC
Leetcode-9: palindromes
[rust notes] 14 set (Part 2)
Leetcode-3: Longest substring without repeated characters
高斯消元 AcWing 884. 高斯消元解异或線性方程組
Shutter web hardware keyboard monitoring
SQL三种连接:内连接、外连接、交叉连接
Filter the numbers and pick out even numbers from several numbers
阿里新成员「瓴羊」正式亮相,由阿里副总裁朋新宇带队,集结多个核心部门技术团队
Leetcode dynamic programming
The difference between CPU core and logical processor
Sqlmap tutorial (II) practical skills I
Series of how MySQL works (VIII) 14 figures explain the atomicity of MySQL transactions and the principle of undo logging
20220213-CTF MISC-a_ good_ Idea (use of stegsolve tool) -2017_ Dating_ in_ Singapore
11-gorm-v2-03-basic query