当前位置:网站首页>可移动表空间
可移动表空间
2022-07-26 12:19:00 【青木与风】
目录
1.创建实验用表空间
$ . oranev
$ sqlplus / as sysdba
SQL>conn / as sysdba
SQL>create tablespace trans_tbs datafile '/home/oracle/trans01.dbf'
2 size 20M;

2 创建测试用户 trans
SQL>create user trans identified by trans
2 default tablespace trans_tbs;

3 修改用户权限
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 创建实验表
SQL>conn trans/trans;
SQL>create table trans_tb tablespace trans_tbs
2 as select * from hr.employees;

5 将移动表空间修改为只读模式
SQL>conn / as sysdba

6 使用数据泵导出 TRANS_TBS 表空间元数据
$ expdp system/oracle_4U directory=udbs_dir dumpfile=trans.dump TRANSPORT_TABLESPACES=trans_tbs_

7 删除 TRANS_TBS 表空间
SQL>drop tablespace trans_tbs including contents;
SQL>conn trans/trans
SQL>select count(*) from trans_tb;

注意:不要同时删除数据文件。
8 使用数据泵导入可移动表空间元数据
$ impdp system/oracle_4U directory=udbs_dir dumpfile=trans.dump transport_datafiles='/homeoracle/trans01.dbf'_

9 验证数据
SQL>conn / as sysdba
SQL>select name from v$database;
SQL>select count(*) from trans.trans_tb;

边栏推荐
- Ssj-21b time relay
- Hit the blackboard and draw the key points: a detailed explanation of seven common "distributed transactions"
- STM32驱动HC05蓝牙串口通信模块
- JVM内存溢出和内存泄漏的区别
- [map] universal map usage & two ways of fuzzy query
- [Anhui University] information sharing of postgraduate entrance examination and re examination
- 一些常用的文章写作使用方法和技巧
- 2、 Container_
- 若有声明”int x=5,y=1;”,则表达式x<y?x++:y++的结果是:
- 编程式导航路由跳转到当前路由(参数不变), 多次执行会抛出NavigationDuplicated的警告错误?
猜你喜欢

Microsoft has shut down two attack methods: Office macro and RDP brute force cracking

微软关闭了两种攻击途径:Office 宏、RDP 暴力破解

The difference between JVM memory overflow and memory leak

HCIP-9.OSPF的各种拓展

干货|语义网、Web3.0、Web3、元宇宙这些概念还傻傻分不清楚?(中)

【2243】module_ param.m

Optical distance sensing chip 4530a combining ambient light, proximity sensing and infrared ranging
![[wechat applet] read the article, data request](/img/9a/3b9aef6c5f5735b886252ec830798c.png)
[wechat applet] read the article, data request

How much do you know about the two infrastructures of the badminton stadium?

X.509、PKCS文件格式介绍
随机推荐
全国职业院校技能大赛网络安全B模块wirshark数据包分析 wireshark0051.pcap
How much do you know about the two infrastructures of the badminton stadium?
Redis为什么这么快?Redis的线程模型与Redis多线程
三维点云课程(八)——特征点匹配
【Map】万能的Map使用方法 & 模糊查询的两种方式
二、容器_
FPGA入门学习(二) - 二选一的选择器
Access数据库无法连接
一些常用的文章写作使用方法和技巧
Redis主从复制原理
JVM内存溢出和内存泄漏的区别
如何组装一个注册中心?
3D point cloud course (VIII) -- feature point matching
【2243】module_ param.m
面试官:如何处理高并发?
敲黑板画重点:七种常见“分布式事务”详解
回溯——46. 全排列
Tencent cloud and smart industry business group (CSIG) adjusted the organizational structure and established the digital twin product department
Overseas app push (Part 2): Channel Integration Guide for overseas manufacturers
常用的 list.isEmpty() 为何突然报null?
