Re: ISQL call problem
- From: Erland Sommarskog <esquel@xxxxxxxxxxxxx>
- Date: Sun, 14 Aug 2005 08:53:55 +0000 (UTC)
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
.
- References:
- ISQL call problem
- From: Marcin Zmyslowski
- Re: ISQL call problem
- From: Erland Sommarskog
- Re: ISQL call problem
- From: Kamyk
- ISQL call problem
- Prev by Date: Re: GROUP BY column-name problem (need expression)
- Next by Date: Updateable vuew
- Previous by thread: Re: ISQL call problem
- Next by thread: Updateable vuew
- Index(es):
Relevant Pages
|