facebook

Database Explorer problem with MSSQL named instance

  1. MyEclipse Archived
  2.  > 
  3. Database Tools (DB Explorer, Hibernate, etc.)
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #255897 Reply

    hi, we’re trying to use Database Explorer to connect to a dev db which is set up on a named instance of MSSQL (not the default instance). We’ve set up the connection string as specified in the documentation for mssqlserver.jar:

    jdbc:microsoft:sqlserver://EG-DBASQLDV-B08\SQLD001:1600

    and the connection does work. We can ‘see’ all of the database schema on that server using Database Explorer. However, we can’t view any of the objects within the database — clicking on the TABLES, VIEW, SYSTEM TABLES nodes in the explorer tree simply returns nothing. We have connected successfully to any number of other MSSQL boxes in the development environment which are NOT set up with a named instance (simply using the default instance) and do not have this problem. We can view and work with all objects on those boxes using Database Explorer.

    Our DBA has some rules around the dev environment which require use of the named instance for this particular server so we’d like to resolve the issue. So far I haven’t found this particular issue addressed in any forums or documentation. Any suggestionsn appreciated, thanks,
    Gwen

    #255930 Reply

    Riyad Kalla
    Member

    The support for this functionality (viewing the ojects) was added in MyEclipse 5.0 for MSSQL and Sybase, what version of MyEclipse are you using? (we are getting ready to release our 5.0 GA release in 3 days, so hang tight if you haven’t upgraded yet)

    #255939 Reply

    Thanks for the information Riyad — we are currently using version 4.0.3, so we’ll look for the download to upgrade to version 5, that’ll be great.

    Just curious — does this affect all connections on MSSQL server using named instances? We got our DBA to move the dev db to the default instance of the server instead, and we’re still unable to view the objects, whereas we aren’t having any problem connecting to/viewing objects in schema on other dev db servers in our network which don’t use the named instance.

    Thanks!

    #255967 Reply

    Riyad Kalla
    Member

    Oh it’s possible I was mistaken on the MS SQL server support. I asked one of our DB devs to have a look and he said it’s possible it could be a driver or permission issue. What driver are you using?

    #255977 Reply

    We’re using the Microsoft SQL Server 2000 JDBC driver (mssqlserver.jar). I don’t think that would be the problem though, as we’re using the same driver to connect to numerous other db servers in our dev environment and do NOT have the problem — Database Explorer functionality is fine, we can see/work with all of the objects in schemas on those other db servers. We’re working with our DBA to move the database in question onto one of those other boxes as a matter of fact. She hasn’t been able to see anything different in the user role that’s set up to access the problemmatic db either. Any suggestions of anything else to look at in the server configuration or user role welcomed though!

    #256018 Reply

    Haris Peco
    Member

    Gwen,

    Please, can you see if you have something in eclipse log when you open tables node (Windows-Show View-Other-PDE Runtime-Error log view)

    try this example (it will print table/view name in master catalog and dbo schema if it’s okay or exception)
    – change YOUR_xxx values to your correct values

    
    import java.sql.Connection;
    import java.sql.DatabaseMetaData;
    import java.sql.DriverManager;
    import java.sql.ResultSet;
    
    
    public class TestTables {
        private static String driverName = "YOUR_CLASSNAME";
    
        private static String url = "YOUR URL";
    
        private static String username = "YOUR_USERNAME";
    
        private static String password = "YOUR_PASSWORD";
    
        public static void main(String[] args) {
    
            try {
                Class.forName(driverName);
                Connection connection = DriverManager.getConnection(url, username,
                        password);
                DatabaseMetaData md = connection.getMetaData();
                ResultSet tables = md.getTables("master", "dbo", "%", new String[] { "TABLE","VIEW" });
                while (tables.next()) {
                    String table = tables.getString("TABLE_NAME");
                    System.out.println("table=" + table);
                }        
            } catch (Exception e) {
                e.printStackTrace();
            }
    
        }
    }
    

    Best regards
    Peco

Viewing 6 posts - 1 through 6 (of 6 total)
Reply To: Database Explorer problem with MSSQL named instance

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