Solved

calling ISQL with read from file Parameters

Posted on 2008-06-10
4
1,826 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Return results from Sybase DB Query with Powershell 7 1,780
SQL Time Syntax 4 316
How to update Date column of sysbase IQ database Table 8 2,403
Clean up a mailbox 5 163
When using a search centre, I'm going to show you how to configure Sharepoint's search to only return results from the current site collection. Very useful when using Office 365 with multiple site collections.
Deploying our service is a grudge match between customer benefits and customer pain. In one corner, rolling out fixes (yay!) and delivering new features (double yay!). In the other corner, training on new features (boo – sounds like work), and chan…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

734 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