151 DBMS_TDB

DBMS_TDB包报告是否可以使用RMAN CONVERT database命令在平台之间传输数据库。包验证当前主机平台上的数据库是否与目标平台具有相同的端口号格式,以及当前数据库的状态是否阻止数据库的传输。

See Also:

Oracle Database Backup and Recovery User's Guide regarding database transport using CONVERT DATABASE

This chapter contains the following topics:

  • Using DBMS_TDB

    • Overview

    • Security Model

    • Constants

    • Views

    • Operational Notes

  • Summary of DBMS_TDB Subprograms


Using DBMS_TDB

This section contains topics which relate to using DBMS_TDB.

  • Overview

  • Constants

  • Views

  • Operational Notes


Overview

在许多情况下,Oracle支持在具有相同endian格式的平台之间传输数据库。然而,即使endian格式相同,数据库也必须经过转换过程才能从一个平台转移到另一个平台。传输数据库的过程还需要一些先决条件,比如将数据库以只读方式打开传输。

The DBMS_TDB package serves two purposes:

  • Confirming that Oracle supports transporting a database from a given source platform to a given target platform

  • Determining whether a database to be transported has been properly prepared for transport, and if not, identifying the condition that prevents database transport

The actual conversion is performed using the Recovery Manager CONVERT DATABASE command. For a complete discussion of the requirements for transporting a database, the process of converting a database for transport across platforms, and examples of the use of the DBMS_TDB subprograms in the conversion process, see Oracle Database Backup and Recovery User's Guide.


Security Model

Use of this package requires the DBA privilege.


Constants

DBMS_TDB包定义了几个应用于指定参数值的枚举常量。枚举常量必须以包名作为前缀,例如,DBMS_TDB.SKIP_NONE。

The DBMS_TDB package uses the constants shown in Table 151-1.

Table 151-1 DBMS_TDB Constants

Name Type Value Description

SKIP_NONE

NUMBER

0

Check all files when checking whether a database is ready for transport.

SKIP_OFFLINE

NUMBER

2

Skip files in offline tablespaces when checking whether a database is ready for transport.

SKIP_READONLY

NUMBER

3

Skip files in readonly tablespaces when checking whether a database is ready for transport.


Views

The DBMS_TDB package uses the following view listed in Oracle Database Reference:

  • V$DB_TRANSPORTABLE_PLATFORM, which specifies which combinations of source and target platforms support database transport


Operational Notes

  • The subprograms in this package are useful both in determining whether the desired cross-platform database conversion is possible, and in checking whether the database is ready for conversion. See Oracle Database Backup and Recovery User's Guide for details on the different uses of these subprograms are used in the conversion process.

  • The subprograms in this package return simple TRUE or FALSE results to indicate whether database transport is possible. Use the subprograms with SERVEROUTPUT ON for informative messages about why transport is not possible.


Summary of DBMS_TDB Subprograms

Table 151-2 DBMS_TDB Package Subprograms

Subprogram Description

CHECK_DB Function

检查是否可以将数据库传输到目标平台

CHECK_EXTERNAL Function

检查数据库是否具有外部表、目录或BFILEs

CHECK_DB Function

此函数检查是否可以将数据库传输到目标平台。它测试对于给定的源和目标平台是否支持传输,以及数据库当前是否处于传输的正确状态。
如果不打算传输数据库的只读或脱机部分,可以指定是否跳过检查。
函数重载。每种语法形式的不同功能和定义一起给出。

Syntax

DBMS_TDB.CHECK_DB (target_platform_name   IN VARCHAR2, skip_option            IN  NUMBER)RETURN BOOLEAN;DBMS_TDB.CHECK_DB (target_platform_name   IN VARCHAR2)RETURN BOOLEAN;DBMS_TDB.CHECK_DB RETURN BOOLEAN;

Parameters

Table 151-3 CHECK_DB Function Parameters

Parameter Description

target_platform_name

The name of the destination platform, as it appears in V$DB_TRANSPORTABLE_PLATFORM.

skip_option

Specifies which, if any, parts of the database to skip when checking whether the database can be transported. Supported values are listed in Table 151-1, "DBMS_TDB Constants".

Return Values

If the database cannot be transported to the target platform or is not ready to be transported, returns FALSE. If the database is ready for transport, returns TRUE.

Usage Notes

  • If SERVEROUTPUT is ON, then the output will contain the reasons why the database cannot be transported and how to fix the problems. For details on possible reasons and fixes, see Table 151-4, "Reasons for CHECK_DB Function to Return FALSE".

    Table 151-4 Reasons for CHECK_DB Function to Return FALSE

    Cause Action

    Unrecognized target platform name.

    Check V$DB_TRANSPORTABLE_PLATFORM for recognized platform names.

    Target platform has a different endian format.

    Conversion is not supported.

    Database is not open read-only.

    Open database read-only and retry.

    There are active or in-doubt transactions in the database.

    Open the database read-write. After the active transactions are rolled back, open the database read-only and retry the operation.

    This situation can occur if users flash back the database and open it read only. The active transactions will be rolled back when the database is opened read-write.

    Deferred transaction rollback needs to be done.

    Open the database read-write and bring online the necessary tablespaces. Once the deferred transaction rollback is complete, open the database read-only and retry the operation.

    Database compatibility version is below 10.0.0.

    Change the COMPATIBLE initialization parameter to 10.0.0 or higher, open the database read-only, and retry the operation.

    Some tablespaces have not been open read-write with compatibility version is 10.0.0 or higher.

    Change the COMPATIBLE initialization parameter to 10.0.0 or higher, then open the affected tablespaces read-write. Shut down the database, open it read-only, and retry the operation.

Examples

This example illustrates the use of CHECK_DB with a database that is open read-write:

SQL> SET SERVEROUTPUT ON
SQL> DECLAREdb_ready BOOLEAN;BEGINdb_ready := DBMS_TDB.CHECK_DB('Microsoft Windows IA (32-bit)');END;/Database is not open READ ONLY. Please open database READ ONLY and retry.PL/SQL procedure successfully completed.

CHECK_EXTERNAL Function

This function determines whether a database has external tables, directories, or BFILEs.

Syntax

DBMS_TDB.CHECK_EXTERNAL RETURN BOOLEAN;

Return Values

If the database has external tables, directories, or BFILEs, return TRUE. Otherwise, return FALSE.

Usage Notes

  • If SERVEROUTPUT is ON, then the function will output the names of the external tables, directories, and BFILEs in the database.

  • The database must be open read-write.

Examples

This example illustrates the use of CHECK_EXTERNAL with a database that has several external tables, directories, and BFILEs:

SQL> SET SERVEROUTPUT ON
SQL> DECLAREexternal BOOLEAN;BEGINexternal := DBMS_TDB.CHECK_EXTERNAL;END;/
The following external tables exist in the database:
SH.SALES_TRANSACTIONS_EXT
The following directories exist in the database:
SYS.MEDIA_DIR, SYS.DATA_FILE_DIR, SYS.LOG_FILE_DIR, SYS.DATA_PUMP_DIR
The following BFILEs exist in the database:
PM.PRINT_MEDIAPL/SQL procedure successfully completed.

【OCP学习1z0-053记录74】151 DBMS_TDB相关推荐

  1. eclipse在网页进入时显示重定向过多_使用eclipse快速开发jsp以及编码问题、jsp页面元素、request对象学习的粗略记录...

    人老了真是什么都会忘记啊orz,早上发现学过去的东西好多都还没记录复盘... ...(懒虫作祟) 在开始之前,俺认为还是很有必要了解一下jsp的执行流程,俺发现CSDN上的"陈小哥cw&qu ...

  2. HACK RF学习之旅记录3——安装WIN10+Ubuntu双系统

    鉴于之前的gnuradio运行例程FM声音卡顿,gprx采样率8M也卡顿,尝试安装双系统做一些工作,顺便学习下原生系统里面日常生存. 1 安装Ubuntu19.10 在WIN系统下搜了下例程大致明白, ...

  3. 用 C学习51单片机——记录 4、中断系统 (1)外部中断

    用 C学习51单片机--记录 4.中断系统 用 C 学习51单片机过程与自我拓展--记录(STC89C52芯片) 前言--其实51并不太难,多看 多写代码,多调试,就一定会有所感悟. 所以我在此留下一 ...

  4. 深度学习小白装机-记录一下

    深度学习小白装机-记录一下 三个备选清单. 原本早就有攒一部机器的想法,最近刚刚好在玩深度学习的小案例,所以产生了装一部自己的台式机的想法. 下面均是自己查资料所得,可能与实际有差入.出错了,我也不负 ...

  5. Python学习关键tip记录

    Python学习关键tip记录,因为是学习中自己总结的,可能会有错误,欢迎指正(持续更新) 一.基础知识: 1.函数调用前类型是function,调用后没有特殊指定ruturn返回值默认为None. ...

  6. 各类学习平台收集记录(强化学习、深度学习、机器学习)

    各类学习平台收集记录(强化学习.深度学习.机器学习) 1.百度开发者中心  https://developer.baidu.com/?from=aistudio 有很多开源项目代码可以借鉴学习. 2. ...

  7. MAC-XXL_JOB学习踩坑记录-Failed to create parent directories for [/data/applogs/xxl-job/xxl-job-admin.log

    MAC-XXL_JOB学习踩坑记录 源码下载地址 启动报错 源码下载地址 ①.GitHub:https://github.com/xuxueli/xxl-job ②.码云:https://gitee. ...

  8. selenium 学习、工作 记录,附常见异常和工具方法

    selenium 学习.工作 记录,附常见异常和工具方法 基础配置 2020.03.31 开发者模式 设置有认证的http代理 让selenium接管人为打开的chrome 2020.07.23(79 ...

  9. cesium给地图添加比例尺学习踩坑记录

    cesium给地图添加比例尺学习踩坑记录 因项目需要在cesium地图中展示比例尺,本来应该是很简单的事,但却碰到了一个引用文件的坑,特此记录: *1.引用依赖文件 相信需要用到cesium比例尺组件 ...

  10. 编程学习之路记录重新开始

    编程学习之路记录重新开始 2017年起始  记录重头开始--------------

最新文章

  1. 移动端网站页面优化的关键点
  2. 算数基本定理(例题:LightOJ1341)
  3. 【密码学】CSP的概念
  4. zShowBox (图片放大展示jquery版 兼容性好)
  5. io-同步 异步 阻塞 非阻塞
  6. win7局域网共享设置_Win7系统打印机共享不了的设置方法思路!
  7. 接口批量同步数据_千手接口平台+电商ERP,助德嵘大药房征战拼多多
  8. Golang--defer的mi魂汤
  9. dmp导入数据 oracle_oracle数据库:数据的导入导出及备份
  10. 字节跳动资深面试官亲述:java进阶篇
  11. Android中应用程序drawable图片资源占用内存的统计
  12. mysql安装和下载过程_mysql下载与安装过程
  13. 搜集的育儿电子书下载大全
  14. 论文查重率多少合格?
  15. hp服务器u盘安装系统进不了安装界面,hp笔记本开机无法从u盘安装系统
  16. 零基础成为网络工程师经验分享,附完整学习路线
  17. 【模拟经营】《模拟城市4豪华版》免安装中文版
  18. 117. 请简述文本文件和二进制文件的区别
  19. SAP CRM培训Uwinpro
  20. iOS 手势的用法

热门文章

  1. Esxi 5下ROS5.18+Panabit
  2. php socket accept,使用PHP Socket开发Yar TCP服务
  3. LOJ#6198. 谢特【后缀自动机/数组 + Trie树查异或最大值 + Trie树合并】
  4. 一个牛人在美国的跳槽经历(转)
  5. java程序员的cto成长之路
  6. PMP第11章:项目风险管理易错习题和知识点汇总
  7. 计算机硬盘电源接口,硬盘电源接口图解
  8. 小松的STM32教程(6)——ADC
  9. 万事开头难 实践出真知
  10. dot格式绘图工具 html,使用dot来绘图