zoukankan      html  css  js  c++  java
  • java调用sqlldr oracle 安装的bin目录

    package com.jyc.sqlldr;

    import java.io.BufferedReader;
    import java.io.InputStream;
    import java.io.InputStreamReader;

    public class SqlldrtTest {
    public static void main(String[] args) {
    // String
    // cmd="D:/oracle/ora92/bin/sqlldr userid=test/test@testdb skip=1 control=e:/test.ctl bad=e:/bad.txt";
    String cmd = "d:/db/oracle/product/10.2.0/db_2/bin/sqlldr userid=jyc/jyc@orcl control=C:/mycontrl.ctl bad=c:/bad.txt";
    try {
    Process ldr = Runtime.getRuntime().exec(cmd);
    InputStream stderr = ldr.getInputStream();
    InputStreamReader isr = new InputStreamReader(stderr);
    BufferedReader br = new BufferedReader(isr);
    String line = null;
    while ((line = br.readLine()) != null)
    System.out.println("*** " + line);
    stderr.close();
    isr.close();
    br.close();
    try {
    ldr.waitFor();
    } catch (Exception e) {
    System.out.println("process function:loader wait for != 0");
    }
    } catch (Exception ex) {
    System.out.println("process function:loader execute exception"
    + ex.toString());
    }
    }
    }

  • 相关阅读:
    EVM靶机渗透
    Joomla漏洞复现
    渗透测试
    Kali软件库认识
    谷歌hack语法
    Metasploit学习
    sqli-labs less-17
    sqli-labs(less-11-16)
    sqli-labs (less-8-less-10)
    less-7
  • 原文地址:https://www.cnblogs.com/qq3245792286/p/6216927.html
Copyright © 2011-2022 走看看