facebook

Can’t connect to local SQL Server via Database Explorer

  1. MyEclipse Archived
  2.  > 
  3. Database Tools (DB Explorer, Hibernate, etc.)
Viewing 15 posts - 16 through 30 (of 36 total)
  • Author
    Posts
  • #227344 Reply

    Riyad Kalla
    Member

    Mike,
    I don’t have a SQL Server to connect to, although the users that have gotten it working (with MS’s drivers) had to unzip all 3 JARs and repackage them because our plugin looks for an extension of the Driver class, and the JAR that has that in it is an abstract impl, and the concrete extension of it (the real MS driver) is in another JAR, and our plugin currently can’t resolve across multiple JARs the correct instance. It is a filed bug, but that is a quick workaround.

    #227403 Reply

    colinz
    Member

    If you download the jdbc driver from microsoft:

    http://www.microsoft.com/downloads/details.aspx?FamilyID=9f1874b6-f8e1-4bd6-947c-0fc5bf05bf71&displaylang=en#filelist

    you will find there are three jar files. You need to include both mssqlserver.jar and msbase.jar in the extra class path.

    Colin

    #228429 Reply

    hongrenk
    Member

    1. Download MSSQL JDBC driver.
    2. Make sure all 3 jar files (mssqlserver.jar, msbase.jar, msutil.jar)are in your classpath.
    3. Create a new driver.

    4. Configure your profile.

    #265113 Reply

    novelle
    Member

    hi there! how do u set the URL? please help
    it doenst work for me…

    jdbc:freetds:sqlserver://<hostname>[:<4100>]/<dbname>[;<property>=<value>[;…]]

    @jthurst1 wrote:

    I got it to work. But I didn’t use microsofts driver. I used jtds from sourceforge. With jtds it worked perfectly the first try and I didn’t have to put the username and password in the url.
    Here’s the link to jtds: http://sourceforge.net/project/showfiles.php?group_id=33291

    #265165 Reply

    Haris Peco
    Member

    novelle,

    The url example for MS SQL jtds driver is :

    jdbc:jtds:sqlserver//:localhost:1434/mydatabase

    You have to change:
    – ‘localhost’ to your host name, if you use MS SQL on remote machine.
    – port 1434 , you can check what is your port for jdbc connection (it is ussually 1434 or 1433, but you can change this)
    – name of your database (‘mydatabase’)

    If your database is configured for JDBC access (you have to use mixed login credentails when you install database) it will work fine.

    Regards,

    #265763 Reply

    begurrao
    Member

    I am also unable to connect to SQL server using MS JDBC driver from DB Explore. Is there any trick or suggestion in this matter.

    #265779 Reply

    Haris Peco
    Member

    begurrao,

    what is your error ?

    Regards

    #265830 Reply

    begurrao
    Member

    The error is as follows

    Error while trying to login to database:
    Unable to create connection, Check your URL.

    My URL looks like jdbc:microsoft:sqlserver://server:1433

    #265832 Reply

    Haris Peco
    Member

    Correct URL is :
    jdbc:sqlserver://server:1433

    where server is your server name.If you have MS SQL on local machine you can set localhost or 127.0.0.1
    You have to install MS SQL Server in mixed authentication mode (it is requested for JDBC access) and enable TCP/IP on port 1433

    Regards,

    #265839 Reply

    begurrao
    Member

    You are right. That worked. Thanks. I do not know whey Eclipse shows the below format?

    jdbc:microsoft:sqlserver://<server_name>:<1433>

    #265841 Reply

    Haris Peco
    Member

    It is URL for older MS JDBC driver (MS SQL Server 2000) and you use JDBC driver 2005 (it works with MS SQL 2000 database too).
    If you choose Microsoft SQL Server 2005 you will got correct URL.
    That can confuse, of course, but database version and driver version are different concepts.

    Regards,

    #265880 Reply

    begurrao
    Member

    Now I am able to connect to the database and create ER diagram. But how can I connect tables with one to one or one many relationships and modify the ER diagram? I do not see any interface.

    #265883 Reply

    Haris Peco
    Member

    You can’t modify tables or relationships in ER diagram.You can make new table, add FKs, or indexes to tables from DB Browser

    Regards,

    #265918 Reply

    begurrao
    Member

    Oh, that means, we can have ER diagram in reverse engineering only. Usually, we create ER diagram and then create database from it. You say, this is not possible?

    thanks

    #265985 Reply

    Brian Fernandes
    Moderator

    The ERD currently does not support DDL generation or direct table creation. Those features however are on the cards.

    Thank you for asking.

Viewing 15 posts - 16 through 30 (of 36 total)
Reply To: Can’t connect to local SQL Server via Database Explorer

You must be logged in to post in the forum log in