当前位置:网站首页>5.Oracle-表空间
5.Oracle-表空间
2022-07-05 06:20: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;
边栏推荐
- [leetcode] day94 reshape matrix
- 4. Object mapping Mapster
- 传统数据库逐渐“难适应”,云原生数据库脱颖而出
- [rust notes] 14 set (Part 1)
- 1.14 - assembly line
- MySQL advanced part 1: index
- In depth analysis of for (VaR I = 0; I < 5; i++) {settimeout (() => console.log (I), 1000)}
- [rust notes] 17 concurrent (Part 1)
- Matrixdb V4.5.0 was launched with a new mars2 storage engine!
- Day 2 document
猜你喜欢
区间问题 AcWing 906. 区间分组
MySQL advanced part 1: index
1.13 - RISC/CISC
博弈论 AcWing 891. Nim游戏
[2020]GRAF: Generative Radiance Fields for 3D-Aware Image Synthesis
WordPress switches the page, and the domain name changes back to the IP address
Erreur de connexion Navicat à la base de données Oracle Ora - 28547 ou Ora - 03135
Open source storage is so popular, why do we insist on self-development?
Leetcode stack related
什么是套接字?Socket基本介绍
随机推荐
Gaussian elimination acwing 884 Gauss elimination for solving XOR linear equations
P2575 master fight
求组合数 AcWing 889. 满足条件的01序列
There are three kinds of SQL connections: internal connection, external connection and cross connection
1041 Be Unique
MySQL advanced part 2: MySQL architecture
Appium foundation - use the first demo of appium
liunx启动redis
Alibaba's new member "Lingyang" officially appeared, led by Peng Xinyu, Alibaba's vice president, and assembled a number of core department technical teams
Currently clicked button and current mouse coordinates in QT judgment interface
做 SQL 性能优化真是让人干瞪眼
LeetCode 1200. Minimum absolute difference
1039 Course List for Student
Erreur de connexion Navicat à la base de données Oracle Ora - 28547 ou Ora - 03135
Liunx starts redis
Applicable to Net free barcode API [off] - free barcode API for NET [closed]
Basic explanation of typescript
Sqlmap tutorial (1)
Single chip computer engineering experience - layered idea
Leetcode-6110: number of incremental paths in the grid graph