xttcnvrtbkupdest.sql

简介: ---- Convert the incremental backup (target convert)-- Inputs: cross-plaform backupsset serveroutput on;set termout on;set verify off;DE...

--
-- Convert the incremental backup (target convert)

-- Inputs: cross-plaform backups

set serveroutput on;
set termout on;
set verify off;

DECLARE

handle varchar2(512) ;
comment varchar2(80) ;
media varchar2(80) ;
concur boolean ;
recid number ;
stamp number ;
platfrmto number;
same_endian number := 1;

sql_stmt VARCHAR2(400) := 'BEGIN
sys.dbms_backup_restore.applyDatafileTo(

dfnumber => :b1,
toname => :b2,
fuzziness_hint => 0, max_corrupt => 0, islevel0 => 0, 
recid => 0, stamp => 0); END; ';

devtype VARCHAR2(512);

BEGIN

BEGIN

  sys.dbms_backup_restore.restoreCancel(TRUE);
  devtype := sys.dbms_backup_restore.deviceAllocate; 

  sys.dbms_backup_restore.backupBackupPiece(
    bpname => '&&1',
    fname => '&&2/xtts_incr_backup',
    handle => handle, media => media, comment => comment, 
    concur => concur, recid => recid, stamp => stamp, check_logical => FALSE,
    copyno => 1, deffmt => 0, copy_recid => 0, copy_stamp => 0,
    npieces => 1, dest => 0,
    pltfrmfr => &&3);

EXCEPTION

  WHEN OTHERS
  THEN
    DBMS_OUTPUT.put_line ('ERROR IN CONVERSION ' || SQLERRM);

END ;

sys.dbms_backup_restore.deviceDeallocate;

DBMS_OUTPUT.put_line('CONVERTED BACKUP PIECE' ||

                    '&&2/xtts_incr_backup');

END;
/

exit

目录
相关文章
|
7月前
|
SQL 数据库 索引
SQL常用知识
SQL常用知识
|
7月前
|
SQL 存储 关系型数据库
sql日常总结
sql日常总结
|
SQL 数据挖掘 Python
sql8&10&11&12,3+1
sql8&10&11&12,3+1
116 0
sql8&10&11&12,3+1
|
SQL
sql last
sql last
63 0
|
SQL 网络协议 Docker
sql审核
sql审核
392 0
|
SQL 存储 缓存
或许你不知道的12条SQL技巧
或许你不知道的12条SQL技巧
|
SQL Oracle 关系型数据库
SQL必知必会(三)
作用是从一个或多个表中检索信息
|
关系型数据库
|
SQL 程序员 数据库
SQL已经48年了,为何依然使用广泛?
对于复杂的数据,SQL能找到最有效的办法来完成任务。
2990 0
|
SQL Go 移动开发
常用SQL收藏
原文:常用SQL收藏 MSSQL Split表字段 --拆分字符串之后匹配结果集合 CREATE FUNCTION [dbo].[fnSplit]( @sInputList VARCHAR(8000) -- List of delimited items , @sDelimi...
785 0