///ShellOSQL.cs
using System;
using System.Diagnostics;
namespace ProInstall
{
public class ShellOSQL
{
static void Main()
{
ProcessStartInfo Info = new System.Diagnostics.ProcessStartInfo();
Info.FileName="osql.exe";
//Info.Arguments="Ocean.SQL";
Info.Arguments = string.Format(" -S{0} -U{1} -P{2} -i{3}", "Ocean","sa","sa","c:\\Ocean.SQL");
Info.WorkingDirectory="C:\\Documents and Settings\\Ocean\\My Documents\\Visual Studio Projects\\ProInstall\\bin\\Debug";
}
}
}
///Ocean.SQL
update pubs..titles set type='Ocean' where title_id='BU1032'
///osql.exe
默认目录为:
C:\Program Files\Microsoft SQL Server\80\Tools\Binn
把osql.exe复制到C:\\Documents and Settings\\Ocean\\My Documents\\Visual Studio Projects\\ProInstall\\bin\\Debug目录下.
上面的程序是我写的对C#代码,使用到了OSQL.EXE,现在我要实现的是对ORACLE同样的操作,问题是不知道ORACLE有没有OSQL.EXE的功能??在线等......
using System;
using System.Diagnostics;
namespace ProInstall
{
public class ShellOSQL
{
static void Main()
{
ProcessStartInfo Info = new System.Diagnostics.ProcessStartInfo();
Info.FileName="osql.exe";
//Info.Arguments="Ocean.SQL";
Info.Arguments = string.Format(" -S{0} -U{1} -P{2} -i{3}", "Ocean","sa","sa","c:\\Ocean.SQL");
Info.WorkingDirectory="C:\\Documents and Settings\\Ocean\\My Documents\\Visual Studio Projects\\ProInstall\\bin\\Debug";
}
}
}
///Ocean.SQL
update pubs..titles set type='Ocean' where title_id='BU1032'
///osql.exe
默认目录为:
C:\Program Files\Microsoft SQL Server\80\Tools\Binn
把osql.exe复制到C:\\Documents and Settings\\Ocean\\My Documents\\Visual Studio Projects\\ProInstall\\bin\\Debug目录下.
上面的程序是我写的对C#代码,使用到了OSQL.EXE,现在我要实现的是对ORACLE同样的操作,问题是不知道ORACLE有没有OSQL.EXE的功能??在线等......
执行Sqlplus需要如何配置?
(我的操作系统是Windows XP)
除了Copy SqlPlus.exe到本地,还需要什么样的配置??
太大了就不行了,关键还要支持SQLPLUS.exe
其中wangybyangxr(王永斌) 介绍的http://youngcow.net站点上有免安装版的下载。压缩文件是11M,解压后是36M。还可以再裁剪。