dbms_tdb包解析

The procedure or function in this package checks if a database is ready to be transported to a target platform.

and if a database has external tables, directories or BFILEs. It will use dbms_output.put_line to

output the external objects and their owners.

测试:

declare
b boolean;
begin
b:= dbms_tdb.check_external;
end;

The following directories exist in the database:
SYS.交流滤波器场, SYS.交流场, SYS.EQUIPTYPE2000, SYS.EQUIPTYPE2500, SYS.电力系统部分, SYS.站前区, SYS.EQUIPTYPE1200, SYS.直流场, SYS.EQUIPTYPE1000, SYS.换流广场, SYS.EQUIPTYPE1300
The following BFILEs exist in the database:
BH.BIN$K67XgMLMQL+/frRMeJPTHQ==$0, BH.BIN$4WDotQFfRjGDfXXRX6G41Q==$0, BH.BIN$yW203FPNTx+dq9iQWCFicg==$0, BH.PROJ_MODEL_FILES, BH.BIN$ftxiy5V4RQ+uSFA4ueTBaA==$0, BH.BIN$mJ0T31ukT+Sh8aUeIXUOng==$0, BH.MODEL_FILES, BH.BIN$sE6ltgxhTbONiPATfi2GPA==$0, BH.BIN$5ACZO4eOTWiZTsMNBHXF9w==$0

DBMS_TDB的说明:

CREATE OR REPLACE PACKAGE DBMS_TDB IS
--++
-- Description: This function checks if a database is ready to be
-- transported to a target platform. If the database is not
-- ready to be transported and serveroutput is on, a detailed
-- description of the reason why the database cannot be
-- transported and possible ways to fix the problem will be
-- displayed
--
-- Inputs: target_platform - name of the target platform
--
-- Outputs: None
--
-- Returns: TRUE if the datababase is ready to be transported.
-- FALSE otherwise.
--++
SKIP_NONE constant number := 0;
SKIP_INACCESSIBLE constant number := 1;
SKIP_OFFLINE constant number := 2;
SKIP_READONLY constant number := 3;

FUNCTION check_db(
target_platform_name IN varchar2,
skip_option IN number)
RETURN boolean;

FUNCTION check_db(
target_platform_name IN varchar2)
RETURN boolean;

FUNCTION check_db
RETURN boolean;

--++
-- Description: This function checks if a database has external tables,
-- directories or BFILEs. It will use dbms_output.put_line to
-- output the external objects and their owners.
--
-- Inputs: None
--
-- Outputs: None
--
-- Returns: TRUE if the datababase has external tables, directories or
-- BFILEs. FALSE otherwise.
--++
FUNCTION check_external
RETURN boolean;

--++
-- Description: This procedure is used in transport script to throw a SQL
-- error so that the transport script can exit.
--
-- Inputs: should_exit - whether to exit from transport script
--
-- Outputs: None
--
-- EXCEPTIONS: ORA-9330
--++
PROCEDURE exit_transport_script(
should_exit IN varchar2);
END;

ocp考题:

429.Which of the following supplied functions is used to identify external tables, directories, and BFILES?

A. DBMS_TDB.CHECK_DIRECTORIES

B. DBMS_TDB.CHECK_EXTERNAL

C. DBMS_TDB.CHECK_BFILE

D. DBMS_TDB.CHECK_EXT

Answer: B

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/appdev.112/e40758/d_tdb.htm#ARPLS68854

The DBMS_TDB package reports whether a database can be transported between platforms using the RMAN CONVERT DATABASE command. The package verifies that databases on the current host platform are of the same endian format as the destination platform, and that the state of the current database does not prevent transport of the database.

Overview

In many cases, Oracle supports transporting databases between platforms which have the same endian format. However, even when the endian formats are the same, a database must undergo a conversion process to move from one platform to another. There are also preconditions required for the process of transporting a database, such as having the database to be transported open read-only.

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.

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> DECLARE

external BOOLEAN;

BEGIN

external := 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_MEDIA

PL/SQL procedure successfully completed.

dbms_tdb包解析

时间: 2024-08-10 21:30:37

dbms_tdb包解析的相关文章

Android实习札记(3)---Fragment用app包还是v4包解析

Android实习札记(3)---Fragment用app包还是v4包解析 1)问题简述 相信很多的朋友在调用Fragment都会遇到下面的情况: 这个时候问题来了... 到底是用android.app下的Fragment还是用的android.support.v4.app包下的Fragment? 答:其实都可以,没错,都可以!!!我们都知道Fragment是3.0(API 11)后引入的 那么如果开发的app需要在3.0以下的版本运行呢?比如还有一点点市场份额的2.3! 于是乎,v4包就这样应

Struts2+hibernate 配置环境 架包解析

hibernate 配置需要jar的注释. antlr -2.7.6.jar   //一个语言转换工具,没有此包,hibernate不会执行hql语句,hibernate用它实现hql到sql的转换模板相关操作需要包. asm.jar  //asm是小巧轻便的java字节码操控框架,它能方便地生成和改造java代码.hibernate和spring在底层叠 都用到了 asm. asm-attrs.jar//ASM字节码库,如果使用cglib则必要 ehcache-1.2.jar//如果想使用缓存

Android做法说明(3)---Fragment使用app袋或v4包解析

Android做法说明(3)---Fragment使用app袋或v4包解析 1)问题简述 相信非常多的朋友在调用Fragment都会遇到以下的情况: watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvY29kZXJfcGln/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/SouthEast" > 这个时候问题来了... 究竟是用android.app下的Fragmen

Linux命令行抓包及包解析工具tshark(wireshark)使用实例解析

在Linux下,当我们需要抓取网络数据包分析时,通常是使用tcpdump抓取网络raw数据包存到一个文件,然后下载到本地使用wireshark界面网络分析工具进行网络包分析. 最近才发现,原来wireshark也提供有Linux命令行工具-tshark.tshark不仅有抓包的功能,还带了解析各种协议的能力.下面我们以两个实例来介绍tshark工具.1.安装方法 CentOS: yum install -y wireshark    Ubuntu: apt-get install -y tsha

蓝牙4.0BLE抓包(二) – 广播包解析

本文转自:http://www.cnblogs.com/aikm/p/5022502.html 感谢原创作者! SleepingBug评论:这篇文档写的相当好,受教了,多谢了!   作者:强光手电[艾克姆科技-无线事业部] 在使用EN-Dongle捕获和解析广播包之前,我们先了解一下BLE报文的结构,之后,再对捕获的广播包进行分析.在学习BLE的时候,下面两个文档是极其重要的,这是SIG发布的蓝牙的核心协议和核心协议增补. 核心协议Core_v4.2. 核心协议增补CSS v6. 虽然这两个文档

C#百度图片识别API调用返回数据包解析

百度图片识别api接口 public static JObject GeneralBasic(string apikey,string secretkey,string path) { var client = new Baidu.Aip.Ocr.Ocr(apikey, secretkey); var image = File.ReadAllBytes(path); // 通用文字识别 var result = client.GeneralBasic(image, null); return r

C++版的网络数据包解析策略(升级版)

初版:http://www.cnblogs.com/wjshan0808/p/6580638.html 说明:在实现了对应的接口后该策略可以适合绝大多数的网络数据包结构 首先,是三个接口 IProduceProxy.h #ifndef _I_PRODUCE_PROXY_H_ #define _I_PRODUCE_PROXY_H_ //Code #define CODE_PRODUCE_PROXY_OK 0x00 //OK #define CODE_PRODUCE_PROXY_NI 0x01 //

一行代码解析复杂JSON文件:利用Android自带的包解析JSON

上周写了一篇关于Android自带的org.JSON与JSONLIB相冲突的文章,今天我想写一下我对org.json使用的小心得 由于学校项目要求解析一个复杂JSON,所以就上网搜了一下,不过Google一搜JSON数据解析,会出现五花八门的结果,JSONLIB, GSON, FASTJSON等等,唯独没有对org.json的使用,其实Android自带的JSON解析包相当好用,其用法与JSONLIB类似,我是先用的JSONLIB,在JRE环境下用得好好的,到了Android下怎么都跑不通(原来

BLE广播数据的抓包解析

前言: 报文由数据字节组成同时是按比特传输的,这就免不了牵涉到字节序的问题. 对于各个字节的传输,总是从最低位开始传输.如0x80是按00000001发送的,0x01是按10000000发送的. 同时大多数字节域又是从低字节开始发送的.如0x010203发送序列为110000000100000010000000 之所以说大多数,是因为并不是所有的数据都会从低字节发送从后面的抓取的广播报文中也能看不来. 另外由于抓包软件可能并不一定能完全知道哪些数据时从低字节开始发的,抓取的广播数据可能有一些需要