要建立一个批处理文件,具体的ORACLE的连接没有写过,SQL的写过
@echo off
osql /Usa /Psa /SBAISYO-SERVER建立一个扩展名为.BAT的文件,例如,Connect.batlearn and UP

解决方案 »

  1.   

    我做的是这个
    @echo off
    sqlplus internal/oracle 
    startup
    有个问题 是他只执行sqlplus internal/oracle 
    不执行startup
    帮忙看看
      

  2.   

    怎没人 关注啊
    我倒可以 曲线解决就是 把 startup 写道 testname.sql 类型文件中,然后 在批处理中调用此文件,
    调用命令是 @testname.sql,
    但我有疑问是,怎样 把 这些文件都写到 .bat 中让其执行???
      

  3.   

    我觉得hite2008()说的差不多了,至于:
    “但我有疑问是,怎样 把 这些文件都写到 .bat 中让其执行???”
    直接新建一个文件把他改成.bat格式不就完了吗,如:testname.sql中:     
         startup;
    connect.bat中
         sqlplus connect internal/oracle @testname.sql我觉得大概就是这样,然后把connect.bat添加到计划任务中应该就可以了,供参考~!
      

  4.   

    先新建一个文本文件,在里面写入sqlplusw username/password然后保存为.bat文件就ok
      

  5.   

    @echo off
    echo connect internal/oracle>startup.sql
    echo startup>>startup.sql
    echo exit>>startup.sql
    echo -->>startup.sql
    sqlplus /nolog @@startup.sql
      

  6.   

    建一个批处理文件如:execute.bat,内容如下:
    sqlplus /nolog @start.sql建一个start.sql文件,内容如下:
    connect internal/oracle
    startup
    /
    exit;