{"id":31766144,"url":"https://github.com/ibmdecisionoptimization/opl-jdbc-data-source","last_synced_at":"2025-10-10T00:29:31.724Z","repository":{"id":52507166,"uuid":"221415752","full_name":"IBMDecisionOptimization/OPL-jdbc-data-source","owner":"IBMDecisionOptimization","description":"An OPL extension to connect to databases","archived":false,"fork":false,"pushed_at":"2021-04-27T07:59:04.000Z","size":7078,"stargazers_count":0,"open_issues_count":2,"forks_count":1,"subscribers_count":5,"default_branch":"master","last_synced_at":"2023-03-05T19:39:37.411Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/IBMDecisionOptimization.png","metadata":{"files":{"readme":"README.DB2.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-11-13T09:00:47.000Z","updated_at":"2021-04-27T07:58:58.000Z","dependencies_parsed_at":"2022-08-29T17:00:49.636Z","dependency_job_id":null,"html_url":"https://github.com/IBMDecisionOptimization/OPL-jdbc-data-source","commit_stats":null,"previous_names":[],"tags_count":null,"template":null,"template_full_name":null,"purl":"pkg:github/IBMDecisionOptimization/OPL-jdbc-data-source","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IBMDecisionOptimization%2FOPL-jdbc-data-source","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IBMDecisionOptimization%2FOPL-jdbc-data-source/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IBMDecisionOptimization%2FOPL-jdbc-data-source/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IBMDecisionOptimization%2FOPL-jdbc-data-source/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/IBMDecisionOptimization","download_url":"https://codeload.github.com/IBMDecisionOptimization/OPL-jdbc-data-source/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IBMDecisionOptimization%2FOPL-jdbc-data-source/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279002359,"owners_count":26083356,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-09T02:00:07.460Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-10-10T00:29:09.837Z","updated_at":"2025-10-10T00:29:31.720Z","avatar_url":"https://github.com/IBMDecisionOptimization.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Run sample with DB2\n\n\n## Setup the sample database\n\nTo run the sample with DB2. you need to install DB2. DB2 Express-C is a free\ncommunity edition of DB2. DB2 Express-C is available on Microsoft Windows,\nLinux and Mac OS.\n\nYou can download and install DB2 Express-C from [here](https://www.ibm.com/developerworks/downloads/im/db2express/).\n\n\nIn a \u003cem\u003eDB2 Command Window\u003c/em\u003e:\n\nCreate database using `db2 create database CUSTOMDB`\n\nRun the following SQL script to create and populate the example database:\n```\ndb2 -tvmf data/oil_db2.sql\n```\n\nYou can download the DB2 jdbc driver [here](http://www-01.ibm.com/support/docview.wss?uid=swg21363866).\nNote that if you installed DB2 Express-C, your JDBC driver is `db2jcc4.jar`\nin `\u003cDB2 installdir\u003e/SQLLIB/java`.\n\nIn sample [studio_integration](examples/studio_integration), you will need to edit `jdbc.js` to point\nto your jdbc driver, *or* add an `OPL_JDBC_DRIVER` environment variable pointing to it:\n\n```\n\t// EDIT: you want to change this for your actual driver\n\tvar jdbc_driver = \"mssql-jdbc-7.4.1.jre8.jar\"\n\t// EDIT: specify where to look for the jdbc driver. Default is in . (besides this .js script) and in ../../external_libs\n\tvar jdbc_driver_path = \".;../../external_libs\"\n```\n\nThen you need to edit [demo.dat](example/studio_integration/demo.dat) for your JDBC connection string and credentials.\nYour connection string looks like `db2://localhost:\u003cport\u003e/\u003cdatabase_name\u003e`\nwhere `port` is the DB2 port (default is 50000), `\u003cdatabase_name\u003e` is the name\nof your database (default is `CUSTOMDB`).\n\n## Run the sample\n\n```\noplrun demo.mod demo.dat\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fibmdecisionoptimization%2Fopl-jdbc-data-source","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fibmdecisionoptimization%2Fopl-jdbc-data-source","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fibmdecisionoptimization%2Fopl-jdbc-data-source/lists"}