Eclipse con plugin para SqlServer
Para poder usar eclipse para conectar a sql server y usarlo como editor tsql necesitamos:
Descargar e instalar eclipse (con instalar el sdk a pelo sobra).
Descargar el plugin http://sourceforge.net/projects/dbedit/
Para hacerlo funcionar:
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!
- You’ll need to download Microsoft’s SQL Server 2000 Driver for JDBC.
- 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.
- Create a folder to install the JDBC drivers to. I installed them into my “Microsoft SQL Server” folder into a directory called “jdbc”.
- 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. - Extract those files into the JDBC folder you created in step 3.
- Download the Eclipse DBEdit plug-in.
- Unzip the contents of the into your Eclipse folder.
- Start Eclipse.
- Go to “Window > Open Perspective > Other”.
- Select the “DBEdit” perspective and click “Ok”.
- You’ll know need to create a Connection.
- 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.
- Click back on the “Common” tab.
- 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.
- Next enter the “Server URL”. You’ll want to enter:
jdbc:microsoft:sqlserver://127.0.0.1:1433NOTE: 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 - Now enter the log in creditials for the database.
- 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.
- Finally, click “Connect” or “Reconnect” button, which ever is there.
If all goes well, you should see your database info.
posted in Programacion | 0 Comments