当前位置:网站首页>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’;
边栏推荐
- C # save web pages as pictures (using WebBrowser)
- Cloud computing in my eyes - PAAS (platform as a service)
- Don't spend money, spend an hour to build your own blog website
- 【Go实战基础】如何安装和使用 gin
- 告别996,IDEA中必装插件有哪些?
- 西瓜书--第六章.支持向量机(SVM)
- 使用IBM MQ远程连接时报错AMQ 4043解决思路
- cmd窗口中中文呈现乱码解决方法
- Jingdong senior engineer has developed for ten years and compiled "core technology of 100 million traffic website architecture"
- There is a problem with MySQL installation (the service already exists)
猜你喜欢

《统计学习方法》——第五章、决策树模型与学习(上)

【Go实战基础】gin 如何验证请求参数

Taking the upgrade of ByteDance internal data catalog architecture as an example, talk about the performance optimization of business system

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

There is a problem with MySQL installation (the service already exists)

Hengyuan cloud_ Can aiphacode replace programmers?

C nail development: obtain all employee address books and send work notices
![[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

Matplotlib swordsman Tour - an artist tutorial to accommodate all rivers

微服务实战|原生态实现服务的发现与调用
随机推荐
Number structure (C language) -- Chapter 4, compressed storage of matrices (Part 2)
Select sort and insert sort
十年開發經驗的程序員告訴你,你還缺少哪些核心競爭力?
Microservice practice | fuse hytrix initial experience
Redis sorted set data type API and application scenario analysis
NPOI 导出Word 字号对应
[staff] time sign and note duration (full note | half note | quarter note | eighth note | sixteenth note | thirty second note)
Troubleshooting and handling of an online problem caused by redis zadd
[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
There is a problem with MySQL installation (the service already exists)
Matplotlib剑客行——容纳百川的艺术家教程
「面试高频题」难度大 1.5/5,经典「前缀和 + 二分」运用题
oracle删除表空间及用户
During MySQL installation, mysqld Exe reports that the application cannot start normally (0xc000007b)`
Function ‘ngram‘ is not defined
C#钉钉开发:取得所有员工通讯录和发送工作通知
WSL installation, beautification, network agent and remote development
Using recursive functions to solve the inverse problem of strings
MYSQL安装出现问题(The service already exists)
I've taken it. MySQL table 500W rows, but someone doesn't partition it?