当前位置:网站首页>Removable tablespace
Removable tablespace
2022-07-26 12:28:00 【Green wood and wind】
Catalog
1. Create a table space for experiments
5 Change the mobile tablespace to read-only mode
6 Use the data pump to export TRANS_TBS Tablespace metadata
7 Delete TRANS_TBS Table space
8 Use data pump to import removable table space metadata
1. Create a table space for experiments
$ . oranev
$ sqlplus / as sysdba
SQL>conn / as sysdba
SQL>create tablespace trans_tbs datafile '/home/oracle/trans01.dbf'
2 size 20M;

2 Create a test user trans
SQL>create user trans identified by trans
2 default tablespace trans_tbs;

3 Modify user rights
SQL>alter user trans quota unlimited on trans_tbs;
SQL>grant connect to trans;
SQL>grant create table to trans;
SQL>grant select on hr.employees to trans;

4 Create a lab table
SQL>conn trans/trans;
SQL>create table trans_tb tablespace trans_tbs
2 as select * from hr.employees;

5 Change the mobile tablespace to read-only mode
SQL>conn / as sysdba

6 Use the data pump to export TRANS_TBS Tablespace metadata
$ expdp system/oracle_4U directory=udbs_dir dumpfile=trans.dump TRANSPORT_TABLESPACES=trans_tbs_

7 Delete TRANS_TBS Table space
SQL>drop tablespace trans_tbs including contents;
SQL>conn trans/trans
SQL>select count(*) from trans_tb;

Be careful : Do not delete data files at the same time .
8 Use data pump to import removable table space metadata
$ impdp system/oracle_4U directory=udbs_dir dumpfile=trans.dump transport_datafiles='/homeoracle/trans01.dbf'_

9 Validation data
SQL>conn / as sysdba
SQL>select name from v$database;
SQL>select count(*) from trans.trans_tb;

边栏推荐
- Pytest interface automated testing framework | confitest.py
- The significance of Internet of things device encryption
- You Yuxi recommends vite to beginners [why use vite]
- 回溯——491. 递增子序列
- Pytoch deep learning quick start tutorial -- mound tutorial notes (II)
- .NET WebAPI 使用 GroupName 对 Controller 分组呈现 Swagger UI
- 数据库组成存储过程和函数
- 干货|语义网、Web3.0、Web3、元宇宙这些概念还傻傻分不清楚?(中)
- 回溯——131. 分割回文串
- 回溯——第51题. N皇后——必须攻克的经典回溯难题
猜你喜欢
随机推荐
Real time synchronization and conversion of massive data based on Flink CDC
Shell变量和引用
详解勒让德变换与共轭函数
How RFID works
Pytest interface automated testing framework | pytest obtains execution data, and pytest disables plug-ins
Why is redis so fast? Redis threading model and redis multithreading
代码报错解决问题经验之二:YOLOv5中的test报错
VS code 设置Ctrl+S保存,自动格式化的方法
Introduction to FPGA (I) - the first FPGA project
Optical distance sensing chip 4530a combining ambient light, proximity sensing and infrared ranging
el-form 每行显示两列,底部按钮居中
[MySQL constraint]
【Mysql约束】
Ubenwa, a start-up under Mila, received an investment of US $2.5 million to study the AI diagnosis of infant health
三维点云课程(八)——特征点匹配
Flink's real-time data analysis practice in iFLYTEK AI marketing business
可移动表空间
10. 509. Introduction to PKCs file format
数据库组成表
Flutter's learning path









![[map] universal map usage & two ways of fuzzy query](/img/ec/e95e4057af2b9133786bb4103d2daa.png)
