1. Run sqlplus, prompt
- Sqlplus: ErrorWhileLoading shared libraries:/u01/APP/Oracle/product/11.2.0/dbhome_1/lib/libclntsh. so.11.1: cannot restore segment prot after reloc: Permission denied
This problem is caused by SELinux. Solution:
Edit the/etc/sysconfig/SELinux configuration file and change SELinux = enforcing to SELinux = disabled.
-
- # This file controls the state of SELinux on the system.
-
- # SELinux = can take one of these three values:
-
- # Enforcing-SELinux Security PolicyIsEnforced.
-
- # Permissive-SELinux prints warnings instead of enforcing.
- # Disabled-SELinuxIsFully disabled.
-
-
-
- # SELinux = enforcing
-
- SELinux = disabled
-
-
-
- # Selinuxtype = type of policyInUse. Possible values are:
-
- # Targeted-only targeted network daemons areProtected.
-
- # Strict-full SELinux protection.
-
- Selinuxtype = targeted
Save and restart the system.
2. With sqlplus, enter the user name and password, and the prompt is:
- Enter user-Name: System
- Enter password:
- Error:
- A ORA-01034: Oracle not available
- ORA-27101: Shared Memory realm does not exist
- Linux error: 2: no such file or directory
- Process ID: 0
- Session ID: 0 serial number: 0
The reason is that Oracle was not started successfully. Run the sqlplus '/As sysdba' command and enter startup to start oracle. However, an error is reported when oracle is started:
- [Oracle @ localhost DBS] $ sqlplus '/AsSysdba'
-
- SQL * Plus: Release 11.2.0.1.0 production ction on Mon Jun 25 14:49:49 2012
-
- Copyright (c) 1982,200 9, Oracle. All rights reserved.
-
- Connected to an idle instance.
-
- SQL> startup
- ORA-01078: FailureInProcessing System Parameters
- LRM-00109: cocould not open parameter file '/u01/APP/Oracle/dbs/initliusuping. ora'
Continue to baigoogledu. This time Baidu gave the answer:
- [Oracle @ localhost Oracle] $ find/u01-name pfile
- /U01/APP/admin/orcl/pfile
- [Oracle @ localhost Oracle] $ CD/u01/APP/admin/orcl/pfile
- [Oracle @ localhost pfile] $ ls
- Init. ora.525201213success
- [Oracle @ localhost pfile] $ CP init. ora.52520151120.20./ u01/APP/Oracle/dbs/initliusuping. ora
Find another ora file, copy it to/u01/APP/Oracle/DBS, and rename it initliusuping. ora. Why is my Sid liusuping? When I installed Oracle, it seems that I didn't see the place where I set Sid. How can I set this by default.
Startup again, the database finally got up:
-
- [Oracle @ localhost pfile] $ sqlplus '/AsSysdba'
-
-
- SQL * Plus: Release 11.2.0.1.0 production ction on Mon Jun 25 15:13:00 2012
-
-
-
- Copyright (c) 1982,200 9, Oracle. All rights reserved.
-
-
-
- Connected to an idle instance.
-
-
-
- SQL> startup
-
- Oracle instance started.
-
-
-
- Total system global area 602619904 bytes
-
- Fixed size 1338168 bytes
-
- Variable Size 360711368 bytes
-
- Database buffers 234881024 bytes
- Redo buffers 5689344 bytes
-
- Database mounted.
-
- Database opened.
I don't know how liusuping came from. Please create a library by yourself. Enter/u01/APP/Oracle/bin, enter. dbca, and open the management interface. You can delete and create databases here. We create a database with Sid test:
3. connect it with a client and fail to connect. "No listeningProgram".
Open/u01/APP/Oracle/Network/admin/listener. ora with the following content:
-
- # Listener. ora network configuration file:/u01/APP/Oracle/Network/admin/listener. ora
-
- # Generated by Oracle configuration tools.
-
-
-
- Listener =
- (Description_list =
-
- (Description =
-
- (Address = (Protocol = IPC) (Key = extproc1521 ))
-
- (Address = (Protocol = TCP) (host = localhost. localdomain) (Port = 1521 ))
-
- )
-
- )
-
-
-
- Adr_base_listener =/u01/APP
Change it:
-
- # Listener. ora network configuration file:/u01/APP/Oracle/Network/admin/listener. ora
- # Generated by Oracle configuration tools.
-
-
-
- Sid_list_listener =
-
- (Sid_list =
-
- (Sid_desc =
-
- (Global_dbname = test)
-
- (ORACLE_HOME =/u01/APP/Oracle)
-
- (Sid_name = test)
-
- )
- )
-
-
-
- Listener =
-
- (Description_list =
-
- (Description =
-
- (Address = (Protocol = IPC) (Key = extproc1521 ))
-
- (Address = (Protocol = TCP) (host = 192.168.0.199) (Port = 1521 ))
-
- )
-
- )
-
-
-
- Adr_base_listener =/u01/APP
Then run LSNRCTL start. The result is as follows:
-
- [Oracle @ localhost admin] $ LSNRCTL start
-
-
-
- LSNRCTLForLinux: Version 11.2.0.1.0-production on 25-jun-2012 18:04:25
-
-
-
- Copyright (c) 1991,200 9, Oracle. All rights reserved.
-
-
-
- Starting/u01/APP/Oracle/bin/tnslsnr: Please wait...
-
-
-
- TnslsnrForLinux: Version 11.2.0.1.0-Production
-
- System parameter fileIs/U01/APP/Oracle/Network/admin/listener. ora
- Log messages written to/u01/APP/diag/tnslsnr/localhost/listener/alert/log. xml
-
- Listening On: (description = (address = (Protocol = IPC) (Key = extproc1521 )))
-
- Listening On: (description = (address = (Protocol = TCP) (host = 192.168.0.199) (Port = 1521 )))
-
-
-
- Connecting to (description = (address = (Protocol = IPC) (Key = extproc1521 )))
-
- Status of the listener
-
- ------------------------
-
- Alias listener
-
- Version tnslsnrForLinux: Version 11.2.0.1.0-Production
- Start date 25-jun-2012 18:04:25
-
- Uptime 0 days 0 HR. 0 min. 0 sec
-
- Trace Level off
-
- Security on: Local OS Authentication
-
- SNMP off
-
- Listener parameter file/u01/APP/Oracle/Network/admin/listener. ora
-
- Listener log file/u01/APP/diag/tnslsnr/localhost/listener/alert/log. xml
-
- Listening endpoints summary...
-
- (Description = (address = (Protocol = IPC) (Key = extproc1521 )))
- (Description = (address = (Protocol = TCP) (host = 192.168.0.199) (Port = 1521 )))
-
- Services summary...
-
- Service"Test"Has 1 instance (s ).
-
- Instance"Test", Status unknown, has 1 handler (s)For
ThisService...
-
- The command completed successfully
Then you can use the client link:
Finally connected...