Re: Sybase Client, issues with isql



On Nov 30, 2:06 am, Rajesh <raj...@xxxxxxxxxxxxxxxxxxxx> wrote:
On Nov 30, 9:51 am, Keith <keith.wing...@xxxxxxxxxxxxxxxxx> wrote:





On Nov 29, 12:10 am, Rajesh <raj...@xxxxxxxxxxxxxxxxxxxx> wrote:

On Nov 29, 1:54 am, Keith <keith.wing...@xxxxxxxxxxxxxxxxx> wrote:

On Nov 27, 10:44 am, Rajesh <raj...@xxxxxxxxxxxxxxxxxxxx> wrote:

On Nov 23, 7:29 pm, Keith <keith.wing...@xxxxxxxxxxxxxxxxx> wrote:

On Nov 22, 12:57 am, Rajesh <raj...@xxxxxxxxxxxxxxxxxxxx> wrote:

Hi,
I am trying to establish a connection from windows with sybase server
located on unix. I have created a Server Name Entry using DSEDIT. The
name being SDESK. I pinged the server from the DSEDIT utility and it
worked.

How do I login to the database now ? I use the isql command as given
below.
isql -Uxxx -Pxxx -SSDESK

But I am getting the error

CT-LIBRARY error:
ct_connect(): protocol specific layer: external error: There
is a tds protocol error. An illegal token was received.

I am having a problem now to know what is the way to connect to
sybase. Need I create a DSN for this ? I see a driver "Sybase ASE ODBC
Driver" in the ODBC administrator. Is that the one I should use ?

Please help.

Regards,
Rajesh

In the DOS (cmd, or command) window you ran this from, is %SYBASE%
set. (The SET command will show you).

Is there a SQL.INI in that directory, er, uh, folder, and is it
correct? (NOTEPAD.EXE or "type" the file....).

Are you sure the ISQL.EXE you're running is the one for the correct
Sybase client and not the one for e.g. MS SQL-Server, Informix, ...?

(There's no "which" or "whence" AFAIK in DOS, so you'll have to try to
call the thing w/ an absolute PATH to be sure).

Keith

Keith,
Thanks for the reply. When I do SET %SYBASE% in DOS, I get the
following message.
Environment Variable c:\sybase not defined.- Hide quoted te
- Show quoted text -

The DOS syntax is e.g.:

Y:\>set SYBASE=C:\Sybase

Y:\>isql -U guest
Password:

It's probably better to set it in Windows, but M$ keeps moving (from
Win version to Win version) the location of what on my Win2K box is:
Start->Settings->ControlPanel->System=>Advanced-
=>EnvironmentVariables.

It looks like whatever you did is causing the DOS shell to
"interpolate" (in Perl-speak) the contents of the variable when you
want a lexical token representing the variable itself. What do you
get when you type the command "ver" at the DOS prompt?

Keith,

I have set the SYBASE variable. Now it reads.

C:\>set SYBASE
SYBASE=C:\Sybase
SYBASE_JRE=c:\sybase\shared-1_0\jre1.2.2
SYBASE_OCS=OCS-12_5

The Ver variable gives the following output.

C:\>ver

Microsoft Windows XP [Version 5.1.2600]

Despite setting the environment variable, I still get the same error.

Regards,
Rajesh

Okay, so I continue to think that either:

a) Despite passing the DSEDIT ping test (I confess to not using
DSEDIT, almost ever) your C:\Sybase\SQL.INI is malformed.
b) You are not running the ISQL that came with your PC client.

If you try:

C:\Sybase\OCS-15_0\bin\isql -S Server -U User -P Pass -D Dbname

you should be able to connect to "Server" specified in C:\Sybase\ini
\sql.ini whose entry should look like:

master=TCP,Server,Port
query=TCP,Server,Port

No?

I do recall getting this error once when trying to generate a SQL.INI
from the Unix $SYBASE/interfaces file we care rather more
about in our environment. The SQL.INI parser is fairly fastidious.
If you don't have access to Unix, Linux, Cygwin, or MKS tools
where you might do a "sed -n '1,$l'" or "od" on it, couldn't you open
it an editor like brief or slick or ultra-edit which will show you
unprintable characters?

Or write a filter in Perl or C which gets rid of characters for which
"isprint(c)" is not true (except newlines and spaces)?

I can send you a small C-language filter like that if it helps.

Keith- Hide quoted text -

- Show quoted text -

Keith,
This is the folder C:\Sybase\OCS-12_5 that I have got. I am trying to
run the isql from this folder.

I donot have any access to the unix server to run any script.

Is there no other way of making isql work ?

Regards,
Rajesh- Hide quoted text -

- Show quoted text -

I think I've confused you. I'm not suggesting going to your Unix
server; only that it's easy to corrupt a SQL.INI file and you should
double-check yours,
regardless of what the DSEDIT ping function says. Look at SQL.INI
below the folder you're running ISQL.EXE from:

C:\Sybase\OCS-12_5\INI\SQL.INI

and edit this file using an editor which shows non-printable
characters (^M, ^J, ^L, etc.) such as Brief,Slick,Ultra-Edit, etc.

It should look more or less like:

master=TCP,Server,Port
query=TCP,Server,Port


Where Server is a resolvable (e.g.: pingable) name of your Sybase
server, and Port is the number on which the Sybase dataserver is
listening, e.g.: 5100.

Does it?

If not, I'd suspect that your client install failed in some way.

Keith



.



Relevant Pages

  • Re: Sybase Client, issues with isql
    ... I am trying to establish a connection from windows with sybase server ... located on unix. ... I have created a Server Name Entry using DSEDIT. ...
    (comp.databases.sybase)
  • Re: Sybase supports Apple OS X - VMS still dead at Sybase
    ... > server, Sybase Inc. on Tuesday announced here the availability of its Sybase ... Sybase's development platform is Unix, ... Supporting VMS however, ...
    (comp.os.vms)
  • Re: Sybase Client, issues with isql
    ... I am trying to establish a connection from windows with sybase server ... located on unix. ... I have created a Server Name Entry using DSEDIT. ...
    (comp.databases.sybase)
  • Get Segmentation Fault when Building Sybase
    ... When trying to install sybase 15 on fedora core 8 get the following ... Building Adaptive Server 'LOCALHOST': ... Specify a configuration file name in the RUNSERVER file to avoid this ... No external security mechanisms will be supported. ...
    (comp.databases.sybase)
  • Re: DBD::Sybase question
    ... You can interact with an ASE 15 server with a 12.5.1 client with no ... interface with all sorts of Sybase servers (including an antique 4.9.2 ... Toute utilisation de ce ...
    (perl.dbi.users)