I needed to import Oracle data dump on a Linux host. To do so on Linux using console its necessary to have installed sqlplus client sqlplus is part of Oracle database product. So you will need to have Oracle priorly installed on host. Latest sqlplus Client binaries from Oracle are here. As of time of writting latest client is oracle-instantclient12.1-basic-12.1.0.1.0-1.i386.rpm
Unfortunately currently from oracle's site oracle-instantclient is only available in RPM and ZIP format. So Debian and Ubuntu users will have to install it either by downloading zip and unarchiving somewhere or using alien (deb rpm install) tool.
As a pre-requirement to install on Debian or deb based Linuces its necessary to install libaio1
# aptitude install libaio1
Then unarchive .zip file into /opt/oracle
# mkdir -p /opt/oracle
# chown simon:simon /opt/oracle
# cd /opt/oracle
# su hipo
$ unzip instantclient-basic-linux.x64-12.1.0.1.0.zip
$ unzip instantclient-basic-linux.x64-12.1.0.1.0.zip
$ export LD_LIBRARY_PATH=/opt/oracle/instantclient_12_1/
$ export ORACLE_SID=skint02
Then to connect and import a database into Oracle DB:
sqlplus / as sysdba @sql/update_patient_status.sql
Table created.
Table created.
Table created.
Commit complete.
Its worthy to mention that there is a nice open source sqplus alternative for those who prefer working with open source check out GQLPlus
More helpful Articles
Tags: aptitude, basic, client, Commit, deb, dump, How to, Linux, login, name, open source, oracle, pwd, rpm, site, structure, unzip, writting, zip