Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

MSSQL 2008 Spatial?

Help
Jamo
2010-09-28
2013-05-29
  • Jamo
    Jamo
    2010-09-28

    I've finally got the right java and I think I've got the right driver, however I'm still getting errors :(
    I'm using Microsoft SQL Server JDBC Driver 3.0, I'm able to connect to the correct DB !
    Sorry for dumping entire error here but im not sure where im looking …. :(

    Using database properties:
      [C:\sql2diagram\schemaSpy.jar]/net/sourceforge/schemaspy/dbTypes/mssql08.properties
    Gathering schema details..............................
    Failed to retrieve table/view comments: com.microsoft.sqlserver.jdbc.SQLServerException: The "variant" data type is not supported.
    SELECT i_s.TABLE_NAME, s.value AS comments FROM INFORMATION_SCHEMA.Tables i_s INNER JOIN sys.extended_properties s ON s.major_id = OBJECT_ID(i_s.table_catalog + '..' + i_s.table_name) WHERE s.class = 1 AND s.name = 'MS_Description'
    16:22:12.663 SEVERE:  TDSParser.throwUnexpectedTokenException - ConnectionID:1: getNextResult: Encountered unexpected unknown token (0x49)
    16:22:12.663 SEVERE:  TDSReader.throwInvalidTDS - ConnectionID:1 got unexpected value in TDS response at offset:45
    Failed to retrieve column comments: com.microsoft.sqlserver.jdbc.SQLServerException: The connection is closed.
    SELECT OBJECT_NAME(c.object_id) AS TABLE_NAME, c.name AS COLUMN_NAME, ex.value AS comments FROM sys.columns c LEFT OUTER JOIN sys.extended_properties ex ON ex.major_id = c.object_id AND ex.minor_id = c.column_id AND ex.name = 'MS_Description' WHERE OBJECTPROPERTY(c.object_id, 'IsMsShipped')=0 ORDER BY OBJECT_NAME(c.object_id), c.column_id 
    com.microsoft.sqlserver.jdbc.SQLServerException: The connection is closed.
        at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(SQLServerException.java:171)
        at com.microsoft.sqlserver.jdbc.SQLServerDatabaseMetaData.checkClosed(SQLServerDatabaseMetaData.java:115)
        at com.microsoft.sqlserver.jdbc.SQLServerDatabaseMetaData.getImportedKeys(SQLServerDatabaseMetaData.java:911)
        at net.sourceforge.schemaspy.model.Table.connectForeignKeys(Table.java:106)
        at net.sourceforge.schemaspy.model.Database.connectTables(Database.java:984)
        at net.sourceforge.schemaspy.model.Database.<init>(Database.java:83)
        at net.sourceforge.schemaspy.SchemaAnalyzer.analyze(SchemaAnalyzer.java:211)
        at net.sourceforge.schemaspy.Main.main(Main.java:42)
    E=1I=1
    
     
  • John Currier
    John Currier
    2010-09-28

    I'm not sure where you got the mssql08.properties file from, but you can try stripping it down to just description, connectionSpec (and associated referenced variable descriptions) and driver.  You won't get all of the details that are available, but it should help track down what's going wrong.

    John

     
  • Jamo
    Jamo
    2010-09-28

    I think I've gone about this the wrong way…..
    Please disregard the reference to mssql08.properties … it's just used
    I basically have a MSSQL 2008 Spatial server and I'd like to use Schemaspy to produce a diagram.

    My SQL DB is <server>\&lt;instance>\&lt;database>

    I've googled for some information and found something about using the jTDS driver instead when the "The "variant" data type is not supported." error is found.

    So I've downloaded both JDBC (Microsoft SQL Server JDBC Driver 3.0) and jTDS (jtds-1.2.5-dist) drivers
    However I can't seem to connect to my instance using the jtds driver :(

     
  • John Currier
    John Currier
    2010-09-29

    The latest beta version (http://schemaspy.sourceforge.net/schemaSpy.jar) has two .properties files for jTDS.  mssql-jtds requires host, port and db while mssql-jtds-instance also requires an instance to be specified.  They are otherwise logically identical via inheritance.  It looks like you'd want to use mssql-jtds-instance in your scenario and specify your instance with -instance instanceName.

    John

     
  • Jamo
    Jamo
    2010-09-29

    Poetry :) works a charm
    Cheers john

     
  • Brian S.
    Brian S.
    2011-05-11

    Jamo181's suggestion of the new beta worked well for me too… some dots as we write out would be nice: I waited a couple hours just checking to see if there were files being written:

    Wrote relationship details of 4157 tables/views to directory '/tmp/tboutII' in 13482 seconds.

     
  • John Currier
    John Currier
    2011-05-11

    I'm confused as to why you didn't see dots as it progressed.  There's typically (approx) one per table as it collects the metadata details, then one per summary generated, and finally one per table as it generates the graphs.

    I assume the resultant overview graphs would be mostly unreadable with that many tables.  Assuming, of course, that Graphviz didn't choke while attempting to generate them.

    John