Skip to content

Commit be08b0f

Browse files
committed
feat!: upgrade default clidriver version to 12.1
BREAKING CHANGE: db2connect license v12.1 required for connection to z/OS and iSeries servers as default clidriver version changed from 11.5 to 12.1
1 parent 22c1ae7 commit be08b0f

2 files changed

Lines changed: 22 additions & 20 deletions

File tree

README.md

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,7 @@ Now, you can use the generated `client_cert.cert` as the value of `SSLServerCert
382382
> ignores it. Corresponding ibm_db connection keyword for `sslConnection` is `Security` hence, use `Security=SSL;` in
383383
> connection string instead.
384384
385-
> `ibm_db` supports only ODBC/CLI Driver keywords in connection string: https://www.ibm.com/docs/en/db2/11.5?topic=odbc-cliodbc-configuration-keywords
385+
> `ibm_db` supports only ODBC/CLI Driver keywords in connection string: https://www.ibm.com/docs/en/db2/12.1?topic=odbc-cliodbc-configuration-keywords
386386
387387
- To connect to dashDB in IBM Cloud, use below connection string:
388388
@@ -392,7 +392,7 @@ connStr = "DATABASE=database;HOSTNAME=hostname;PORT=port;PROTOCOL=TCPIP;UID=user
392392
393393
> We just need to add **Security=SSL** in connection string to have a secure connection against Db2 server in IBM Cloud.
394394
395-
**Note:** You can also create a KeyStore DB using GSKit command line tool and use it in connection string along with other keywords as documented in [DB2 Infocenter](http://www.ibm.com/support/knowledgecenter/en/SSEPGG_11.5.0/com.ibm.db2.luw.admin.sec.doc/doc/t0053518.html).
395+
**Note:** You can also create a KeyStore DB using GSKit command line tool and use it in connection string along with other keywords as documented in [DB2 Documentation](https://www.ibm.com/docs/en/db2/12.1.0?topic=ctsidc-configuring-tls-support-in-non-java-db2-clients).
396396
397397
- If you have created a KeyStore DB using GSKit using password or you have got _.kdb file with _.sth file:
398398
@@ -445,7 +445,7 @@ conn = ibm_db.connect(connStr,'','')
445445
- `ibm_db` returns SQL1598N error in absence of a valid db2connect license. SQL1598N error is returned by the Db2 Server to client.
446446
To suppress this error, Db2 server must be activated with db2connectactivate utility OR a client side db2connect license file must exist.
447447
448-
- Db2connect license can be applied on database server or client side. A **db2connect license of version 11.5** is required for ibm_db.
448+
- Db2connect license can be applied on database server or client side. A **db2connect license of version 12.1** is required for ibm_db.
449449
450450
- For MacOS M1/M2/M3 Chip System (ARM64 processor), **db2connect license of version 12.1** is required.
451451
@@ -473,8 +473,8 @@ conn = ibm_db.connect(connStr,'','')
473473
474474
- To know more about server based licensing viz db2connectactivate, follow below links:
475475
476-
* [Activating the license certificate file for Db2 Connect Unlimited Edition](https://www.ibm.com/docs/en/db2/11.5?topic=li-activating-license-certificate-file-db2-connect-unlimited-edition).
477-
* [Unlimited licensing using db2connectactivate utility](https://www.ibm.com/docs/en/db2/11.1?topic=edition-db2connectactivate-server-license-activation-utility).
476+
* [Activating the license certificate file for Db2 Connect Unlimited Edition](https://www.ibm.com/docs/en/db2/12.1.0?topic=dswnls-activating-license-key-db2-connect-unlimited-edition-system-z).
477+
* [Unlimited licensing using db2connectactivate utility](https://www.ibm.com/docs/en/db2/12.1.0?topic=z-db2connectactivate-server-license-activation-utility).
478478
479479
#### Troubleshooting SQL1598N Error:
480480
@@ -504,25 +504,24 @@ If you intend to install the clidriver manually, Following are the details of th
504504
505505
| Platform | Architecture | Cli Driver | Supported | Version |
506506
| :------: | :----------: | :-----------------------: | :-------: | :----------: |
507-
| AIX | ppc | aix32_odbc_cli.tar.gz | Yes | V11.5.9 |
508-
| | others | aix64_odbc_cli.tar.gz | Yes | V11.5.9 |
507+
| AIX | ppc | aix32_odbc_cli.tar.gz | Yes | V12.1.0 |
508+
| | others | aix64_odbc_cli.tar.gz | Yes | V12.1.0 |
509509
| Darwin | x64 | macos64_odbc_cli.tar.gz | Yes | Till V11.5.9 |
510510
| | arm64 | macarm64_odbc_cli.tar.gz | Yes | From V12.1.0 |
511-
| Linux | x64 | linuxx64_odbc_cli.tar.gz | Yes | V11.5.9 |
512-
| | s390x | s390x64_odbc_cli.tar.gz | Yes | V11.5.9 |
511+
| Linux | x64 | linuxx64_odbc_cli.tar.gz | Yes | V12.1.0 |
512+
| | s390x | s390x64_odbc_cli.tar.gz | Yes | V12.1.0 |
513513
| | s390 | s390_odbc_cli.tar.gz | Yes | V11.1 |
514-
| | ppc64 (LE) | ppc64le_odbc_cli.tar.gz | Yes | V11.5.9 |
514+
| | ppc64 (LE) | ppc64le_odbc_cli.tar.gz | Yes | V12.1.0 |
515515
| | ppc64 | ppc64_odbc_cli.tar.gz | Yes | V10.5 |
516516
| | ppc32 | ppc32_odbc_cli.tar.gz | Yes | V10.5 |
517-
| | others | linuxia32_odbc_cli.tar.gz | Yes | V11.5.9 |
518-
| Windows | x64 | ntx64_odbc_cli.zip | Yes | V11.5.9 |
519-
| | x32 | nt32_odbc_cli.zip | Yes | V11.5.9 |
517+
| | others | linuxia32_odbc_cli.tar.gz | Yes | V12.1.0 |
518+
| Windows | x64 | ntx64_odbc_cli.zip | Yes | V12.1.0 |
519+
| | x32 | nt32_odbc_cli.zip | Yes | V12.1.0 |
520520
| Sun | i86pc | sunamd64_odbc_cli.tar.gz | Yes | V10.5 |
521521
| | | sunamd32_odbc_cli.tar.gz | Yes | V10.5 |
522522
| | sparc | sun64_odbc_cli.tar.gz | Yes | V11.1 |
523523
| | sparc | sun32_odbc_cli.tar.gz | Yes | V11.1 |
524524
525-
You can refer to [ODBC and CLI Driver installation](http://www-01.ibm.com/support/docview.wss?uid=swg21418043) for details on how to install the driver manually.
526525
527526
<a name='downloads'></a>
528527

setup.py

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ def _downloadClidriver(url):
246246
sys.stdout.write("Auto installation of clidriver for Python Version %i.%i on Window platform is currently not supported \n" % (sys.version_info[0:2]))
247247
sys.stdout.write("Environment variable IBM_DB_HOME is not set. Set it to your DB2/IBM_Data_Server_Driver installation directory and retry ibm_db module install.\n")
248248
sys.stdout.flush()
249-
sys.exit()
249+
sys.exit(1)
250250
cliDriver_zip = zipfile.ZipFile(file_stream)
251251
cliDriver_zip.extractall()
252252
else:
@@ -287,8 +287,8 @@ def print_exception( e, url):
287287
prebuildIbmdbPYD = True
288288

289289
# Get version of clidriver for autodownload from environment variable CLIDRIVER_VERSION
290-
# Default version is v11.5.9
291-
clidriver_version = os.getenv("CLIDRIVER_VERSION", "v11.5.9")
290+
# Default version is v12.1.0
291+
clidriver_version = os.getenv("CLIDRIVER_VERSION", "v12.1.0")
292292

293293
if ((ibm_db_home == '') and (ibm_db_dir == '') and (ibm_db_lib == '')):
294294
if('win32' not in sys.platform):
@@ -432,13 +432,14 @@ def print_exception( e, url):
432432
ibm_db_lib = os.path.join(ibm_db_dir, libDir)
433433
except (KeyError):
434434
sys.stdout.write("Environment variable IBM_DB_HOME is not set. Set it to your DB2/IBM_Data_Server_Driver installation directory and retry ibm_db module install.\n")
435-
sys.exit()
435+
sys.exit(1)
436436

437437
if not os.path.isdir(ibm_db_lib) and 'zos' != sys.platform:
438438
ibm_db_lib = os.path.join(ibm_db_dir, 'lib')
439439
if not os.path.isdir(ibm_db_lib):
440440
sys.stdout.write("Cannot find %s directory. Check if you have set the IBM_DB_HOME environment variable's value correctly\n " %(ibm_db_lib))
441-
sys.exit()
441+
sys.stdout.write("IBM_DB_HOME=%s, IBM_DB_DIR=%s, IBM_DB_LIB=%s\n" %(os.getenv('IBM_DB_HOME'), os.getenv('IBM_DB_DIR'), os.getenv('IBM_DB_LIB')))
442+
sys.exit(1)
442443
notifyString = "Detected usage of IBM Data Server Driver package. Ensure you have downloaded "
443444
if is64Bit:
444445
notifyString = notifyString + "64-bit package "
@@ -449,7 +450,9 @@ def print_exception( e, url):
449450
ibm_db_include = os.path.join(ibm_db_dir, 'include')
450451
if not prebuildIbmdbPYD and not os.path.isdir(ibm_db_include) and 'zos' != sys.platform:
451452
sys.stdout.write(" %s/include folder not found. Check if you have set the IBM_DB_HOME environment variable's value correctly\n " %(ibm_db_dir))
452-
sys.exit()
453+
sys.stdout.write("IBM_DB_HOME=%s, IBM_DB_DIR=%s, IBM_DB_LIB=%s\n" %(os.getenv('IBM_DB_HOME'), os.getenv('IBM_DB_DIR'), os.getenv('IBM_DB_LIB')))
454+
sys.stdout.write("If you have install Db2 Runtime Client, check this comment for solution: https://github.com/ibmdb/python-ibmdb/issues/1023#issuecomment-3062805368\n")
455+
sys.exit(1)
453456

454457
if 'zos' == sys.platform:
455458
#ibm_db_include = "//'%s.SDSNC.H'" % ibm_db_home

0 commit comments

Comments
 (0)