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.

SQLAnywhere 9.0.2 + Hibernate to connect as embedded database

2 posts in General Discussion Last posting was on 2007-06-08 19:43:19.0Z
Kevin Posted on 2007-06-08 17:08:38.0Z
Sender: 3d61.465d1ba7.1804289383@sybase.com
From: Kevin
Newsgroups: ianywhere.public.general
Subject: SQLAnywhere 9.0.2 + Hibernate to connect as embedded database
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <46698d15.1790.1681692777@sybase.com>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 8 Jun 2007 10:08:38 -0700
X-Trace: forums-1-dub 1181322518 10.22.241.41 (8 Jun 2007 10:08:38 -0700)
X-Original-Trace: 8 Jun 2007 10:08:38 -0700, 10.22.241.41
Lines: 21
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:6068
Article PK: 2524

From documentation,
"If Adaptive Server Anywhere fails to locate a server, it
attempts to start a personal database server and load the
database"

How can I do that with hibernate setting?

This is my case:
I can connect using
hibernate.connection.url=jdbc:sybase:Tds:localhost:2638 when
the server started and database is loaded.

How can I specify the connection url so when the server is
not started, it will start server, load db, and make a
connection?

I believe i have to pass in DBF=C:\mydb.db;UID=dba;PWD=sql.
I just don't know who to create correct connection url.

Thanks in advance,
kevin


Shuchit Posted on 2007-06-08 19:43:19.0Z
Newsgroups: ianywhere.public.general
Subject: Re: SQLAnywhere 9.0.2 + Hibernate to connect as embedded database
From: Shuchit <me@privacy.net>
References: <46698d15.1790.1681692777@sybase.com>
Message-ID: <Xns99499FEADCF16svelkarprivacynet@127.0.0.1>
User-Agent: Xnews/2006.08.24 Hamster/2.1.0.11
NNTP-Posting-Host: svelkar-pc.sybase.com
X-Original-NNTP-Posting-Host: svelkar-pc.sybase.com
Date: 8 Jun 2007 12:43:19 -0700
X-Trace: forums-1-dub 1181331799 10.25.98.144 (8 Jun 2007 12:43:19 -0700)
X-Original-Trace: 8 Jun 2007 12:43:19 -0700, svelkar-pc.sybase.com
Lines: 36
X-Authenticated-User: techsupp
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:6069
Article PK: 2525


Kevin wrote in news:46698d15.1790.1681692777@sybase.com:

> From documentation,
> "If Adaptive Server Anywhere fails to locate a server, it
> attempts to start a personal database server and load the
> database"
>
> How can I do that with hibernate setting?
>
> This is my case:
> I can connect using
> hibernate.connection.url=jdbc:sybase:Tds:localhost:2638 when
> the server started and database is loaded.
>
> How can I specify the connection url so when the server is
> not started, it will start server, load db, and make a
> connection?
>

You seem to be using the JConnect jdbc driver. You cannot autostart a
database server and have it load the database with JConnect. With JConnect
you can have an already running database server load database.

See <http://preview.tinyurl.com/23u8of> which points to
<http://www.ianywhere.com/developer/product_manuals/sqlanywhere/0902/en/html/
dbpgen9/00000150.htm>

The iAnywhere JDBC driver will let you autostart database servers and
databases. See
<http://www.ianywhere.com/developer/technotes/sas_jdbc_driver.html>
for more information. However, I do not know whether that driver works with
Hibernate.


Shuchit