当前位置:网站首页>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’;
边栏推荐
- Find the node with the smallest value range in the linked list and move it to the front of the linked list
- Solution to amq4036 error in remote connection to IBM MQ
- Cloudreve自建云盘实践,我说了没人能限制得了我的容量和速度
- Npoi export word font size correspondence
- 微服务实战|熔断器Hystrix初体验
- Solution of Xiaomi TV's inability to access computer shared files
- C4D quick start tutorial - C4d mapping
- 数构(C语言--代码有注释)——第二章、线性表(更新版)
- ORA-12514问题解决方法
- Multi version concurrency control mvcc of MySQL
猜你喜欢
Win10 uses docker to pull the redis image and reports an error read only file system: unknown
cmd窗口中中文呈现乱码解决方法
Multi version concurrency control mvcc of MySQL
微服务实战|Eureka注册中心及集群搭建
Chrome浏览器插件-Fatkun安装和介绍
Number structure (C language) -- Chapter 4, compressed storage of matrices (Part 2)
There is a problem with MySQL installation (the service already exists)
Flink-使用流批一体API统计单词数量
Redis zadd导致的一次线上问题排查和处理
C language implementation of mine sweeping game
随机推荐
别找了,Chrome浏览器必装插件都在这了
【Go实战基础】gin 如何自定义和使用一个中间件
From concept to method, the statistical learning method -- Chapter 3, k-nearest neighbor method
Analysis and solution of a classical Joseph problem
微服务实战|声明式服务调用OpenFeign实践
Move a string of numbers backward in sequence
C call system sound beep~
Sentinel reports failed to fetch metric connection timeout and connection rejection
C language - Blue Bridge Cup - 7 segment code
win10使用docker拉取redis镜像报错read-only file system: unknown
ORA-12514问题解决方法
Taking the upgrade of ByteDance internal data catalog architecture as an example, talk about the performance optimization of business system
Shengshihaotong and Guoao (Shenzhen) new energy Co., Ltd. build the charging pile industry chain
「Redis源码系列」关于源码阅读的学习与思考
oracle修改数据库字符集
Chrome视频下载插件–Video Downloader for Chrome
使用IBM MQ远程连接时报错AMQ 4043解决思路
[go practical basis] how to customize and use a middleware in gin
Programmers with ten years of development experience tell you, what core competitiveness do you lack?
Microservice practice | teach you to develop load balancing components hand in hand