Oracle database connection error using Sqlplus and directional key garbled solution _oracle

Source: Internet
Author: User
Tags readline sqlplus

Connection error
after installation, I log in to the Enterprise background (HTTP://UBUNTU:1158/EM) error, with Sqlplus connection Oracle also error.
One, the error encountered is as follows
1,ora-12505:tns:listener does not currently know of SID given in Connect descriptor (DBD Error:ociserverattach)
2,ora-28547:connection to server failed, probable Oracle Net admin error (DBD error:ocisessionbegin)
3,sqlplus:error while loading shared libraries:libsqlplus.so:cannot open Shared object file:no such file or directory
Second, the solution is as follows
1. Solution One, Ora-12505:tns:listener does not currently know of SID given in Connect descriptor (DBD Error:ociserverattach)
(1), find the location of Tnsname.ora,listerner.ora

root@ubuntu:/opt/ora10/network/admin# ls
Listener.ora Samples Shrept.lst Sqlnet.ora Tnsnames.ora

(2), modify Listerner.ora configuration
Change (Sid_name = Plsextproc) to (Sid_name = ora1), sid_name in the Oracle admin background http://ubuntu:1158/em to see
2. Resolve problem two, ora-28547:connection to server failed, probable Oracle Net admin error (DBD error:ocisessionbegin)
Once the problem was solved, the problem came out, I checked on the internet, the same way that the solution, in fact, no use.
(1). Modify Oracle's network profile by searching for Sqlnet.ora files under the Oracle installation directory, typically under the $networkadmin directory,
To open a line in a file with Notepad:

Sqlnet_authentication_services= (NTS)

Modified to:

Sqlnet_authentication_services= (NONE)

I found that my sqlnet.ora did not have this project set, my Sqlnet.ora inside only one sentence is names.directory_path= (TNSNAMES, Ezconnect)
(2). At the same time, the listener profile is modified by searching for Listener.ora files under the Oracle installation directory, typically in the $networkadmin directory, replacing the host name with an IP address, for example (addr = (PROTOCOL = TCP) (host = HBONLINE1) (port = 1523)) instead (address = (PROTOCOL = TCP) (HOST = 168.168.168.42) (port = 1523))
About this point, I do not understand, why replace the corresponding value of Ip,host, in the/etc/hosts inside there are mappings, no need to change IP.
The root cause is that Oracle services are not up at all and can be viewed by ps-e |grep-i Oracle. Starting up will not have this problem.

Sql> Startup
ORACLE instance started.

3. Solve the problem three, sqlplus:error while loading shared libraries:libsqlplus.so:cannot open Shared object file:no such file or dire Ctory
When I use zhangying@ubuntu:~$ sqlplus/as sysdba to log in, prompt the above error, the solution is as follows
Chmod-r a+rx/opt/ora10/
Here/opt/ora10 is my $oracle_home catalogue, add later can go in.

Direction key garbled
with Sqlplus to connect Oracle, the direction key is always garbled,sql> ^[[a^[[a^[[b^[[b^[[d^,linux with Ubuntu 10.10 solution is as follows
First, download and install ReadLine

Apt-get Install Libreadline5-dev  //ubuntu to install this 
wget ftp://ftp.gnu.org/gnu/readline/readline-6.2.tar.gz 
tar zxvf readline-6.2.tar.gz 
cd readline-6.2 
wget ftp://ftp.gnu.org/gnu/readline/readline-6.2-patches /readline62-001 
wget ftp://ftp.gnu.org/gnu/readline/readline-6.2-patches/readline62-001.sig 
patch-p0 < readline62-001  //patching 
./configure made 
&& make install 

Note: P is followed by zero, not the letter O. If you do not install Apt-get install Libreadline5-dev This word, install rlwrap,./configure always error.
Second, install Rlwrap

wget http://utopia.knoware.nl/~hlub/uck/rlwrap/rlwrap-0.37.tar.gz 
tar zxvf rlwrap-0.37.tar.gz 
CD rlwrap-0.37 
./configure make 
&& make install 

Note: First install ReadLine, then installation Rlwrap, otherwise./configure will be the error, as follows

Configure:error: You
need the GNU ReadLine Library (ftp://ftp.gnu.org/gnu/readline/) to build this
program!

Third, modify the. BASHRC in the user's root directory.

# some more LS aliases 
 alias ll= ' Ls-alf ' 
 alias la= ' ls-a ' 
 alias l= ' LS-CF ' 
 
 alias sqlplus= ' Rlwrap sqlplus '  //Add this line 

Modify. BASHRC to restart the computer. If you don't have. BASHRC, modify the. bash_profile or. profile file.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.