Your SlideShare is downloading. ×
How to install oracle instant client 12c and oracle sql plus on Ubuntu
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

How to install oracle instant client 12c and oracle sql plus on Ubuntu

3,299
views

Published on

http://dbaworkshop.blogspot.it/2013/07/How-to-install-Oracle-Instant-Client-12c-and-Oracle-SQL-Plus-12c-on-Ubuntu.html …

http://dbaworkshop.blogspot.it/2013/07/How-to-install-Oracle-Instant-Client-12c-and-Oracle-SQL-Plus-12c-on-Ubuntu.html

How to install oracle instant client 12c and oracle sql plus on Ubuntu

Published in: Technology

3 Comments
0 Likes
Statistics
Notes
  • Hi Jill. The goal of this scenario is to install the so called 'oracle instant client' on a Ubuntu machine.
    What is the 'instant client' useful for ? The 'instant client' let your machine be able to connect to a database. So no user or password were used. When you try to connect to something like a database in that case you should submit the user and password of that database.

    In my final step I didn't specify where is the database so it uses some default configuration and tried to estabilish a connection to nothing!!!

    If you are asked for a password it means that you are able to connect to a database (local or remote): login and password are those used while you set up the database.
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • ERROR:
    ORA-12162: TNS:net service name is incorrectly specified
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • I did exactly the same but at the end, it asks for username and password. Since no password is given during installation, WHAT is my username and password? Can I reset password using commandline? HELP please!
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • Be the first to like this

No Downloads
Views
Total Views
3,299
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
20
Comments
3
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Articles from Database administrator workshop How to install Oracle Instant Client 12c and Oracle SQL Plus on Ubuntu So you want to use your Ubuntu distribution and connect to an Oracle database. Here you can find the steps to install and configure the Oracle Instant Client on Ubuntu 12.04. First of all you need to go to the following link http://www.oracle.com/technetwork/database/features/instant-client/index- 097480.html and choose the Instant Client for your platform (in my case it is "Instant Client for Linux x86"). On the next web page select "Accept License Agreement" so you can download some rpm packets of the latest available Instant Client version (today is Version 12.1.0.1.0). Click on oracle-instantclient12.1-basic-12.1.0.1.0-1.i386.rpm (Instant Client Package - Basic: All files required to run OCI, OCCI, and JDBC-OCI applications), oracle-instantclient12.1-sqlplus-12.1.0.1.0-1.i386.rpm (Instant Client Package - SQL*Plus: Additional libraries and executable for running SQL*Plus with Instant Client) and oracle-instantclient12.1-devel-12.1.0.1.0-1.i386.rpm (Instant Client Package - SDK: Additional header files and an example makefile for developing Oracle applications with Instant Client). To be available to download those rpm packets you have also to sign in into the Oracle website. Next step is to install alien on your distribution. From the man page "alien is a program that converts between Red Hat rpm, Debian deb, Stampede slp, Slackware tgz, and Solaris pkg file formats. If you want to use a package from another linux distribution than the one you have installed on your system, you can use alien to convert it to your preferred package format and install it." view plainprint? 1. ubuntu@ubuntu-VirtualBox:~$ sudo apt-get install alien Then go to your download directory and list the available rpm packets. view plainprint? 1. ubuntu@ubuntu-VirtualBox:~$ cd Downloads/ 2. ubuntu@ubuntu-VirtualBox:~/Downloads$ ls 3. oracle-instantclient12.1-basic-12.1.0.1.0-1.i386.rpm 4. oracle-instantclient12.1-devel-12.1.0.1.0-1.i386.rpm 5. oracle-instantclient12.1-sqlplus-12.1.0.1.0-1.i386.rpm Let's install all of them using alien command: view plainprint? 1. ubuntu@ubuntu-VirtualBox:~/Downloads$ sudo alien -i oracle- instantclient12.1-sqlplus-12.1.0.1.0-1.i386.rpm 2. dpkg --no-force-overwrite -i oracle-instantclient12.1-sqlplus_12.1.0.1.0- 2_i386.deb 3. Selecting previously unselected package oracle-instantclient12.1-sqlplus. 4. (Reading database ... 142987 files and directories currently installed.) 5. Unpacking oracle-instantclient12.1-sqlplus (from oracle-instantclient12.1- sqlplus_12.1.0.1.0-2_i386.deb) ... 6. Setting up oracle-instantclient12.1-sqlplus (12.1.0.1.0-2) ... Now it's time for the Instant Client Basic Package:
  • 2. view plainprint? 1. ubuntu@ubuntu-VirtualBox:~/Downloads$ sudo alien -i oracle- instantclient12.1-basic-12.1.0.1.0-1.i386.rpm 2. dpkg --no-force-overwrite -i oracle-instantclient12.1-basic_12.1.0.1.0- 2_i386.deb 3. Selecting previously unselected package oracle-instantclient12.1-basic. 4. (Reading database ... 143000 files and directories currently installed.) 5. Unpacking oracle-instantclient12.1-basic (from oracle-instantclient12.1- basic_12.1.0.1.0-2_i386.deb) ... 6. Setting up oracle-instantclient12.1-basic (12.1.0.1.0-2) ... 7. Processing triggers for libc-bin ... 8. ldconfig deferred processing now taking place And finally it's time for Instant Client SDK Package: view plainprint? 1. ubuntu@ubuntu-VirtualBox:~/Downloads$ sudo alien -i oracle- instantclient12.1-devel-12.1.0.1.0-1.i386.rpm 2. dpkg --no-force-overwrite -i oracle-instantclient12.1-devel_12.1.0.1.0- 2_i386.deb 3. Selecting previously unselected package oracle-instantclient12.1-devel. 4. (Reading database ... 143016 files and directories currently installed.) 5. Unpacking oracle-instantclient12.1-devel (from oracle-instantclient12.1- devel_12.1.0.1.0-2_i386.deb) ... 6. Setting up oracle-instantclient12.1-devel (12.1.0.1.0-2) ... Let's try to issue the sqlplus command view plainprint? 1. ubuntu@ubuntu-VirtualBox:~$ sqlplus / as sysdba 2. sqlplus: error while loading shared libraries: libaio.so.1: cannot open shared object file: No such file or directory Ops.. it fails because of a missing shared object file: libaio.so.1 So install libaio1 using the usual apt-get command. view plainprint? 1. ubuntu@ubuntu-VirtualBox:~$ sudo apt-get install libaio1 2. Reading package lists... Done 3. Building dependency tree 4. Reading state information... Done 5. The following NEW packages will be installed: 6. libaio1 7. 0 upgraded, 1 newly installed, 0 to remove and 608 not upgraded. 8. Need to get 6,648 B of archives. 9. After this operation, 53.2 kB of additional disk space will be used. 10. Get:1 http://it.archive.ubuntu.com/ubuntu/ precise/main libaio1 i386 0.3.109- 2ubuntu1 [6,648 B] 11. Fetched 6,648 B in 0s (12.5 kB/s) 12. Selecting previously unselected package libaio1. 13. (Reading database ... 143067 files and directories currently installed.) 14. Unpacking libaio1 (from .../libaio1_0.3.109-2ubuntu1_i386.deb) ... 15. Setting up libaio1 (0.3.109-2ubuntu1) ... 16. Processing triggers for libc-bin ... 17. ldconfig deferred processing now taking place Let's try to run sqlplus again. view plainprint? 1. ubuntu@ubuntu-VirtualBox:~/Downloads$ sqlplus / as sysdba 2. sqlplus: error while loading shared libraries: libsqlplus.so: cannot open shared object file: No such file or directory sqlplus complains about missing libraries. You can solve creating/editing the oracle.conf file issuing the following command and simply adding a line (the path where were installed all the libraries of the Instant Client packages: /usr/lib/oracle/12.1/client/lib): view plainprint? 1. ubuntu@ubuntu-
  • 3. VirtualBox:~/Downloads$sudo vi /etc/ld.so.conf.d/oracle.conf 2. /usr/lib/oracle/12.1/client/lib Now update the information of all the shared libraries on your system. view plainprint? 1. ubuntu@ubuntu-VirtualBox:~/Downloads$sudo ldconfig Run sqlplus again... and as you can see it works... view plainprint? 1. ubuntu@ubuntu-VirtualBox:~$ sqlplus / as sysdba 2. 3. SQL*Plus: Release 12.1.0.1.0 Production on Sun Jul 14 20:01:37 2013 4. 5. Copyright (c) 1982, 2013, Oracle. All rights reserved. 6. 7. ERROR: 8. ORA-12162: TNS:net service name is incorrectly specified ... even if there's no database to connect to... On the next post a new Oracle Database 12c will be finally available. That's all.

×