Installing the DBEdit Eclipse Plug-in For Use With MS SQL 2000...

Posted by Dan on Jul 15, 2005 @ 12:44 PM

I installed the Eclipse DBEdit Plug-in today in order to try to save some development time. The plug-in looks pretty cool, but took some time to install. I first tried to see if I could use the Macromedia JDBC drivers that were on my box, since I already have CFMX 7 installed. Turns out you get an "Restricted Access" message when trying to use the Macromedia drivers when you're not using a Macromedia product. This lead me to installing the Microsoft SQL Server JDBC drivers.

Here's what I had to do to get DBEdit installed. I think many good open source projects go unused because often there's a complete lack of instructions for getting the project installed and getting it operational. So if you're using SQL Server 2000 and Eclipse and want to get DBEdit running, you've come to the right place!

  1. You'll need to download Microsoft's SQL Server 2000 Driver for JDBC.
  2. You'll want to download is the mssqlserver.tar file. You're only worried about the specific class files that Java needs, so no need to download the entire installer.
  3. Create a folder to install the JDBC drivers to. I installed them into my "Microsoft SQL Server" folder into a directory called "jdbc".
  4. You'll need to extract 3 files which are actually inside the msjdbc.tar file which are inside the mssqlserver.tar file. The files can be found in the "lib" folder of the msjdbc.tar file. The files are:
    • msbase.jar
    • mssqlserver.jar
    • msutil.jar
    NOTE:
    If using WinRAR, you should be able to open up "mssqlserver.tar" and then open up the "msjdbc.tar" and browse to the "./lib" folder without extracting all the .tar files.
  5. Extract those files into the JDBC folder you created in step 3.
  6. Download the Eclipse DBEdit plug-in.
  7. Unzip the contents of the into your Eclipse folder.
  8. Start Eclipse.
  9. Go to "Window > Open Perspective > Other".
  10. Select the "DBEdit" perspective and click "Ok".
  11. You'll know need to create a Connection.
  12. Go to the "Classpath" tab and click the "Add Archive" button. You'll need to add each of the files you extracted to your JDBC folder one at a time.
  13. Click back on the "Common" tab.
  14. You should see a select of "JDBC Drivers" if you select the drop down. The driver you want to use is the "com.microsoft.jdbc.sqlserver.SQLServerDriver" driver.
  15. Next enter the "Server URL". You'll want to enter:
    jdbc:microsoft:sqlserver://127.0.0.1:1433
    NOTE:
    If you want to specify database other than the default database for the user you're logging into, you can specify the database to log into by default, by adding the databaseName argument to the URL string. (Where XXX is the name of the database.)

    jdbc:microsoft:sqlserver://127.0.0.1:1433;databaseName=XXXX
  16. Now enter the log in creditials for the database.
  17. You'll probably want to change the name of the Database Bookmark to something more useful. You can change this by editing the "Name" field above the tabs.
  18. Finally, click "Connect" or "Reconnect" button, which ever is there.

If all goes well, you should see your database info.

TIP: Some tips for using DBEdit
  1. From the Tables pain, hit [CTRL][F10] to see the "View Menu".
  2. To see all databases, click the "Show All Catalogs" option.
  3. To view the column types, click the "Show Column Types" option.
  4. To filter out system tables, go to the "Filters..." option and configure your options as:
    eclipse_dbedit_filters.gif
NOTE:
If you're looking for information on installing the SQL Explorer Eclipse plug-in, check out Shlomy Gantz's blog Installing SQL 2000 JDBC drivers on Eclipse using SQL Explorer plugin. It was via his blog entry that I discovered how to install the JDBC drivers.
Categories: JavaScript, HTML/ColdFusion, Flex/Flash, Java, Source Code

5 Comments

  • dan, you might want to have a look at jTDS, http://jtds.sourceforge.net/ quite a snappy sql server JDBC driver.
  • are there any comparisons of performance of drivers: eg JTDS Vs MS-JDBC? I suppose it'sa bit hard ot compare further with the native drivers (apples and oranges, yes?)

    Microsoft make a big deal over the speed of their native drivers from ADO.NET. I'm thinking that, as driver technology improves this becomes less of an issue (and less of a beat-up re New Atlanta and MySpace - http://blog.newatlanta.com/index.cfm?mode=cat&cati...)
  • Thank for this. You are right about the lack of documentation causing a lack of use. I have been trying to get ANY db software out there working with Eclipse and MS SQL. My lack of drivers and how to install them was the hurdle. DBEdit now has me using their software and you to thank for it.

    Thanks again.
  • Thanks Dan! I've just begin trying out Eclipse as my new environment and I like what I see so far. I would have never figured out how to connect to SQL Server without this post. I did it slightly differently from your instruction (I did it on Windows Vista Home Basic) but you post was enough guidance to get me going.

    Regards,
    Steve
  • hi Steve, can you please let me know how did you do it on Vista???

    I have problems while my eclipse will not connect to url or database that I have given???

Comments for this entry have been disabled.