sqlsybaseparadox

How to use this weird .sql file?


I have a very strange 'reload.sql' file that I need to use to build a database. It references about 200 XXX.dat files with straight-up readable data (although useless without explanations regarding the meaning of the fields).

I have tried msssql server, mysql workbench (on a server local-hosted on wamp), and directly accessing it through DBeaver and IBConsole, but I cannot manage to execute/build it. It uses a weird syntax. There are elements like

begin
...
end
go

that hinted me towards T-SQL, but using sqlcmd on it gave me thousands upon thousands of errors regarding keywords. Specifically, the very first batch of executable lines says

SET OPTION date_order          = 'YMD'
go

SET OPTION PUBLIC.preserve_source_format = 'OFF'
go

SET TEMPORARY OPTION tsql_outer_joins = 'ON'
go

SET TEMPORARY OPTION st_geometry_describe_type = 'binary'
go

SET TEMPORARY OPTION st_geometry_on_invalid = 'Ignore'
go

SET TEMPORARY OPTION non_keywords = 'attach,compressed,detach,kerberos,nchar,nvarchar,refresh,varbit'
go

which generates about 150 errors 'Incorrect syntax near OPTION keyword' on its own, and according to google is part of a 'rexx' procedure but 'date_order' should then be 'DATFMT', right?

Another track is that of SyBase, but I cannot for the life of me get it to work (through my trials I did manage to build a .db file, that, well, is useless to me since I can't build it either..).

I've tried accessing it through ODBC pilots as well but none worked (the paradox ODBC did not crash, but said there was an error with a FROM clause, which are generated automatically...).

I need to know a way to build a database from this file or directly access the data it references, which I can't really post since it contains private medical data.

Also what madman came up with this.


Solution

  • The very first google link (for me anyway) against 'st-geometry-describe-option' shows this is a SAP SQL Anywhere database i.e. http://dcx.sybase.com/1200/en/dbadmin/st-geometry-describe-option.html

    So I would suggest starting from the SQL Anywhere documentation and you will need to install the database software beforehand.