Solved

calling ISQL with read from file Parameters

Posted on 2008-06-10
4
1,819 Views
Last Modified: 2010-04-21
We have a batch program that runs several queries stored in a text file. ISQL is invoked like this:
> isql -c "uid=dba;pwd=sql;dbn=mydb" read D:\IMS\Queries\RptGen.sql

For some unknown reason, now I'm getting error:
"isql: unknown option read" and a list of all the available parameters that isql accepts.

This has been running for several months. I have no idea why it's not running now. But it's driving me crazy.

Well, now it doesn't. How can I modify this command line so that all the parameters are correct and I can run the scripts?

We have v5.5.04.

Thanks,
VM
0
Comment
Question by:MyersA
  • 2
4 Comments
 
LVL 19

Accepted Solution

by:
grant300 earned 100 total points
ID: 21753573
Sounds like is may be a path problem and I have an idea why.

Have you or someone else recently installed MySQL on the machine?  MySQL has a utility called "isql" as well but it is, obviously, not compatible with Sybase products.

The other possibility is that something changed with the login and the path required to get to the Sybase directories is no longer there so it is picking up the MySQL version of ISQL.  Often on LINUX, MySQL is installed as part of the standard distribution so this problem is out there waiting for the unsuspecting.

Try two things.  Run ISQL from the command line and see if you can log into your ASA database.  The other thing to try is modifying your batch job to specify the complete path to the ISQL executable.  If the rest of the paths are screwed up, it won't work, but it will behave differently.

Regards,
Bill
0
 
LVL 10

Expert Comment

by:bret
ID: 21754801
Hm.  The isql I'm used to (the one that comes with ASE) doesn't have this syntax, rather -c is used to change the batch terminator, and there is no read option - you would use either "-i <input file>" or on UNIX "<< inputfile".  

What does "isql -v" indicate?
Does "truename isql"  indicate an unexpected directory location?
http://www.robvanderwoude.com/files/truename_nt.txt


0
 
LVL 2

Author Closing Comment

by:MyersA
ID: 31465858
That was it.

Apparently someone installed something that has an isql.exe . Mysql isn't installed here but there are a few sql editors installed.
I added the whole path to the sybase isql.exe, and it worked.

Thanks.
0
 
LVL 19

Expert Comment

by:grant300
ID: 21754901
You are very welcome.

Bret, they are using v5.something of ASA which had different command line options for ISQL.

Regards,
Bill
0

Featured Post

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This tutorial shows how to create a greeting card by combining two image layers and a text layer on a PC using a free image editing app.
SEO can be a real minefield to navigate, but there are three simple ways to up your SEO game just be re-assessing your content output.
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question