Re: ISQL call problem



Kamyk (marcinzmyslowski@xxxxxxxxxxxxxx) writes:
> Uzytkownik "Erland Sommarskog" <esquel@xxxxxxxxxxxxx> napisal w wiadomosci
>>> I have the following problem. I`ve opened a Query Analyser and write the
>>> statement:
>>>
>>> -isql -S 'PL6XXXX' -i 'd:\SQL_Server_2000\Raport_WWW.sql'
>>>
>>> I got the following erorr message:
>>>
>>> Incorrect syntax near -S
>>>
>>> How to call the statement which is placed inside the 'Raport_WWW.sql'
>>> file, which is located on folder D:\SQL_Server_2000??? Do I have to do
>>> it in the cmd panel???
>>
>> Yes, you must open a command-line window. Query Analyzer is for running
>> T-SQL commands. ISQL is a Windows program, and not an SQL command.
>
> How would the statement look like if I would like to open run in in Query
> Analyser??

In addition to Stu's reply, you *can* invoke ISQL from SQL Server by running
xp_cmdshell:

EXEC master..xp_cmdshell
'-isql -S "PL6XXXX" -i "d:\SQL_Server_2000\Raport_WWW.sql"'

However, normally you need sysadmin rights to run xp_cmdshell. And,
the file path where would be on the machine on which SQL Server is
running, so if this file is on your workstation, ISQL would not find it.
Unless, that is, the SQL Server you are connecting to is on your on
workstation.


--
Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinfo/productdoc/2000/books.asp

.



Relevant Pages

  • Extreme performance issues (SQL Server 2000/ADO.NET/C#)
    ... This process runs very quickly if run through Query ... same exact stored procedures and views, run in the same exact order, through ... system that runs SQL Server (a 4-cpu Xeons system with 2gigs of physical ... When I execute these steps manually through query analyser,, ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: ISQL call problem
    ... > Marcin Zmyslowski writes: ... I`ve opened a Query Analyser and write the ... > Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx ...
    (comp.databases.ms-sqlserver)
  • Re: ISQL vs OSQL
    ... What is difference between ISQL and OSQL? ... What is a reason to use either of the tools rather than Query ... as a SQL Server 6.5 client when connected. ...
    (microsoft.public.sqlserver.tools)
  • Re: Cannot execute through ISQL
    ... Here is the command and query.. ... Client machine is only installed with MS SQL 7.0 Client ... SQL Server 2000 SP3, which is in WAN. ... through isql, understand isql doesnot make use of ODBC. ...
    (microsoft.public.sqlserver.clients)
  • Re: No value given for one or more required parameters
    ... Query Analyser is part of SQl Server. ... > within the quotes. ...
    (microsoft.public.vb.database.ado)