$page_title = $titlebar_text; $header_bar_text = $titlebar_text; ///////////////////////////////////// // get header include('rlib_header.php'); // print << Oracle DBMS_TDB Version 11.1  
General Information
Purpose The DBMS_TDB package serves two purposes:
  • Confirms support of 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, identifyies the condition that prevents database transport
Source {ORACLE_HOME}/rdbms/admin/dbmsplts.sql
Constants
Name Data Type Value
SKIP_NONE NUMBER 0
SKIP_INACCESSIBLE NUMBER 1
SKIP_OFFLINE NUMBER 2
SKIP_READONLY NUMBER 3
Dependencies
DBMS_OUTPUT TS$
DBMS_PLUGTS V$DB_TRANSPORTABLE_PLATFORM
DBMS_SYS_ERROR V$TRANSPORTABLE_PLATFORM
DUAL X$KCVFH
GV$DATABASE X$KTUSUS
GV$DATAFILE X$KTUXE
Exceptions None
Security Model Execute is granted to the DBA role
 
CHECK_DB

Overload 1
dbms_tdb.check_db(
target_platform_name IN VARCHAR2,
skip_option          IN NUMBER)
RETURN BOOLEAN;
SELECT platform_name
FROM gv$transportable_platform
ORDER BY 1;

set serveroutput on

DECLARE
 x BOOLEAN;
BEGIN
  x := dbms_tdb.check_db('Microsoft Windows IA (32-bit)', 0);
  IF x THEN
    dbms_output.put_line('TRUE');
  ELSE
    dbms_output.put_line('FALSE');
  END IF;
END;
/

Overload 2
dbms_tdb.check_db(target_platform_name IN VARCHAR2) RETURN BOOLEAN;
SELECT platform_name
FROM gv$transportable_platform
ORDER BY 1;

set serveroutput on

DECLARE
 x BOOLEAN;
BEGIN
  x := dbms_tdb.check_db('Apple Mac OS');
  IF x THEN
    dbms_output.put_line('TRUE');
  ELSE
    dbms_output.put_line('FALSE');
  END IF;
END;
/

DECLARE
 x BOOLEAN;
BEGIN
  x := dbms_tdb.check_db('Linux IA (32-bit)');
  IF x THEN
    dbms_output.put_line('TRUE');
  ELSE
    dbms_output.put_line('FALSE');
  END IF;
END;
/

Overload 3
dbms_tdb.check_db RETURN BOOLEAN;
set serveroutput on

DECLARE
 x BOOLEAN;
BEGIN
  x := dbms_tdb.check_db;
  IF x THEN
    dbms_output.put_line('TRUE');
  ELSE
    dbms_output.put_line('FALSE');
  END IF;
END;
/

SHUTDOWN IMMEDIATE;

STARTUP MOUNT;

ALTER DATABASE OPEN READ ONLY;

set serveroutput on

DECLARE
 x BOOLEAN;
BEGIN
  x := dbms_tdb.check_db;
  IF x THEN
    dbms_output.put_line('TRUE');
  ELSE
    dbms_output.put_line('FALSE');
  END IF;
END;
/

SHUTDOWN IMMEDIATE;

STARTUP;
 
CHECK_EXTERNAL

Check if a database has external table, directory or BFILE. Uses  dbms_output.put_line to output
the external objects and their owners
dbms_tts.check_external RETURN BOOLEAN;
set serveroutput on

DECLARE
 x BOOLEAN;
BEGIN
  x := dbms_tdb.check_external;
  IF x THEN
    dbms_output.put_line('TRUE');
  ELSE
    dbms_output.put_line('FALSE');
  END IF;
END;
/
 
EXIT_TRANSPORT_SCRIPT
Internal: Used in transport script to throw a  SQL error so that the transport script can exit dbms_tdb.exit_transport_script(should_exit IN VARCHAR2);
Creates an ORA-09330
 
Related Topics
DBMS_EXTENDED_TTS_CHECKS
DBMS_TTS
Transportable Tablespaces
  EOM; ///////////////////////////////////// // get footer include('rlib_footer.php'); ?>