当前位置:网站首页>Oracle modifies tablespace names and data files
Oracle modifies tablespace names and data files
2022-07-02 09:14:00 【Axi-ZYTao】
Purpose : I want to put tablespace tablespace1 Name of and corresponding data file name /u01/app/oradata/oradb/tablespace1.dbf Are modified to tablespace2
System users sys With sysdba Login as ;
modify oracle The steps of tablespace name and data file name are as follows :
1、 Modify the table space name
alter tablespace /tablespace1 rename to /tablespace2;
2、 Take the modified tablespace offline
alter tablespace /tablespace2 offline;
3、 Then change the name of the data physical file
My file directory is :
/u01/app/oradata/oradb//tablespace1.dbf
take /tablespace1.dbf It is amended as follows /tablespace2.dbf
PS: Need to switch to oracle User's next operation
4、 Using system users sys With sysdba After logging in as , Execute the following statement :
alter tablespace /tablespace2 rename datafile '/u01/app/oradata/oradb//tablespace1.dbf' to '/u01/app/oradata/oradb/tablespace2.dbf';
5、 Bring tablespaces Online
alter tablespace /tablespace2 online;
6、 Use SQL Statement query table space usage and remaining
-- Tablespace calculation used
select sum(bytes/1024/1024/1024) from user_segments;
-- Remaining tablespace calculation
select sum(bytes/1024/1024/1024) from user_free_space T where tablespace_name=‘tablespace_name’;
边栏推荐
- 京东高级工程师开发十年,编写出:“亿级流量网站架构核心技术”
- 概念到方法,绝了《统计学习方法》——第三章、k近邻法
- There is a problem with MySQL installation (the service already exists)
- Micro service practice | introduction and practice of zuul, a micro service gateway
- 长篇总结(代码有注释)数构(C语言)——第四章、串(上)
- Taking the upgrade of ByteDance internal data catalog architecture as an example, talk about the performance optimization of business system
- 小米电视不能访问电脑共享文件的解决方案
- Right click menu of QT
- [go practical basis] how can gin get the request parameters of get and post
- [go practical basis] how to customize and use a middleware in gin
猜你喜欢

Microservice practice | teach you to develop load balancing components hand in hand

What is the future value of fluorite mine of karaqin Xinbao Mining Co., Ltd. under zhongang mining?

Flink-使用流批一体API统计单词数量

微服务实战|手把手教你开发负载均衡组件

ORA-12514问题解决方法

Data type case of machine learning -- using data to distinguish men and women based on Naive Bayesian method

QT -- how to set shadow effect in QWidget

I've taken it. MySQL table 500W rows, but someone doesn't partition it?
![[staff] the lines and spaces of the staff (the nth line and the nth space in the staff | the plus N line and the plus N space on the staff | the plus N line and the plus N space below the staff | the](/img/dc/c0ea188ef353ded86759dbe9b29df3.jpg)
[staff] the lines and spaces of the staff (the nth line and the nth space in the staff | the plus N line and the plus N space on the staff | the plus N line and the plus N space below the staff | the

《统计学习方法》——第五章、决策树模型与学习(上)
随机推荐
Actual combat of microservices | discovery and invocation of original ecosystem implementation services
十年开发经验的程序员告诉你,你还缺少哪些核心竞争力?
NPOI 导出Word 字号对应
【Go实战基础】如何安装和使用 gin
Don't spend money, spend an hour to build your own blog website
微服务实战|手把手教你开发负载均衡组件
微服务实战|声明式服务调用OpenFeign实践
WSL installation, beautification, network agent and remote development
「面试高频题」难度大 1.5/5,经典「前缀和 + 二分」运用题
告别996,IDEA中必装插件有哪些?
机器学习实战:《美人鱼》属于爱情片还是动作片?KNN揭晓答案
Long summary (code with comments) number structure (C language) -- Chapter 4, string (Part 1)
Shengshihaotong and Guoao (Shenzhen) new energy Co., Ltd. build the charging pile industry chain
Pdf document of distributed service architecture: principle + Design + practice, (collect and see again)
[go practical basis] how to set the route in gin
Select sort and insert sort
Gocv split color channel
Jd.com interviewer asked: what is the difference between using on or where in the left join association table and conditions
Complete solution of servlet: inheritance relationship, life cycle, container, request forwarding and redirection, etc
数构(C语言)——第四章、矩阵的压缩存储(下)