Suppose you want to give the data backup option in Oracle Forms application to some client users, where you have installed Oracle 11g client or direct from server.

The following procedure executes a batch file placed in current working directory of the application and the batch file contains the following line:

exp.exe userid=%1 FULL=N FILE=%2

Means you have to pass two parameters to this batch file one is username/password@connectstring and another is the filename with location. The following procedure runs this batch file and passes the required parameters.

Example:

PROCEDURE DO_BACKUP IS
    USERID VARCHAR2(50) := GET_APPLICATION_PROPERTY(USERNAME);
    PSW    VARCHAR2(50) := GET_APPLICATION_PROPERTY(PASSWORD);
    CSTRING VARCHAR2(50) := GET_APPLICATION_PROPERTY(CONNECT_STRING);
    fPathName varchar2(200);
    BDIR VARCHAR2(1000);
    DMPFILENAME VARCHAR2(100);
BEGIN    
    MESSAGE( 'Doing Backup...');
    SYNCHRONIZE;
    if bdir is null then
            select BKPDIR into bdir 
              from URparam 
              where Pcode = 'BACKUP';
    end if;
     if Substr(bdir,length(bdir),1) != '\' then
         bdir := rtrim(bdir) || '\';
    end if;        
    bdir := ltrim(rtrim(bdir));
             dmpfilename := to_char(sysdate, 'ddMONyy')||'_'||dbms_random.string('x', 5);
            host('backup.bat '||USERID||'/'||PSW||'@'||cstRING||' '||bdir||dmpfilename);
    exception
         when others then
            message('Please check parameters for the backup option.');
END;

Note: The connect string is used by oracle forms client should be the same as oracle 11g client or oracle servers connect string.

Giving Data Backup Option in Oracle Forms 6i的更多相关文章

  1. Displaying Window In Center In Oracle Forms 6i

    Center window automatically  in Oracle Forms 6i, use the following procedure by passing window name ...

  2. Get_File_Name Usage in Oracle Forms 6i

    Get_File_Name is built-in function of Oracle Forms 6i, used to get the file name with address by bro ...

  3. Changing Icon File Of Push Button At Runtime In Oracle Forms 6i

    Set Icon_File property in When-Mouse-Enter trigger Suppose you are creating icon based menu system i ...

  4. Freebie - Utility Form: Generate Excel Report From SQL Query In Oracle Forms 6i And 11g

    Sharing a form to generate Excel file report from SQL query in Oracle Forms. This form can be used i ...

  5. Run_Product Example Form - Oracle Forms 6i

    I have already posted in my previous post Running Reports Using Run_Product to run reports in Oracle ...

  6. Date Picker Calendar For Oracle Forms 6i

    Giving date picker calendar option to user for date type fields in Oracle Forms. I am providing you ...

  7. Download Oracle Forms 6i

    To download Oracle Forms Developer 6i from Oracle click this link http://download.oracle.com/otn/nt/ ...

  8. How To Use DBLink In Oracle Forms 6i

    You want to connect multiple databases in oracle forms to perform certain tasks, for example you nee ...

  9. Freebie: Date Picker Calendar Demo Form For Oracle Forms 6i

    I have already posted and provided the required PLSQL Library and the Calendar FMX file in my previo ...

随机推荐

  1. Cocos2d-x环境搭建

    资源列表 官网上下载最新的cocos2d-x-3.3. 安装JDK,Eclipse,CDT插件,ADT插件. 下载Android SDK,更新.因为国内经常访问不了google,用vpn速度也有点慢. ...

  2. hover事件优化(延时操作)

    JQ的hover事件拓展 编写原因:当鼠标滑过某个带有hover事件的元素,但是仅仅是路过,并不是希望查看此部分内容的时候,效果不理想 $.fn.extend({ delayed : function ...

  3. 服务设计模式一:Web服务概述

    目录 1. Web服务是什么 2.为什么要使用Web服务 3.Web服务考虑的因素和替代方案 4.SOA是什么 Web服务是什么? 所谓服务,通俗的理解就是别人帮你做一些事情,比如说,腰酸背痛了,找个 ...

  4. Git 学习01

    一.下载并安装git bash 双击打开出现命令窗口 创建一个版本库非常简单,首先,选择一个合适的地方,创建一个空目录: cd F: mkdir learngit pwd F/learngit 显示当 ...

  5. Git add 常见用法

        Git add   git add [参数]  [--] <路径> //作用就是将我们需要提交的代码从工作区添加到暂存区,就是告诉git系统,我们要提交哪些文件,之后就可以使用gi ...

  6. windows 文件权限导致的 git 问题

    windows 文件权限导致的 git 问题 在 windows 上使用 git 时,会遇到明明什么都没有改动,但是 git status 显示一堆文件被修改.这时,通过 git diff 可看到什么 ...

  7. 深入浅出Docker(一):Docker核心技术预览

    Docker是PaaS供应商dotCloud开源的一个基于LXC 的高级容器引擎,源代码托管在 GitHub 上, 基于Go语言开发并遵从Apache 2.0协议开源.Docker提供了一种在安全.可 ...

  8. CoreAnimation--CALayer的动画

    CoreAnimation--CALayer的动画 核心动画中所有类都遵守CAMediaTiming CAAnaimation和CAPropertyAnimation都是抽象类,本身不具备动画效果,必 ...

  9. 部署移动BI必须要考虑的五大因素

    随着大屏智能手机和平板电脑的普及,商业智能分析应用程序也需要移动化.由于用户并不会长时间在办公桌前工作.在新的设备以及新的用户的共同促进下,移动BI即将成为主流. 但是,所有人都应该清楚这样一个事实: ...

  10. NULL对反连接的影响

    测试准备: create table t1(col1 number,col2 varchar2(1)); create table t2(col2 varchar2(1),col3 varchar2( ...