SlideShare una empresa de Scribd logo
1 de 3
Descargar para leer sin conexión
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:
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-
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.

Más contenido relacionado

Último

TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 

Último (20)

TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 

Destacado

How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Applitools
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at WorkGetSmarter
 

Destacado (20)

How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
 

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

  • 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.