473,657 Members | 2,394 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ISQL call problem

Hello everyone!

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_2 000??? Do I have to do
it in the cmd panel???

Thank you in advance for your help
Marcin from Poland

*** Sent via Developersdex http://www.developersdex.com ***
Aug 13 '05 #1
4 3820
Marcin Zmyslowski (ma*****@kapy.b ydg.pl) writes:
Hello everyone!

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_2 000??? 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.
--
Erland Sommarskog, SQL Server MVP, es****@sommarsk og.se

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

Aug 13 '05 #2

Uzytkownik "Erland Sommarskog" <es****@sommars kog.se> napisal w wiadomosci
news:Xn******** ************@12 7.0.0.1...
Marcin Zmyslowski (ma*****@kapy.b ydg.pl) writes:
Hello everyone!

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_2 000??? 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.
--
Erland Sommarskog, SQL Server MVP, es****@sommarsk og.se

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


How would the statement look like if I would like to open run in in Query
Analyser??

Thank you very much for help
Marcin
Aug 13 '05 #3
Stu
Hey Marcin,

Let me see if I can clarify Erland's statement a bit: there are 3
client applications that you can use to run SQL commands against a SQL
server:

isql Utility
The isql utility allows you to enter Transact-SQL statements, system
procedures, and script files; and uses DB-Library to communicate with
Microsoft® SQL Server™ 2000.

The osql utility allows you to enter Transact-SQL statements, system
procedures, and script files. This utility uses ODBC to communicate
with the server.

The isqlw utility (SQL Query Analyzer) allows you to enter Transact-SQL
statements, system stored procedures, and script files. You can set up
shortcuts or create batch files to launch a preconfigured SQL Query
Analyzer.

isqlw (Query Analyzer) is most often run like a standard Windows app;
it has a GUI, which you are used to using to type in SQL statements;
the other two are run from a command prompt from windows, and can be
started up with a variety of options (including executing a .sql file).
If the SQL statements you want to run are located in a file
(Report_WWW.sql ) that you want to execute using Query Analyzer's GUI,
you need to go to the File... Open... option on the menu and open the
file like you would any windows document. You can then run the file
using CTRL-E.

Does that make sense? Of course, given that you didn't know that
indicates that you probably are just starting out with Query Analyzer.
Be sure that you trust this SQL file that you are opening; you can do a
lot of nasty things with an unprotected SQL Server.

HTH,
Stu

Aug 14 '05 #4
Kamyk (ma************ **@poczta.onet. pl) writes:
Uzytkownik "Erland Sommarskog" <es****@sommars kog.se> 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_2 000??? 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_cmds hell
'-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, es****@sommarsk og.se

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

Aug 14 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
3724
by: Rui Cunha | last post by:
Hi, i'm having some problems at work with isql*plus in what concerns with session timeouts... here is the scenario: a class with 30/40 students working on PL/SQL and requesting the database server for info.no client installation was made...they only use the isqlplus tool via browser...
1
5146
by: Jacob Grydholt Jensen | last post by:
I am trying to learn iSQL*Plus for the 1Z0-007 exam. I am having a bit of problems with the substitution variables. My understanding was that they behave as in SQL*Plus, but my experiments beg to differ. I log on to the sample schema 'hr' and enter the following statements: -- statements begin set verify on define name = K%
6
14548
by: Alex Vilner | last post by:
Hello! We have a set of individual .SQL scripts which we would like to execute against a MS SQL Server 2000. Is there any way to have ISQL utility (or any other means) to execute all of them without having to establish a separate database connection for each script: isql -Ux -Py -Ss -i script1.sql isql -Ux -Py -Ss -i script2.sql isql -Ux -Py -Ss -i script3.sql
5
23352
by: Jay Chan | last post by:
I am trying to use a command line program to run a stored procedure that generates output in a comma-delimitted format. Somehow, ISQL or OSQL always wrap the lines at 256 characters. I believe this has something to do with the column width switch (-w). But enlarging the column width to 800 characters max still doesn't help. The following is a stored procedure that is essentially doing what my stored procedure is doing: create procedure...
1
24734
by: Gary | last post by:
I want to run and 'Alter Database' statement from within a batch file. The batch file is to be run from an external automation program, (don't ask why).. I know the syntax for the alter db statement but not sure how to do it in a batch file and also If I have 2 instances how do I run it against each instance. All being done on Windows 2000 with Sql 2000. Any ideas will be a help.
3
3602
by: anuu | last post by:
Hi, I have created a database as pubs.qa and wrote a command utility to query a table. isql -S server -E -d pubs.qa -i qry.sql -b -n contents of qry.sql
3
8592
by: yanakal | last post by:
Hi, I'm using isql to query data and output the same to a flat file. The isql has the following command options ' -h-1 -w500 -n -b -s"" '. In the SQL_CODE, the first two lines before the select statement are use dbname set nocount on go When I run this, an additional blank line is put into the output file. Actually, there are two lines after the last result set in the output file. This file is being fed into another system and the...
1
11262
by: Philip Bondi | last post by:
Hello to all SQL Server junkies who work with non-English characters: For people running scripts from the command line using ANSI files with special characters, it is very important to use isql and disable "Automatic ANSI to OEM conversion": - This only affects isql from the command line, and no gui applications - http://support.microsoft.com/?scid=kb;EN-US;153449 - Start the "Client Network Utility" C:\WINDOWS\system32\cliconfg.exe
0
1602
by: rbarry | last post by:
I have a stored procedure that contains a statement like: select @myvar = count(*) from mytable where mycolumn is null when I run the procedure from query analyser a value is set in @myvar which is output to a table where I can see it. Without making any changes, when I run the identical procedure using isql to execute the procedure @myvar gets set to zero. The procedure cannot find the null values in mytable I have tried setting...
0
8413
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8842
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8740
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8513
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
4173
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4330
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2742
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1970
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1733
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.