Sqlplus Download Mac

SQL.PLus on Mac. December 1st, 2016. Goto comments Leave a comment. I would think installing SQL.Plus on the Mac would be point, click download, point click, install bam it works. It did install mostly straight forward on my old Mac. Got a new Mac and no dice. Tried installing myself guessing at the downloads. May 12, 2014 Download the files from the Oracle Site. Be sure to grab the following two files: 2. Extract the files and create the proper folder structure. Open a Terminal window and unzip the downloaded files. $ unzip -qq instantclient-basic-macos.x64-11.2.0.4.0.zip. $ unzip -qq instantclient-sqlplus-macos.x64-11.2.0.4.0.zip.

Have you ever tried to spool/download BLOBS with SQL*Plus? Some months ago I tried to find a way to download a collection of CLOBs or even better a zipped version of the collection as BLOB. I learned that BLOBs are not a valid datatype in SQL*Plus when it comes to the spool command. I found a way by putting the CLOBs into a global temporary table, creating an intermediate SQL script with tons of select and spool commands, and finally spooling the CLOBs one by one by calling the intermediate SQL script. It was working, but far from elegant. Also, when I was in the home office with a less powerful connection, it was slowing down the whole export process significantly.

Sql plus download mac versionDownload sql plus 64 bitSqlplus Download Mac

If you are using PLEX (PL/SQL Export Utilities) and this sounds familiar to you - the described method was the default for exporting an APEX app or your schema DDL with the delivered export script templates.

If you have no idea what I am talking about: PLEX is a PL/SQL package that is able to export an Oracle APEX app, ORDS modules, all schema objects and table data into a nice directory structure in one go ready to use for version control. Check out the project on GitHub and this blog post on how to get started.

Sql Plus Windows 10

But there is a better way: Simply convert the BLOB into a base64 encoded CLOB. I have no idea why this was not my first solution for the PLEX export templates. In the new version 2.1.0 of PLEX the templates are using this approach. Here is a simplified example.

Download

File export.sql:

Congratulations - You are the owner of a base64 encoded CLOB on your client disk. And now? Before you can unzip the file you need to decode it - depending on your operating system you can do this with your OS tools:

Sqlplus Download Mac
  • Windows: certutil -decode app_100.zip.base64 app_100.zip
  • Mac: base64 -D -i app_100.zip.base64 -o app_100.zip
  • Linux: base64 -d app_100.zip.base64 > app_100.zip

Here a simple Windows batch file, which calls the SQL script above, decodes the file and deletes the base64 version.

File export.bat

The described method to download a BLOB is independent of the package PLEX - you only need a small helper function to encode the BLOB. I found an example provided by Tim Hall on his Oracle Base site. Thanks for sharing Tim!

Install Sql Plus

This function is included in the newest version of PLEX (named to_base64) - you can download PLEX here.

Happy scripting, exporting and version controlling :-)

Ottmar