Re: execute a sql file

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Erland Sommarskog (sommar_at_algonet.se)
Date: 05/23/04


Date: Sun, 23 May 2004 22:28:55 +0000 (UTC)

joe (pearl_77@hotmail.com) writes:
> beside ISQLW, OSQL, and ISQL utilities,
> what are the other ways to execute a sql file? (in my example, I have a
> bunch of queries in this file)

Hey, you can always try ABASQL, get it on http://www.abaris.se/abaperls/,
but beware that this tools performs a whole of things behind your
back!

Or roll your own completely, write a Perl script that reads the file
and uses MSSQL:Sqllib to submit the commands.
(See http://www.sommarskog.se/mssqlperl/index.html.)

(I'm the author of both. It's freeware.)
 
> I can't use this crappy utilities because
>
> 1. ISQL sucks! too slow.
> 2. OSQL is better than ISQL, still a little slow.
> 3. ISQLW is fast, but sometimes hang, could take up to 15 minutes.
>
> any suggestions?

...on the other hand, I think your problems are elsewhere. I've never
noticed any speed problems with any of these tools as such. Unless,
that is, I have issued SELECT statements which has produced very many
rows. But if your SQL is slow, then the tools are not making it any
quicker.

So while you are welcome to try my tools, I don't think they will
change much.

-- 
Erland Sommarskog, SQL Server MVP, sommar@algonet.se
Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinfo/productdoc/2000/books.asp


Relevant Pages

  • Re: Will SQL Server Be Backward Compatible with ISQL and DB-Lib?
    ... iSql was replaced with oSql back in SQL 2000 and there was never any intention of keeping isql up to date with never versions of SQL Server. ... Attempting to use either as your main source of connection to any newer releases is a risk to say the least but have a look here for some details about db-lib. ... DB-Lib and is replacing them with OSQL and ODBC. ...
    (microsoft.public.sqlserver.programming)
  • execute a sql file
    ... beside ISQLW, OSQL, and ISQL utilities, ... what are the other ways to execute a sql file? ... ISQL sucks! ... OSQL is better than ISQL, ...
    (microsoft.public.sqlserver.programming)
  • Re: execute a sql file
    ... > You could store you SQL commands in a file, and then use T-SQL to read the ... >> beside ISQLW, OSQL, and ISQL utilities, ... ISQL sucks! ... OSQL is better than ISQL, ...
    (microsoft.public.sqlserver.programming)
  • Re: Sybase Tutorial
    ... I have cygwin installed in my machine, ... the "SQL" in the above isn't saying put your SQL ... it's a delimiter that tells the script the beginning and the ... instead of specifying the -P on the isql ...
    (comp.databases.sybase)
  • Re: CREATE DATABASE and Batch Scripts
    ... use OSQL instead of ISQL. ... In SQL 2000, these are controlled ... with ALTER DATABASE: ... > This batch file calls the isql_bat file and passes the database create SQL ...
    (microsoft.public.sqlserver.programming)