当前位置:网站首页>2. Addition and management of Oracle data files
2. Addition and management of Oracle data files
2022-07-05 06:28:00 【Cold leaves elegant_】
- Inquire about V$DATAFILE、DBA_DATA_FILES surface
Inquire about V$DATAFILE
select name,file#,checkpoint_change# from v$datafile;

Inquire about DBA_DATA_FILES
select tablespace_name,autoextensible,file_name from dba_data_files;

- by users Tablespace add data file users03.dbf, size 10mb
alter tablespace users add datafile 'D:\app\Snakewood\oradata\orcl\users03.dbf' size 10m;


- by users Tablespace add data file user02.dbf, size 10mb, Automatic extension
alter tablespace users add datafile 'D:\app\Snakewood\oradata\orcl\user02.dbf' size 10m autoextend on;


3. by users Tablespace add data file users05.dbf, size 10mb, Maximum 50mb
alter tablespace users add datafile 'D:\app\Snakewood\oradata\orcl\users05.dbf' size 10m autoextend on maxsize 50m;


4. modify users In tablespace users03.dbf For automatic extension , Every expansion 5mb, Maximum 20mb
alter database datafile 'D:\app\Snakewood\oradata\orcl\users03.dbf' autoextend on next 5m maxsize 20m;

- Change the database to archive
First , Query whether the database is currently in archive mode
select name,log_mode from v$database;

Close the database , stay mount Change the database to archive mode , Restart the database 
Check the archive mode of the current database 
6. take users01.dbf offline , Observe the changes of control documents
Before offline :

After offline :
alter database backup controlfile to trace as 'C:\Users\Snakewood\Desktop\offline.txt';


offline (offline) Return to online after (online):
7. take users03.dbf Renamed users003.dbf,users02 Move to e disc ( Try 3 Methods )
take users03.dbf Renamed users003.dbf:
① Only right users03.dbf offline
First modify the file name to users003.dbf
Go offline 
Modify the records in the control document

Reconnect the database and online
② Offline for tablespaces
Change the file name to users03.dbf
Go offline
① Only right users003.dbf offline 
Modify the records in the control document

Re connect to the database 
② Perform offline operations on tablespaces
Set the tablespace offline 
Move users003 The new folder will be named users203
Modify the control file information 
Bring tablespaces online 
边栏推荐
- 1.手动创建Oracle数据库
- MySQL advanced part 2: SQL optimization
- Day 2 document
- Find the combination number acwing 888 Find the combination number IV
- 5.Oracle-表空间
- 【LeetCode】Easy | 20. Valid parentheses
- Filter the numbers and pick out even numbers from several numbers
- What's wrong with this paragraph that doesn't work? (unresolved)
- Daily question 1189 Maximum number of "balloons"
- [learning] database: MySQL query conditions have functions that lead to index failure. Establish functional indexes
猜你喜欢

1.13 - RISC/CISC

Series of how MySQL works (VIII) 14 figures explain the atomicity of MySQL transactions and the principle of undo logging

Single chip computer engineering experience - layered idea

International Open Source firmware Foundation (osff) organization

Redis-01.初识Redis

阿里新成员「瓴羊」正式亮相,由阿里副总裁朋新宇带队,集结多个核心部门技术团队

MySQL advanced part 2: SQL optimization

SQL三种连接:内连接、外连接、交叉连接

‘mongoexport‘ 不是内部或外部命令,也不是可运行的程序 或批处理文件。

Simple selection sort of selection sort
随机推荐
MQClientException: No route info of this topic: type_ topic
MySQL advanced part 1: stored procedures and functions
11-gorm-v2-03-basic query
5. Oracle TABLESPACE
Paper reading report
Leetcode divide and conquer / dichotomy
Interval problem acwing 906 Interval grouping
Presentation of attribute value of an item
【LeetCode】Easy | 20. Valid parentheses
MPLS experiment
[2020]GRAF: Generative Radiance Fields for 3D-Aware Image Synthesis
[moviepy] unable to find a solution for exe
Client use of Argo CD installation
C - XOR to all (binary topic)
Bit of MySQL_ OR、BIT_ Count function
博弈论 AcWing 894. 拆分-Nim游戏
VLAN experiment
[BMZCTF-pwn] ectf-2014 seddit
vsCode创建自己的代码模板
our solution