Skip to Content
Author's profile photo Former Member

Microsoft AdventureWorks sample db – SA16 version

This is the Microsoft AdventureWorks sample database, migrated from MS SQLServer 2012 to SAP Sybase SQL Anywhere 16.

Due to language and functionality differences, it’s not a 100% port of the entire database.  The .ZIP file contains a .PDF file that outlines the features that were not implemented in this database.  These center primarily around the use the sys.hierarchyID system datatype for recursive queries, and the embedded XML datatypes.

Unzip the attached file into a folder.  You’ll find the following files:

–  AdventureWorks.db and .log:   These are the SQLAnywhere 16 database and log file.

–  AdventureWorks.properties and .osdl:   These are supporting files for the SA16 OData server process.

–  sqlanyenv.bat and start_server.bat:  These .BAT files launch the SA16 database server and the OData Producer servlet.

Paul Horan

SAP Global Mobility SWAT

SA16 AdventureWorks OData sample DB

Assigned Tags

      2 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Jason Hinsperger
      Jason Hinsperger

      Very cool Paul.  If you have time, you might want to provide some more detail on how you built the OData services.

      Author's profile photo Former Member
      Former Member
      Blog Post Author

      The only real work in building the OData services was the creation of the AdventureWorks.OSDL file.  That controls the tables and views that get exposed as OData services by the SA16 OData Server process (DBOSVR16).  

      For a view or table that doesn't have a primary key to be exposed by DBOSVR16, the OSDL file must list the table/view name, and the column(s) that serve as the primary key.  All the tables had PK's, so the OSDL file only needs to list those by name.  It did take some analysis to determine which columns were appropriate PK's for each view. 

      Once the OSDL file is built and referenced from the .config file, DBOSRV16 does all the heavy lifting of processing the OData queries and marshaling the resultset into ATOM or JSON format.