Aware IM User Forums Forum Index Aware IM User Forums
Discussions, questions, ideas, opinions about Aware IM
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Database Administration GUI for Derby

 
Post new topic   Reply to topic    Aware IM User Forums Forum Index -> Tips and Tricks
View previous topic :: View next topic  
Author Message
bkonia



Joined: 19 Jan 2007
Posts: 69

PostPosted: Fri Mar 23, 2007 6:56 am    Post subject: Database Administration GUI for Derby Reply with quote

Although Aware IM is a fully self-contained system that manages your database for you, there may still be times when you need to access the database directly. If you're using MySQL, there are dozens of database administration tools available. However, if you're using Derby (Aware IM's built-in database), you'll have a much harder time finding any user-friendly tools to accomplish this.

The good news is, there is an excellent and extremely user-friendly GUI for Derby. The tool I'm referring to is called "Cloudscape Workbench" and it's published by IBM. You can get a free download from the following URL:

http://www-128.ibm.com/developerworks/db2/downloads/csworkbench/

You do have to register and create an account with IBM prior to downloading, but the registration procedure is relatively painless.

After installing Workbench on your Aware IM server machine, you'll need to create a connection to your Aware IM database. Before you create the connection, it's very important that you shut down the Aware IM configuration tool so that the Aware IM server, JBoss and Tomcat are all stopped. The connection will fail if you try to connect while the Aware IM server components are running.

To create the connection:

    Select Derby 10.1 in the database manager tree.

    Select "Derby Embedded JDBC Driver" from the JDBC Driver dropdown menu.

    Under "Database Location", click on the Browse button and browse to the location in your file system where your Aware IM database is found. On a Windows system, this will normally be C:\AwareIM\DATA\BASDB.

    Un-Check "Create the database if required".

    Under "Class Location", browse to the location of your derby.jar file. Normally this will be C:\AwareIM\Tomcat\shared\lib\derby.jar

    Under "User Information", set "User ID" = root and leave the password blank.


At that point, click on the "Test Connection" button and it should indicate that the connection was successful.

Please note: Most users should never need to access the database directly and you can seriously screw things up if you don't know what you're doing. Therefore, I would strongly discourage you from trying this unless you have a really good reason for needing to access the database.
_________________
Brad S Konia
Hostland - Aware IM Hosting Solution Provider
http://www.hostland.com/awareim-hosting.html
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
tford



Joined: 10 Mar 2007
Posts: 2599

PostPosted: Fri Mar 23, 2007 1:09 pm    Post subject: Reply with quote

Thanks for pointing out this tool, Brad!

Sometimes I link to "look under the hood" to understand things.

Tom
Back to top
View user's profile Send private message
matverp



Joined: 11 Sep 2010
Posts: 10

PostPosted: Sun Sep 12, 2010 2:54 am    Post subject: Reply with quote

The above link is not available anymore:

http://www-128.ibm.com/developerworks/db2/downloads/csworkbench/

Does anyone know where to find a database administration tool for Derby?
Back to top
View user's profile Send private message
aware_support



Joined: 24 Apr 2005
Posts: 4668

PostPosted: Sun Sep 12, 2010 10:08 pm    Post subject: Reply with quote

Derby comes with a tool called "ij" which allows you to enter SQL commands (similar to the mysql utility in MySQL). While this is not a graphic tool it is quite adequate to do everything you need to do with Derby at the database level. You can find all the files you need here http://www.awareim.com/ij
_________________
Aware IM Support Team
Back to top
View user's profile Send private message Send e-mail Visit poster's website
matverp



Joined: 11 Sep 2010
Posts: 10

PostPosted: Mon Sep 13, 2010 1:04 am    Post subject: Reply with quote

Thanks, this is helpful.
Do you know of a tool with a GUI as well?

...
Back to top
View user's profile Send private message
RocketRod



Joined: 06 Aug 2008
Posts: 511
Location: Melbourne

PostPosted: Thu Sep 16, 2010 9:38 pm    Post subject: Reply with quote

Thanks support. I downloaded the files but hey have no idea where to start. What do I do with these files and how do I use them?

Cheers Rod
Back to top
View user's profile Send private message
BobK



Joined: 31 Jan 2008
Posts: 174
Location: Cincinnati, Ohio, USA

PostPosted: Sat Sep 18, 2010 7:11 pm    Post subject: Reply with quote

While Derby is no longer the database I Use, in the past I did access a Derby database using Squirrel.

SQuirreL SQL Client is a graphical Java program that will allow you to view the structure of a JDBC
compliant database, browse the data in tables, issue SQL commands etc.

Squirrel can be found at http://www.squirrelsql.org/

Go to the 'Download and installation' page from the menu on the left.
Download the 'Plain Zip format..' version. The current file to download is squirrel-sql-3.1.2-standard.zip
After downloading, extract into the folder of your choice.

To start squirrel, run squirrel-sql.bat or squirrel-sql.sh, depending upon your system.

One time setup.
After starting Squirrel:
A) Select the Drivers tab on the far left.
B) Double click 'Apache Derby Embedded'
C) In the 'Example URL' replace <database>[;create=true] with the location of the Derby data
which should be something like C:/AwareIm/Data/BASDB. So the Example URL will be: jdbc:derby:C:/AwareIm/Data/BASDB
D) Select the 'Extra Class Path' tab and press the 'Add' button.
E) Find the derby.jar file, which should be in AwareIM\Tomcat\shared\lib and press 'Open'. Press 'OK' to close the driver form.
F) Select the 'Aliases' tab on the far left and press the plus sign button to create a new Aliases.
G) Enter a name and select the 'Apache Derby Embedded' driver.
H) Press the test button, enter User and Password if needed and press the connect button. Hopefully you get a 'Connection successful' response.
I) Press 'OK' to save the aliase.
J) The just created alias will connect to the AwareIM production database.
K) To connect to the test database, repeat steps F thru I. In step G, in the URL, replace BASDB with BASDBTEST

To use Squirrel
A) Double click on one of the aliases you just created, enter user and password if needed and press connect.
B) You should see 2 tabs. The 'Objects' tab will display various database objects and the 'SQL' tab where you can enter sql statements to access the database.


NOTE: Before useing Squirrel, you must shutdown AwareIM. I think this is because AwareIM uses Derby as an embedded database.
_________________
Bob
Version 5.3 Build 1548, MySQL Version 5.1
Back to top
View user's profile Send private message
RocketRod



Joined: 06 Aug 2008
Posts: 511
Location: Melbourne

PostPosted: Sun Sep 19, 2010 10:28 pm    Post subject: Reply with quote

Thanks for that. All installed, set up and working fine including updating of tables. A must for anyone using Derby. Very good and clear instructions.

Cheers Rod
Back to top
View user's profile Send private message
aware_support



Joined: 24 Apr 2005
Posts: 4668

PostPosted: Thu Sep 23, 2010 11:16 pm    Post subject: Reply with quote

And for those who wish to use the command line tool (ij), you need to do the following:

1) Download the file http://www.awareim.com/ij/derbytools.jar
2) Put this file into AwareIM/Tomcat/shared/lib directory
3) Download the file http://www.awareim.com/ij/ijBASDB.bat.bin
4) Rename it to ijBASDB.bat
5) Put it into AwareIM/bin directory and run it from there

If all goes well you should see this prompt:
ij>

You can enter SQL commands at this prompt. Each command must end with semi-colon.
_________________
Aware IM Support Team
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Aware IM User Forums Forum Index -> Tips and Tricks All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group