Monday, February 20, 2012

isql.exe vs isqlw.exe vs osql.exe

I've tried running a script (creates a bunch of SPs) using all three
command-line utilities, but have observed very different performance on
each.
isql.exe isqlw.exe osql.exe
11:14 134 01:20 773 05:01 650
As you can see, the time to execute varies quite a bit.
Can anyone offer an explanation for this?
When should you use one or the other?
Any guidance would be much appreciated. Thanks.
FYI - Here are the command line switches used:
isql.exe -SMyServer -UMyUserId -PMyPassword -dMyDatabase -iMyInputFile.sql -oMyOutputFile.log
-a4096 -c -n -w8000
isqlw.exe -SMyServer -UMyUserId -PMyPassword -dMyDatabase -iMyInputFile.sql
-oMyOutputFile.log
osql.exe -SMyServer -UMyUserId -PMyPassword -dMyDatabase -iMyInputFile.sql -oMyOutputFile.log
-a4096 -c -n -w8000
Henri Fournier
Henri Fournier wrote:
> I've tried running a script (creates a bunch of SPs) using all three
> command-line utilities, but have observed very different performance
> on each.
> isql.exe isqlw.exe osql.exe
> 11:14 134 01:20 773 05:01 650
> As you can see, the time to execute varies quite a bit.
> Can anyone offer an explanation for this?
> When should you use one or the other?
> Any guidance would be much appreciated. Thanks.
> FYI - Here are the command line switches used:
> isql.exe -SMyServer -UMyUserId -PMyPassword -dMyDatabase
> -iMyInputFile.sql -oMyOutputFile.log -a4096 -c -n -w8000
> isqlw.exe -SMyServer -UMyUserId -PMyPassword -dMyDatabase
> -iMyInputFile.sql -oMyOutputFile.log
> osql.exe -SMyServer -UMyUserId -PMyPassword -dMyDatabase
> -iMyInputFile.sql -oMyOutputFile.log -a4096 -c -n -w8000
I believe OSQL uses ODBC. ISQL uses DB-Library. ISQLW uses ODBC as well,
but is a Windows application (although it can run in a pseudo-console
mode).
Not sure what you are running or why you're seeing such poor performance
with OSQL. Can you elaborate? In any case, make sure SET NOCOUNT ON is
the first item in your script.
David Gugick
Quest Software
www.imceda.com
www.quest.com
|||"David Gugick" <david.gugick-nospam@.quest.com> wrote in message
news:egk11OTcFHA.1148@.tk2msftngp13.phx.gbl...
> I believe OSQL uses ODBC. ISQL uses DB-Library. ISQLW uses ODBC as well,
> but is a Windows application (although it can run in a pseudo-console
> mode).
> Not sure what you are running or why you're seeing such poor performance
> with OSQL. Can you elaborate? In any case, make sure SET NOCOUNT ON is the
> first item in your script.
>
We have a series of scripts to update the database, where one contains all
the schema changes, another contains triggers, etc. The one I'm using to
test does a drop/create for some 500+ Stored Procedures, nothing fancy.
And yes, SET NOCOUNT ON is the first line in the script.
I just can't see why OSQL is so much slower. I've got the packetsize set to
4096, which is what the "Network package size" is set to in QA (assuming
those are in fact the same things).
I've got the columnwidth set to 8000, cause I don't want any wrapping in the
output file. Don't think this should effect performance.
Can't see any switches set or not set that can account for the performance
difference. Right?
Henri

No comments:

Post a Comment