当前位置:网站首页>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数据库
- [2020]GRAF: Generative Radiance Fields for 3D-Aware Image Synthesis
- 高斯消元 AcWing 884. 高斯消元解异或线性方程组
- There are three kinds of SQL connections: internal connection, external connection and cross connection
- Series of how MySQL works (VIII) 14 figures explain the atomicity of MySQL transactions and the principle of undo logging
- Leetcode stack related
- 5. Oracle TABLESPACE
- Bash exercise 17 writing scripts to install the server side of FRP reverse proxy software
- MySQL advanced part 1: triggers
- TCP's understanding of three handshakes and four waves
猜你喜欢

MPLS experiment

Stack acwing 3302 Expression evaluation

MPLS experiment

vsCode创建自己的代码模板

Chapter 6 relational database theory

NotImplementedError: Cannot convert a symbolic Tensor (yolo_boxes_0/meshgrid/Size_1:0) to a numpy ar

Install opencv -- CONDA to establish a virtual environment and add the kernel of this environment in jupyter

博弈论 AcWing 892. 台阶-Nim游戏

Inclusion exclusion principle acwing 890 Divisible number

MySQL advanced part 2: storage engine
随机推荐
MPLS experiment
MySQL advanced part 2: optimizing SQL steps
Chinese remainder theorem acwing 204 Strange way of expressing integers
MySQL怎么运行的系列(八)14张图说明白MySQL事务原子性和undo日志原理
[2021]IBRNet: Learning Multi-View Image-Based Rendering Qianqian
高斯消元 AcWing 884. 高斯消元解异或線性方程組
求组合数 AcWing 888. 求组合数 IV
Presentation of attribute value of an item
Vscode creates its own code template
Record the process of configuring nccl and horovod in these two days (original)
4. Oracle redo log file management
Quickly use Amazon memorydb and build your own redis memory database
Traversal of leetcode tree
【高德地图POI踩坑】AMap.PlaceSearch无法使用
International Open Source firmware Foundation (osff) organization
Alibaba established the enterprise digital intelligence service company "Lingyang" to focus on enterprise digital growth
H5 模块悬浮拖动效果
Suppose a bank's ATM machine, which allows users to deposit and withdraw money. Now there is 200 yuan in an account, and both user a and user B have the right to deposit and withdraw money from this a
博弈论 AcWing 894. 拆分-Nim游戏
P2575 master fight