geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Katia Aresti Gonzalez" <kaare...@hotmail.com>
Subject Re: Connecting to SystemDatabase and create table
Date Sun, 17 Apr 2005 21:55:03 GMT
<html><div style='background-color:'><DIV class=RTE>
<P>Hi!!!</P>
<P>Jeremy is right. To create the table, yo cant do it if you are not in the same dir
of geronimo, with the server shut down and including as well derby.jar. And to connect, using
the command below.</P>
<P>It seems that connects in the way i said before, but not really... I dont know what
happens, anyway, follow jeremy`s way and mine togheter :-)</P>
<P>bye bye<BR><BR></P></DIV>
<DIV></DIV>&gt;From: Jeremy Boynes &lt;jboynes@apache.org&gt;
<DIV></DIV>&gt;Reply-To: user@geronimo.apache.org
<DIV></DIV>&gt;To: user@geronimo.apache.org
<DIV></DIV>&gt;Subject: Re: Connecting to SystemDatabase and create table
<DIV></DIV>&gt;Date: Sat, 16 Apr 2005 18:57:37 -0700
<DIV></DIV>&gt;
<DIV></DIV>&gt;You can also shut down the server and run ij pointing directly
at
<DIV></DIV>&gt;the database by setting derby.system.home appropriately
<DIV></DIV>&gt;
<DIV></DIV>&gt;java -cp derbytools.jar;derby.jar -Dderby.system.home=var/derby
<DIV></DIV>&gt;org.apache.derby.tools.ij
<DIV></DIV>&gt;ij&gt; connect 'jdbc:derby:SystemDatabase';
<DIV></DIV>&gt;
<DIV></DIV>&gt;FWIW IBM just donated the client side driver to Apache so I
would
<DIV></DIV>&gt;anticipate it being included in the next release.
<DIV></DIV>&gt;
<DIV></DIV>&gt;--
<DIV></DIV>&gt;Jeremy
<DIV></DIV>&gt;
<DIV></DIV>&gt;
<DIV></DIV>&gt;Katia Aresti Gonzalez wrote:
<DIV></DIV>&gt;&gt;Hello!
<DIV></DIV>&gt;&gt;&nbsp;&nbsp;To connect to the SystemDatabase,
and be able to continue with
<DIV></DIV>&gt;&gt;the cmp deployment, just follow these steps: (Windows)
<DIV></DIV>&gt;&gt;&nbsp;&nbsp;1º STEP&nbsp;&nbsp;a folder
with these 3 jars inside:
<DIV></DIV>&gt;&gt;&nbsp;&nbsp;1. db2jcc.jar
<DIV></DIV>&gt;&gt;2. db2jcc_license_c.jar
<DIV></DIV>&gt;&gt;&nbsp;&nbsp;you download from IBM site:
<DIV></DIV>&gt;&gt;Derby does not currently provide a network JDBC driver,
therefore
<DIV></DIV>&gt;&gt;you must download the IBM DB2 Universal Driver:
<DIV></DIV>&gt;&gt;http://www-106.ibm.com/developerworks/db2/downloads/jcc/
<DIV></DIV>&gt;&gt;&nbsp;&nbsp;3. derbytools.jar
<DIV></DIV>&gt;&gt;you get it from the
<DIV></DIV>&gt;&gt;http://incubator.apache.org/derby/derby_downloads.html.
Just
<DIV></DIV>&gt;&gt;download derby, unzip, and there is the tool!!!
<DIV></DIV>&gt;&gt;&nbsp;&nbsp;2º STEP: Create a derby.bat:
<DIV></DIV>&gt;&gt;&nbsp;&nbsp;set classpath=%the folder where
you have the 3 jars%
<DIV></DIV>&gt;&gt;java -cp
<DIV></DIV>&gt;&gt;derby.jar;derbynet.jar;derbytools.jar;db2jcc.jar;db2jcc_license_c.jar
<DIV></DIV>&gt;&gt;&nbsp;&nbsp;-Dij.driver=com.ibm.db2.jcc.DB2Driver
-Dij.user=system
<DIV></DIV>&gt;&gt;-Dij.password=manager
<DIV></DIV>&gt;&gt;-Dij.protocol=jdbc:derby:net://localhost:1527/
<DIV></DIV>&gt;&gt;org.apache.derby.tools.ij
<DIV></DIV>&gt;&gt;pause
<DIV></DIV>&gt;&gt;&nbsp;&nbsp;This derby.bat goes in the same
folder where you have the jars.
<DIV></DIV>&gt;&gt;&nbsp;&nbsp;3ºSTEP
<DIV></DIV>&gt;&gt;&nbsp;&nbsp;run the derby.bat, and if everything
is ok, you will get in your
<DIV></DIV>&gt;&gt;command line:
<DIV></DIV>&gt;&gt;ij&gt;
<DIV></DIV>&gt;&gt;&nbsp;&nbsp;To connect to the SystemDatabase,
Geronimo must be running!!!
<DIV></DIV>&gt;&gt;just type:
<DIV></DIV>&gt;&gt;&nbsp;&nbsp;ij&gt; CONNECT 'jdbc:derby:net://localhost:1527/SystemDatabase';
<DIV></DIV>&gt;&gt;ij&gt; create table gente (nombre varchar(50));
<DIV></DIV>&gt;&gt;0 rows inserted/updated/deleted
<DIV></DIV>&gt;&gt;thats all!!!
<DIV></DIV>&gt;&gt;&nbsp;&nbsp;thanks!!
<DIV></DIV>&gt;&gt;&nbsp;&nbsp;Katia
<DIV></DIV>&gt;&gt;
<DIV></DIV>&gt;&gt;--------------------------------------------------------------------------------
<DIV></DIV>&gt;&gt;Acepta el reto MSN Premium: Envía hasta 500 megas
diarios de fotos
<DIV></DIV>&gt;&gt;desde Hotmail. Descárgalo y pruébalo 2 meses gratis.
<DIV></DIV>&gt;&gt;&lt;http://g.msn.com/8HMAESES/2743??PS=47575&gt;
<DIV></DIV>&gt;
<DIV></DIV></div><br clear=all><hr>Encuentra una aventura, un
romance o al amor de tu vida.  <a href="http://g.msn.com/8HMBESES/2737??PS=47575" target="_top">Date
de alta gratis.</a> </html>


Mime
View raw message