Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1830
  • Last Modified:

calling ISQL with read from file Parameters

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
MyersA
Asked:
MyersA
  • 2
1 Solution
 
grant300Commented:
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
 
bretCommented:
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
 
MyersAAuthor Commented:
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
 
grant300Commented:
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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now