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. Larbin初试

    前阵子找工作的时候经常会看到epoll多路复用的知识点,无奈自己一点都不懂.慌忙之际也只能去了解个大概.所以最近闲下来之后想要基于epoll机制实现一个比较有用的东西,刚好最近又想爬些东西,希望这次能 ...

  2. php数字操作,高精度函数,保留计算结果小数位

    $l = 45456.51; $r = 455778.44; $e = '100.00'; $f= '500.00'; $res = bcadd($l, $r,3);//小数点后的位数,精度就是由这个 ...

  3. copy module

    需求,当有一个实例a,我们需要一个新的实例b,b同a拥有相同的属性. 当我们使用a=b的模式的时候是一个赋值的过程.a和b指向同一个实例.b的任何操作都同a一样. 在这个使用需要使用copy模块.根据 ...

  4. jquery 绑定事件的方法

    jQuery中提供了四种绑定事件的方法,分别是bind.live.delegate.on,对应的解除监听的函数分别是unbind.die.undelegate.off: 一.on()方法(首选方法) ...

  5. 为什么要 MySQL 迁移到 Maria DB

    在Oracle收购了SUN公司之后, MySQL很不幸的落在了Oracle的手中,MySQL与Oracle DB存在竞争关系,很可能导致Oracle公司影响MySQL的开发与开放.MySQL之父Wid ...

  6. connect to https://dl-ssl.google.com refused

    这个可能是网络问题,国内连google服务器经常连不上. 尝试用下面办法试下: 1.上图SDK Manager 的 Tools ->Options打开SDK Manager的Settings, ...

  7. [转]Android Studio系列教程六--Gradle多渠道打包

    转自:http://www.stormzhang.com/devtools/2015/01/15/android-studio-tutorial6/ Android Studio系列教程六--Grad ...

  8. file_get_contents抓取远程URL内容

    /** * POST URL * @param $url * @param null $post * @return false / string */ public static function ...

  9. python 安装pillow

    安装 警告 Pillow >= 2.1.0 不支持 “import _imaging”.请使用 “from PIL.Image import core as _imaging” 代替. 警告 P ...

  10. mysql apache php install

    设置LINUX自动匹配环境变量 1.$su #su进入root #vi /etc/profile 在文件末尾加上下列语句: PATH=$PATH:/sbin #在PATH变量后追加/sbin目录 ex ...