{"id":1725,"date":"2017-07-30T21:23:44","date_gmt":"2017-07-30T21:23:44","guid":{"rendered":"http:\/\/62.131.51.129\/?p=1725"},"modified":"2017-07-30T21:23:44","modified_gmt":"2017-07-30T21:23:44","slug":"oh-my-god-how-good-is-open-source","status":"publish","type":"post","link":"http:\/\/archief.van-maanen.com\/?p=1725","title":{"rendered":"Oh my God: how good is open source"},"content":{"rendered":"<p>A few days ago, I had to write a Python script that would enable us to write some data to an Oracle database. At first, I had no idea how to start. So, I downloaded a simple example script that I tried to run. The script was found via Google. This script looked like:<\/p>\n<pre>\nimport cx_Oracle\ncon = cx_Oracle.connect('C##SCOTT\/binvegni@localhost\/orcl')\nprint con.version\ncon.close()\n<\/pre>\n<p>I decided to run this script. This provided a clear error message. The error message looked like: <\/p>\n<pre>\nTraceback (most recent call last):\n  File \"D:\\Users\\tmaanen\\CloudStation\\Drive\\Erste\\Midas\\ora.py\", line 1, in <module>\n    import cx_Oracle\nImportError: No module named cx_Oracle\n<\/pre>\n<p>I then looked in Google how to solve this error message. I then downloaded the module. A subsequent attempt gave another error message. Again a clear error message. <\/p>\n<pre>\nTraceback (most recent call last):\n  File \"D:\\Users\\tmaanen\\CloudStation\\Drive\\Erste\\Midas\\ora.py\", line 2, in <module>\n    con = cx_Oracle.connect('scott\/binvegni@127.0.0.1\/orcl')\nDatabaseError: ORA-12514: TNS:listener does not currently know of service requested in connect descriptor\n<\/pre>\n<p>It looked like the servicename was wrong. The correct servicename could be found with the command tnsping. Modifying the script and running it again provided an almost trival error message.<\/p>\n<pre>\nTraceback (most recent call last):\n  File \"D:\\Users\\tmaanen\\CloudStation\\Drive\\Erste\\Midas\\ora.py\", line 2, in <module>\n    con = cx_Oracle.connect('scott\/binvegni@localhost\/orcl.corp.capgemini.com')\nDatabaseError: ORA-01017: invalid username\/password; logon denied\n<\/pre>\n<p>Oops: wrong userid. Sorry. The last attempt was succesfull:<\/p>\n<pre>\n12.2.0.1.0\n<\/pre>\n<p>Al in all, it took me less than half an hour to get this going. I was really impressed with the excellent support from the open source.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A few days ago, I had to write a Python script that would enable us to write some data to an Oracle database. At first, I had no idea how to start. So, I downloaded a simple example script that I tried to run. The script was found via Google. This script looked like: import [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":1730,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1725","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized"],"_links":{"self":[{"href":"http:\/\/archief.van-maanen.com\/index.php?rest_route=\/wp\/v2\/posts\/1725","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/archief.van-maanen.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/archief.van-maanen.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/archief.van-maanen.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/archief.van-maanen.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1725"}],"version-history":[{"count":0,"href":"http:\/\/archief.van-maanen.com\/index.php?rest_route=\/wp\/v2\/posts\/1725\/revisions"}],"wp:attachment":[{"href":"http:\/\/archief.van-maanen.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1725"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/archief.van-maanen.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1725"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/archief.van-maanen.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1725"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}