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

边栏推荐
- Sorting out the latest Android interview points in 2022 to help you easily win the offer - attached is the summary of Android intermediate and advanced interview questions in 2022
- Golang uses context gracefully
- Leetcode-1200: minimum absolute difference
- RGB LED infinite mirror controlled by Arduino
- [rust notes] 17 concurrent (Part 1)
- 2021apmcm post game Summary - edge detection
- C - XOR to all (binary topic)
- Appium foundation - use the first demo of appium
- C Primer Plus Chapter 15 (bit operation)
- 11-gorm-v2-03-basic query
猜你喜欢

Open source storage is so popular, why do we insist on self-development?

MySQL怎么运行的系列(八)14张图说明白MySQL事务原子性和undo日志原理

Alibaba's new member "Lingyang" officially appeared, led by Peng Xinyu, Alibaba's vice president, and assembled a number of core department technical teams

中国剩余定理 AcWing 204. 表达整数的奇怪方式

做 SQL 性能优化真是让人干瞪眼

【LeetCode】Easy | 20. Valid parentheses
![[2021]IBRNet: Learning Multi-View Image-Based Rendering Qianqian](/img/f1/e7a8a1a31bc5712d9f32d91305a2b0.jpg)
[2021]IBRNet: Learning Multi-View Image-Based Rendering Qianqian

Overview of variable resistors - structure, operation and different applications

博弈论 AcWing 894. 拆分-Nim游戏

Network security skills competition in Secondary Vocational Schools -- a tutorial article on middleware penetration testing in Guangxi regional competition
随机推荐
QQ电脑版取消转义符输入表情
Chart. JS - Format Y axis - chart js - Formatting Y axis
Redis publish subscribe command line implementation
1040 Longest Symmetric String
可变电阻器概述——结构、工作和不同应用
Data visualization chart summary (I)
New title of module a of "PanYun Cup" secondary vocational network security skills competition
Day 2 document
博弈论 AcWing 891. Nim游戏
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-3: Longest substring without repeated characters
Real time clock (RTC)
our solution
Alibaba established the enterprise digital intelligence service company "Lingyang" to focus on enterprise digital growth
栈 AcWing 3302. 表达式求值
Winter vacation water test 1 Summary
1040 Longest Symmetric String
Leetcode-1200: minimum absolute difference
C - XOR to all (binary topic)