当前位置:网站首页>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’;
边栏推荐
- Cartoon rendering - average normal stroke
- Knife4j 2.X版本文件上传无选择文件控件问题解决
- Machine learning practice: is Mermaid a love movie or an action movie? KNN announces the answer
- 微服务实战|微服务网关Zuul入门与实战
- 分布式服务架构精讲pdf文档:原理+设计+实战,(收藏再看)
- 一篇详解带你再次重现《统计学习方法》——第二章、感知机模型
- Cloud computing in my eyes - PAAS (platform as a service)
- [go practical basis] how to bind and use URL parameters in gin
- C language - Blue Bridge Cup - 7 segment code
- Microservice practice | teach you to develop load balancing components hand in hand
猜你喜欢

Complete solution of servlet: inheritance relationship, life cycle, container, request forwarding and redirection, etc

Knowledge points are very detailed (code is annotated) number structure (C language) -- Chapter 3, stack and queue

【Go实战基础】gin 如何自定义和使用一个中间件

The channel cannot be viewed when the queue manager is running

以字节跳动内部 Data Catalog 架构升级为例聊业务系统的性能优化

Micro service practice | introduction and practice of zuul, a micro service gateway

Servlet全解:继承关系、生命周期、容器和请求转发与重定向等

别找了,Chrome浏览器必装插件都在这了

Don't spend money, spend an hour to build your own blog website
![[staff] common symbols of staff (Hualian clef | treble clef | bass clef | rest | bar line)](/img/ae/1ecb352c51a101f237f244da5a2ef7.jpg)
[staff] common symbols of staff (Hualian clef | treble clef | bass clef | rest | bar line)
随机推荐
1、 QT's core class QObject
【Go实战基础】gin 如何验证请求参数
Don't spend money, spend an hour to build your own blog website
Leetcode sword finger offer brush questions - day 23
【Go实战基础】gin 高效神器,如何将参数绑定到结构体
Minecraft plug-in service opening
数构(C语言)——第四章、矩阵的压缩存储(下)
WSL安装、美化、网络代理和远程开发
Knowledge points are very detailed (code is annotated) number structure (C language) -- Chapter 3, stack and queue
[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
Jd.com interviewer asked: what is the difference between using on or where in the left join association table and conditions
There is a problem with MySQL installation (the service already exists)
【Go实战基础】gin 如何获取 GET 和 POST 的请求参数
一篇详解带你再次重现《统计学习方法》——第二章、感知机模型
Microservice practice | fuse hytrix initial experience
C4D quick start tutorial - C4d mapping
Win10 uses docker to pull the redis image and reports an error read only file system: unknown
破茧|一文说透什么是真正的云原生
Ora-12514 problem solving method
Micro service practice | introduction and practice of zuul, a micro service gateway