Solved

calling ISQL with read from file Parameters

Posted on 2008-06-10
4
1,817 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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Suggested Solutions

A safe way to clean winsxs folder from your windows server 2008 R2 editions
Moving applications to the cloud or switching services to cloud-based ones, is a stressful job.  Here's how you can make it easier.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

757 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now