-3

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.

  • https://stackoverflow.com/questions/2299249/what-is-the-use-of-go-in-sql-server-management-studio-transact-sql? – melpomene Sep 12 '18 at 09:55
  • Its clearly nothing to do with the 'go' statements but rather that the op hasn't used the right RDBMS to begin with. – Rich Campbell Sep 12 '18 at 12:10
  • @melpomene Thanks for your time but as mentioned I made some research about T-SQL, and this file is not T-SQL. –  Sep 12 '18 at 12:31
  • @RichCampbell That's what I think too. What should I use, in your opinion? –  Sep 12 '18 at 12:33

1 Answers1

1

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.

Rich Campbell
  • 566
  • 2
  • 9
  • As mentioned I also tried SyBase, but it gives me nothing more than a .db file that I can't mount or use either, and I _have_ looked through this documentation. –  Sep 12 '18 at 12:29
  • There are multiple types of Sybase database types you specifically need to use SQL Anywhere. For example there is also Sybase Adaptive Server Enterprise and Sybase IQ which are a different product entirely. What do you mean by 'can't mount'? A .db file is a SQL Anywhere database so you would need to connect to it after starting it e.g. http://dcx.sybase.com/sa160/en/dbadmin/da-connecttutorial-secta-5028299.html You can't connect to it until it's up and running. – Rich Campbell Sep 12 '18 at 12:38
  • 1
    Apparently, I can. I dug up an old ODBC install file on a iso from my predecessors, and the ODBC connects (it's a SQL anywhere 12, the same I tried before, but this one simply doesn't crash). Sorry for taking your time. –  Sep 12 '18 at 12:50