Home>

error in connectingAfter installation,I log in to the enterprise backend (http://ubuntu:1158/em) and report an error. I also get an error when connecting to oracle using sqlplus.

First, the errors encountered are 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. Solve problem 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

[email protected]:/opt/ora10/network/admin #ls
listener.ora samples shrept.lst sqlnet.ora tnsnames.ora

(2) Modify the listerner.ora configuration

Change (sid_name=plsextproc) to (sid_name=ora1), sid_name can be seen in the oracle management background http://ubuntu:1158/em

2. Solve problem two,ora-28547:connection to server failed, probable oracle net admin error (dbd error:ocisessionbegin)

Once the problem is solved,This question arises,I checked it online,The same thing is said to be solved like this,Actually it doesn't work at all.

(1). Modify the network configuration file of oracle,The specific method is:search the sqlnet.ora file in the oracle installation directory, generally in the $networkadmin directory,

Open a line in the file with Notepad:

sqlnet_authentication_services=(nts)

change into:

sqlnet_authentication_services=(none)

I found that my sqlnet.ora doesn't have this project setting at all,The only sentence in my sqlnet.ora is names.directory_path=(tnsnames, ezconnect)

(2). Modify the listener configuration file at the same time,The specific method is:search the listener.ora file in the oracle installation directory, generally in the $networkadmin directory, replace the host name with the ip address,For example (address=(protocol=tcp) (host=hbonline1) (port=1523)) is changed to (address=(protocol=tcp) (host=168.168.168.42) (port=1523))

On this point,I don't understandWhy change to ip, the corresponding value behind host,There is a mapping in/etc/hosts,There is no need to switch to ip.

The root cause is that the oracle service is not up at all,You can check it by ps -e | grep -i oracle.There will be no such problem at startup.

sql>startup
oracle instance started.

3. Solve problem three,sqlplus:error while loading shared libraries:libsqlplus.so:cannot open shared object file:no such file or directory

When I use [email protected]:~ $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 directory, and you can go in after adding it.

Garbled arrow keysUsing sqlplus to connect to oracle, the arrow keys are always garbled,sql>^ [[a ^ [[a ^ [[b ^ [[b ^ [[d ^, linux uses ubuntu 10.10 The solution is as follows

First, download and install readline

apt-get install libreadline5-dev //ubuntu wants 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 //patch
./configure
make&&make install

Note:Zero after -p,Not the letter o. If you don't install apt-get install libreadline5-dev, if you install rlwrap, ./configure always reports an 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 install rlwrap, otherwise ./configure will report an error,as follows

configure:error:
you need the gnu readline library (ftp://ftp.gnu.org/gnu/readline/) to build
this program!

Third, modify the user's root directory.bashrc

#some more ls aliases
 alias ll="ls -alf"
 alias la="ls -a"
 alias l="ls -cf"
 alias sqlplus="rlwrap sqlplus" //Add this line

Modify the .bashrc to restart the computer.if there is not.bashrc, modify .bash_profile or .profile file.

  • Previous Summary of tips for using UILabel to set fonts in iOS development
  • Next Example analysis using Java to achieve the basic audio player writing points