Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

URL with specific db name not working!

6 posts in JConnect version 3.0 Last posting was on 1998-11-13 16:40:53.0Z
Brian Hirsch Posted on 1998-11-11 21:55:55.0Z
Message-ID: <364A07EB.BE14379C@mmm.com>
Date: Wed, 11 Nov 1998 15:55:55 -0600
From: Brian Hirsch <bdhirsch@mmm.com>
X-Mailer: Mozilla 4.04 [en]C-3M/NCStd404 (WinNT; I)
MIME-Version: 1.0
Subject: URL with specific db name not working!
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Newsgroups: sybase.public.jconnect30
Lines: 20
Path: forums-1-dub!forums-master.sybase.com!forums.powersoft.com
Xref: forums-1-dub sybase.public.jconnect30:363
Article PK: 255740

Hello,

I'm building Java classes using Jconnect 4.0 to connect to Sybase ASE
11.5.1. It's my experience that even when I specify a database name in
the URL, the connection is made to the default database of the user.
For example, if I construct a URL as follows:

jdbc:sybase:Tds:<host>:<port>/<database>

and do a getConnection , I have really connected to the user's default
database. I have to then execute a 'use <database>' to get to the
database I specified in the URL. The '/<database> is ignored.

The 4.0 documentation states:

"You can connect to a specific database using this format:
jdbc:sybase:Tds:host:port/database "
(Jconnect for JDBC Programmer's Reference page 2-10)

This doesn't appear to work. Comments?

Regards,

Brian Hirsch


Carl Edwards Posted on 1998-11-12 03:43:51.0Z
Message-ID: <364A5977.9E00D74B@sybase.com>
Date: Wed, 11 Nov 1998 19:43:51 -0800
From: Carl Edwards <cedwards@sybase.com>
X-Mailer: Mozilla 4.03 [en] (WinNT; I)
MIME-Version: 1.0
To: Brian Hirsch <bdhirsch@mmm.com>
Subject: Re: URL with specific db name not working!
References: <364A07EB.BE14379C@mmm.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Newsgroups: sybase.public.jconnect30
Lines: 28
Path: forums-1-dub!forums-master.sybase.com!forums.powersoft.com
Xref: forums-1-dub sybase.public.jconnect30:362
Article PK: 255729

Are you setting the USE_METADATA property to 'false'? The jConnect driver
would not issue the 'use <dbname>' in this situation. This was bug 171890,
and was fixed in our latest jConnect 4.0 download and is also in EBF 8144.

-Carl

Brian Hirsch wrote:

> Hello,
>
> I'm building Java classes using Jconnect 4.0 to connect to Sybase ASE
> 11.5.1. It's my experience that even when I specify a database name in
> the URL, the connection is made to the default database of the user.
> For example, if I construct a URL as follows:
>
> jdbc:sybase:Tds:<host>:<port>/<database>
>
> and do a getConnection , I have really connected to the user's default
> database. I have to then execute a 'use <database>' to get to the
> database I specified in the URL. The '/<database> is ignored.
>
> The 4.0 documentation states:
>
> "You can connect to a specific database using this format:
> jdbc:sybase:Tds:host:port/database "
> (Jconnect for JDBC Programmer's Reference page 2-10)
>
> This doesn't appear to work. Comments?
>
> Regards,
>
> Brian Hirsch


Brian Hirsch Posted on 1998-11-12 14:57:53.0Z
Message-ID: <364AF771.78C20CB8@mmm.com>
Date: Thu, 12 Nov 1998 08:57:53 -0600
From: Brian Hirsch <bdhirsch@mmm.com>
X-Mailer: Mozilla 4.04 [en]C-3M/NCStd404 (WinNT; I)
MIME-Version: 1.0
Subject: Re: URL with specific db name not working!
References: <364A07EB.BE14379C@mmm.com> <364A5977.9E00D74B@sybase.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Newsgroups: sybase.public.jconnect30
Lines: 45
Path: forums-1-dub!forums-master.sybase.com!forums.powersoft.com
Xref: forums-1-dub sybase.public.jconnect30:361
Article PK: 255736

I replyed in email to Carl, so I'll include my message below:

Thanks for replying, Carl. Yes I am setting USE_METADATA to false. I'm doing
this because we do connect to Open Servers and for Open Servers this is
needed. So, for databases I could refrain from making this setting.

However, I am using Jconnect 4.0 and have installed fix 8144. The metadata
setting is the only setting I am making. Your saying that this shouldn't be a
problem then? I still find it doesn't work.

But, thanks for the tip on the metadata setting. I'll play around with that.

Regards,
Brian Hirsch

Carl Edwards wrote:

> Are you setting the USE_METADATA property to 'false'? The jConnect driver
> would not issue the 'use <dbname>' in this situation. This was bug 171890,
> and was fixed in our latest jConnect 4.0 download and is also in EBF 8144.
>
> -Carl
>
> Brian Hirsch wrote:
>
> > Hello,
> >
> > I'm building Java classes using Jconnect 4.0 to connect to Sybase ASE
> > 11.5.1. It's my experience that even when I specify a database name in
> > the URL, the connection is made to the default database of the user.
> > For example, if I construct a URL as follows:
> >
> > jdbc:sybase:Tds:<host>:<port>/<database>
> >
> > and do a getConnection , I have really connected to the user's default
> > database. I have to then execute a 'use <database>' to get to the
> > database I specified in the URL. The '/<database> is ignored.
> >
> > The 4.0 documentation states:
> >
> > "You can connect to a specific database using this format:
> > jdbc:sybase:Tds:host:port/database "
> > (Jconnect for JDBC Programmer's Reference page 2-10)
> >
> > This doesn't appear to work. Comments?
> >
> > Regards,
> >
> > Brian Hirsch


Carl W. Edwards Posted on 1998-11-12 15:28:49.0Z
Message-ID: <364AFEB1.70270202@sybase.com>
Date: Thu, 12 Nov 1998 07:28:49 -0800
From: "Carl W. Edwards" <cedwards@sybase.com>
Organization: Sybase, Inc.
X-Mailer: Mozilla 4.07 [en] (WinNT; I)
MIME-Version: 1.0
To: Brian Hirsch <bdhirsch@mmm.com>
Subject: Re: URL with specific db name not working!
References: <364A07EB.BE14379C@mmm.com> <364A5977.9E00D74B@sybase.com> <364AF771.78C20CB8@mmm.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Newsgroups: sybase.public.jconnect30
Lines: 62
Path: forums-1-dub!forums-master.sybase.com!forums.powersoft.com
Xref: forums-1-dub sybase.public.jconnect30:360
Article PK: 254620

Brian,

I just tried EBF 8144 using IsqlApp to a database that doesn't exist:

java IsqlApp -U sa -P "" -S jdbc:sybase:Tds:ss:5000/foo?USE_METADATA=false

SqlState: 010SK java.sql.SQLWarning: 010SK: Database cannot set connection
option Attempt to locate entry in sysdatabases for database 'foo' by name
failed - no entry found under that name. Make sure that name is entered
properly. ., ErrorCode: 0

Enter a query:
1 > quit

From the error, it is trying to execute the 'use <dbname>' command. What happens
when you try this?

-Carl

Brian Hirsch wrote:

> I replyed in email to Carl, so I'll include my message below:
>
> Thanks for replying, Carl. Yes I am setting USE_METADATA to false. I'm doing
> this because we do connect to Open Servers and for Open Servers this is
> needed. So, for databases I could refrain from making this setting.
>
> However, I am using Jconnect 4.0 and have installed fix 8144. The metadata
> setting is the only setting I am making. Your saying that this shouldn't be a
> problem then? I still find it doesn't work.
>
> But, thanks for the tip on the metadata setting. I'll play around with that.
>
> Regards,
> Brian Hirsch
>
> Carl Edwards wrote:
>
> > Are you setting the USE_METADATA property to 'false'? The jConnect driver
> > would not issue the 'use <dbname>' in this situation. This was bug 171890,
> > and was fixed in our latest jConnect 4.0 download and is also in EBF 8144.
> >
> > -Carl
> >
> > Brian Hirsch wrote:
> >
> > > Hello,
> > >
> > > I'm building Java classes using Jconnect 4.0 to connect to Sybase ASE
> > > 11.5.1. It's my experience that even when I specify a database name in
> > > the URL, the connection is made to the default database of the user.
> > > For example, if I construct a URL as follows:
> > >
> > > jdbc:sybase:Tds:<host>:<port>/<database>
> > >
> > > and do a getConnection , I have really connected to the user's default
> > > database. I have to then execute a 'use <database>' to get to the
> > > database I specified in the URL. The '/<database> is ignored.
> > >
> > > The 4.0 documentation states:
> > >
> > > "You can connect to a specific database using this format:
> > > jdbc:sybase:Tds:host:port/database "
> > > (Jconnect for JDBC Programmer's Reference page 2-10)
> > >
> > > This doesn't appear to work. Comments?
> > >
> > > Regards,
> > >
> > > Brian Hirsch


Lance Andersen Posted on 1998-11-13 14:04:55.0Z
Message-ID: <364C3C87.E222AC7A@sybase.com>
Date: Fri, 13 Nov 1998 09:04:55 -0500
From: Lance Andersen <lancea@sybase.com>
X-Mailer: Mozilla 4.05 [en] (X11; I; SunOS 5.5.1 sun4m)
MIME-Version: 1.0
Subject: Re: URL with specific db name not working!
References: <364A07EB.BE14379C@mmm.com> <364A5977.9E00D74B@sybase.com> <364AF771.78C20CB8@mmm.com> <364AFEB1.70270202@sybase.com>
Content-Type: multipart/mixed; boundary="------------4D888B3A0E5C952FE174D3D2"
Newsgroups: sybase.public.jconnect40,sybase.public.jconnect30
Lines: 128
Path: forums-1-dub!forums-master.sybase.com!forums.powersoft.com
Xref: forums-1-dub sybase.public.jconnect40:232 sybase.public.jconnect30:1701
Article PK: 255137

Hi all,

Please in the future post all responses to the newsgroup instead of
emailing the team directly. We want to provide assistance, however, we
cannot always guarantee to respond to direct emails. this also allows
for others to learn and possibly comment on their experiences.


If you could, Please run the program with Debug.debug() enabled using
$JDBC_HOME/devclasses instead.


I am also confused by your comment that you are accessing an OpenServer
and not ASA or ASE. Why even pass a db name then?

Now, I do not disable the metadata info when I access an openserver and
I get the exepected exception:

alder% java Callable2

*** Warning ***

SQLState: 010MX
Message: 010MX: Metadata accessor information was not found on this
database. Error encountered while attempting to retrieve metadata
information: java.sql.SQLException: JZ0SJ: Metadata accessor information
was not found on this database.
Vendor: 0



The sample also specify a dbname on the URL and the sample still runs to
completion.

Regards
-Lance
team sybase


jConnect newsgroups moderator

Carl W. Edwards wrote:
>
> Brian,
>
> I just tried EBF 8144 using IsqlApp to a database that doesn't exist:
>
> java IsqlApp -U sa -P "" -S jdbc:sybase:Tds:ss:5000/foo?USE_METADATA=false
>
> SqlState: 010SK java.sql.SQLWarning: 010SK: Database cannot set connection
> option Attempt to locate entry in sysdatabases for database 'foo' by name
> failed - no entry found under that name. Make sure that name is entered
> properly. ., ErrorCode: 0
>
> Enter a query:
> 1 > quit
>
> From the error, it is trying to execute the 'use <dbname>' command. What happens
> when you try this?
>
> -Carl
>
> Brian Hirsch wrote:
>
> > I replyed in email to Carl, so I'll include my message below:
> >
> > Thanks for replying, Carl. Yes I am setting USE_METADATA to false. I'm doing
> > this because we do connect to Open Servers and for Open Servers this is
> > needed. So, for databases I could refrain from making this setting.
> >
> > However, I am using Jconnect 4.0 and have installed fix 8144. The metadata
> > setting is the only setting I am making. Your saying that this shouldn't be a
> > problem then? I still find it doesn't work.
> >
> > But, thanks for the tip on the metadata setting. I'll play around with that.
> >
> > Regards,
> > Brian Hirsch
> >
> > Carl Edwards wrote:
> >
> > > Are you setting the USE_METADATA property to 'false'? The jConnect driver
> > > would not issue the 'use <dbname>' in this situation. This was bug 171890,
> > > and was fixed in our latest jConnect 4.0 download and is also in EBF 8144.
> > >
> > > -Carl
> > >
> > > Brian Hirsch wrote:
> > >
> > > > Hello,
> > > >
> > > > I'm building Java classes using Jconnect 4.0 to connect to Sybase ASE
> > > > 11.5.1. It's my experience that even when I specify a database name in
> > > > the URL, the connection is made to the default database of the user.
> > > > For example, if I construct a URL as follows:
> > > >
> > > > jdbc:sybase:Tds:<host>:<port>/<database>
> > > >
> > > > and do a getConnection , I have really connected to the user's default
> > > > database. I have to then execute a 'use <database>' to get to the
> > > > database I specified in the URL. The '/<database> is ignored.
> > > >
> > > > The 4.0 documentation states:
> > > >
> > > > "You can connect to a specific database using this format:
> > > > jdbc:sybase:Tds:host:port/database "
> > > > (Jconnect for JDBC Programmer's Reference page 2-10)
> > > >
> > > > This doesn't appear to work. Comments?
> > > >
> > > > Regards,
> > > >
> > > > Brian Hirsch

--
===============================================================================
Lance J. Andersen Email: lancea@sybase.com
Sybase Product Support Engineering Phone:(781) 564-6336
77 South Bedford Street Fax: (781) 564-6148
Burlington, MA 01803

The Dark Knight Returns!!! Let's Go Penguins!!!
===============================================================================


Download VCard vcard.vcf


Brian Hirsch Posted on 1998-11-13 16:40:53.0Z
Message-ID: <364C6114.B9EA4E86@mmm.com>
Date: Fri, 13 Nov 1998 10:40:53 -0600
From: Brian Hirsch <bdhirsch@mmm.com>
X-Mailer: Mozilla 4.04 [en]C-3M/NCStd404 (WinNT; I)
MIME-Version: 1.0
Subject: Re: URL with specific db name not working!
References: <364A07EB.BE14379C@mmm.com> <364A5977.9E00D74B@sybase.com> <364AF771.78C20CB8@mmm.com> <364AFEB1.70270202@sybase.com> <364C3C87.E222AC7A@sybase.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Newsgroups: sybase.public.jconnect40,sybase.public.jconnect30
Lines: 177
Path: forums-1-dub!forums-master.sybase.com!forums.powersoft.com
Xref: forums-1-dub sybase.public.jconnect40:231 sybase.public.jconnect30:1700
Article PK: 256520

I will, in the future, keep all correspondence pointed at the news group. I would
suggest to anyone who doesn't want to receive email that you also only respond to the
news group. The responses I got came by email as well as a response to the group.
Unfortunately, I looked at my email first. Next time, I'll check the group before
answering an email. Anyway, back to the issue...

Here is where I am sitting with this. We just last weekend upgraded to Sybase 11.5.1.
As yet, I am not completely clear on the 'new' terminology. What was Sybase SQL Server
is now ASE. What was Open Server is now what? I still call it an Open Server.

I am developing classes that can be used primarily for connecting to Open Servers using
Jconnect. To do this I have included the 'USE_METADATA=false' parm. Occasionally,
these classes will be used to connect to a database. I was using the '/<database>' in
the URL and leaving in the 'USE_METADATA=false' parm. The metadata parm doesn't affect
my connection to my default database (when I wasn't specifying a particular db) so I
wasn't concerned about it.

When I run the IsqlApp program and specify /foo as the database, I would get a
message/error/warning about not being able to find foo. But, when I connected using a
URL containing /foo, I wasn't getting any warning/exception. I just found that if I
don't use the metadata parm, I do get an exception about foo.

Unless I am doing something wrong, using the metadata parm and specifying a database,
even under EBF 8144, doesn't work.

So, I will not be using the metadata parm when connecting to a database. However, I am
under the impression from the communications I have received in the last days that when
you run under EBF 8144, that it should be ok to use the metadata parm and specify a
specific database.

I have a acceptable workaround.

Thanks for everyone's help.

Regards
Brian Hirsch

Lance Andersen wrote:

> Hi all,
>
> Please in the future post all responses to the newsgroup instead of
> emailing the team directly. We want to provide assistance, however, we
> cannot always guarantee to respond to direct emails. this also allows
> for others to learn and possibly comment on their experiences.
>
> If you could, Please run the program with Debug.debug() enabled using
> $JDBC_HOME/devclasses instead.
>
> I am also confused by your comment that you are accessing an OpenServer
> and not ASA or ASE. Why even pass a db name then?
>
> Now, I do not disable the metadata info when I access an openserver and
> I get the exepected exception:
>
> alder% java Callable2
>
> *** Warning ***
>
> SQLState: 010MX
> Message: 010MX: Metadata accessor information was not found on this
> database. Error encountered while attempting to retrieve metadata
> information: java.sql.SQLException: JZ0SJ: Metadata accessor information
> was not found on this database.
> Vendor: 0
>
> The sample also specify a dbname on the URL and the sample still runs to
> completion.
>
> Regards
> -Lance
> team sybase
>
> jConnect newsgroups moderator
>
> Carl W. Edwards wrote:
> >
> > Brian,
> >
> > I just tried EBF 8144 using IsqlApp to a database that doesn't exist:
> >
> > java IsqlApp -U sa -P "" -S jdbc:sybase:Tds:ss:5000/foo?USE_METADATA=false
> >
> > SqlState: 010SK java.sql.SQLWarning: 010SK: Database cannot set connection
> > option Attempt to locate entry in sysdatabases for database 'foo' by name
> > failed - no entry found under that name. Make sure that name is entered
> > properly. ., ErrorCode: 0
> >
> > Enter a query:
> > 1 > quit
> >
> > From the error, it is trying to execute the 'use <dbname>' command. What happens
> > when you try this?
> >
> > -Carl
> >
> > Brian Hirsch wrote:
> >
> > > I replyed in email to Carl, so I'll include my message below:
> > >
> > > Thanks for replying, Carl. Yes I am setting USE_METADATA to false. I'm doing
> > > this because we do connect to Open Servers and for Open Servers this is
> > > needed. So, for databases I could refrain from making this setting.
> > >
> > > However, I am using Jconnect 4.0 and have installed fix 8144. The metadata
> > > setting is the only setting I am making. Your saying that this shouldn't be a
> > > problem then? I still find it doesn't work.
> > >
> > > But, thanks for the tip on the metadata setting. I'll play around with that.
> > >
> > > Regards,
> > > Brian Hirsch
> > >
> > > Carl Edwards wrote:
> > >
> > > > Are you setting the USE_METADATA property to 'false'? The jConnect driver
> > > > would not issue the 'use <dbname>' in this situation. This was bug 171890,
> > > > and was fixed in our latest jConnect 4.0 download and is also in EBF 8144.
> > > >
> > > > -Carl
> > > >
> > > > Brian Hirsch wrote:
> > > >
> > > > > Hello,
> > > > >
> > > > > I'm building Java classes using Jconnect 4.0 to connect to Sybase ASE
> > > > > 11.5.1. It's my experience that even when I specify a database name in
> > > > > the URL, the connection is made to the default database of the user.
> > > > > For example, if I construct a URL as follows:
> > > > >
> > > > > jdbc:sybase:Tds:<host>:<port>/<database>
> > > > >
> > > > > and do a getConnection , I have really connected to the user's default
> > > > > database. I have to then execute a 'use <database>' to get to the
> > > > > database I specified in the URL. The '/<database> is ignored.
> > > > >
> > > > > The 4.0 documentation states:
> > > > >
> > > > > "You can connect to a specific database using this format:
> > > > > jdbc:sybase:Tds:host:port/database "
> > > > > (Jconnect for JDBC Programmer's Reference page 2-10)
> > > > >
> > > > > This doesn't appear to work. Comments?
> > > > >
> > > > > Regards,
> > > > >
> > > > > Brian Hirsch
>
> --
> ===============================================================================
> Lance J. Andersen Email: lancea@sybase.com
> Sybase Product Support Engineering Phone:(781) 564-6336
> 77 South Bedford Street Fax: (781) 564-6148
> Burlington, MA 01803
>
> The Dark Knight Returns!!! Let's Go Penguins!!!
> ===============================================================================
>
> ------------------------------------------------------------------------
>
> Lance Andersen <lancea@sybase.com>
> Sr. Product Support Engineering Manager
> Product Support Engineering
>
> Lance Andersen
> Sr. Product Support Engineering Manager <lancea@sybase.com>
> Product Support Engineering
> 77 South Bedford St Work: 781 564-6336
> Burlington Fax: 781 564-6183
> MA Netscape Conference Address
> 01803 Netscape Conference DLS Server
> me!
> Additional Information:
> Last Name Andersen
> First Name Lance
> Version 2.1