Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2009

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: SQLServerLaunch

  • To: mathgroup at smc.vnet.net
  • Subject: [mg99987] Re: SQLServerLaunch
  • From: Albert Retey <awnl at gmx-topmail.de>
  • Date: Thu, 21 May 2009 00:06:03 -0400 (EDT)
  • References: <gv0go1$a2e$1@smc.vnet.net>

Hi,

> has anyone ever tried to use SQLServerLaunch which is contained in
> DatabaseLink`? I would have an application where this would be useful,
> _if_ it does what I think, but since the documentation does not tell
> more than the fact that there exist some functions to launch and
> shutdown a SQL-server it's not even possible to tell whether it would do
> what I want...

In case anyone else is interested (otherwise I have stored the
information where I will search for in the future...): I have spent some
time yesterday night to find out that it does what I expected, namely
start an instance of an HSQL server process and works like this:

server = SQLServerLaunch[
 {"mydatabase" -> ToFileName[{$HomeDirectory, "Desktop",
"mydatabasedir"}, "dbfilename"]},
 "Address" -> "127.0.0.1","Port"->9001
 ]

the left hand side of the rule is the name of the database as it will be
seen from clients, the right hand side is the filename corresponding to
a HSQL database (as you would use for JDBC["HSQL(Standalone)",...]).

After that you can connect to the database from other applications with
the connection string:

jdbc:hsqldb:hsql:127.0.0.1:9001/mydatabase//

to connect from mathematica, that would reduce to:

JDBC["HSQL(Server)", "127.0.0.1:9001/mydatabase"]

of course for access from other machines you would need the or a real IP
address and make sure no firewalls are blocking the access to the port
you have used...

After you are done, you might want to shut down the server with (I think
this could hang if there are still open connections, but probably there
is a timeout...):

SQLServerShutdown[server]

At any time, you can check for running server instances with:

SQLServers[]

hth,

albert


  • Prev by Date: Re: Re: Re: saving initialization cells as a .m file
  • Next by Date: Re: Re: Are you wolfing tonight?
  • Previous by thread: SQLServerLaunch
  • Next by thread: Re: Customise a Mathematica 7.0 Palette for braces and square