Problems encountered after RHEL installed Oracle 11g

Source: Internet
Author: User

1. Run sqlplus, prompt

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

  1. # This file controls the state of SELinux on the system.
  2. # SELinux = can take one of these three values:
  3. # Enforcing-SELinux Security PolicyIsEnforced.
  4. # Permissive-SELinux prints warnings instead of enforcing.
  5. # Disabled-SELinuxIsFully disabled.
  6.  
  7. # SELinux = enforcing
  8. SELinux = disabled
  9.  
  10. # Selinuxtype = type of policyInUse. Possible values are:
  11. # Targeted-only targeted network daemons areProtected.
  12. # Strict-full SELinux protection.
  13. Selinuxtype = targeted

Save and restart the system.

2. With sqlplus, enter the user name and password, and the prompt is:

    1. Enter user-Name: System
    2. Enter password:
    3. Error:
    4. A ORA-01034: Oracle not available
    5. ORA-27101: Shared Memory realm does not exist
    6. Linux error: 2: no such file or directory
    7. Process ID: 0
    8. 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:

    1. [Oracle @ localhost DBS] $ sqlplus '/AsSysdba'
    2.  
    3. SQL * Plus: Release 11.2.0.1.0 production ction on Mon Jun 25 14:49:49 2012
    4.  
    5. Copyright (c) 1982,200 9, Oracle. All rights reserved.
    6.  
    7. Connected to an idle instance.
    8.  
    9. SQL> startup
    10. ORA-01078: FailureInProcessing System Parameters
    11. LRM-00109: cocould not open parameter file '/u01/APP/Oracle/dbs/initliusuping. ora'

Continue to baigoogledu. This time Baidu gave the answer:

    1. [Oracle @ localhost Oracle] $ find/u01-name pfile
    2. /U01/APP/admin/orcl/pfile
    3. [Oracle @ localhost Oracle] $ CD/u01/APP/admin/orcl/pfile
    4. [Oracle @ localhost pfile] $ ls
    5. Init. ora.525201213success
    6. [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:

  1. [Oracle @ localhost pfile] $ sqlplus '/AsSysdba'
  2.  
  3. SQL * Plus: Release 11.2.0.1.0 production ction on Mon Jun 25 15:13:00 2012
  4.  
  5. Copyright (c) 1982,200 9, Oracle. All rights reserved.
  6.  
  7. Connected to an idle instance.
  8.  
  9. SQL> startup
  10. Oracle instance started.
  11.  
  12. Total system global area 602619904 bytes
  13. Fixed size 1338168 bytes
  14. Variable Size 360711368 bytes
  15. Database buffers 234881024 bytes
  16. Redo buffers 5689344 bytes
  17. Database mounted.
  18. 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:

  1. # Listener. ora network configuration file:/u01/APP/Oracle/Network/admin/listener. ora
  2. # Generated by Oracle configuration tools.
  3.  
  4. Listener =
  5. (Description_list =
  6. (Description =
  7. (Address = (Protocol = IPC) (Key = extproc1521 ))
  8. (Address = (Protocol = TCP) (host = localhost. localdomain) (Port = 1521 ))
  9. )
  10. )
  11.  
  12. Adr_base_listener =/u01/APP

Change it:

  1. # Listener. ora network configuration file:/u01/APP/Oracle/Network/admin/listener. ora
  2. # Generated by Oracle configuration tools.
  3.  
  4. Sid_list_listener =
  5. (Sid_list =
  6. (Sid_desc =
  7. (Global_dbname = test)
  8. (ORACLE_HOME =/u01/APP/Oracle)
  9. (Sid_name = test)
  10. )
  11. )
  12.  
  13. Listener =
  14. (Description_list =
  15. (Description =
  16. (Address = (Protocol = IPC) (Key = extproc1521 ))
  17. (Address = (Protocol = TCP) (host = 192.168.0.199) (Port = 1521 ))
  18. )
  19. )
  20.  
  21. Adr_base_listener =/u01/APP

Then run LSNRCTL start. The result is as follows:

  1. [Oracle @ localhost admin] $ LSNRCTL start
  2.  
  3. LSNRCTLForLinux: Version 11.2.0.1.0-production on 25-jun-2012 18:04:25
  4.  
  5. Copyright (c) 1991,200 9, Oracle. All rights reserved.
  6.  
  7. Starting/u01/APP/Oracle/bin/tnslsnr: Please wait...
  8.  
  9. TnslsnrForLinux: Version 11.2.0.1.0-Production
  10. System parameter fileIs/U01/APP/Oracle/Network/admin/listener. ora
  11. Log messages written to/u01/APP/diag/tnslsnr/localhost/listener/alert/log. xml
  12. Listening On: (description = (address = (Protocol = IPC) (Key = extproc1521 )))
  13. Listening On: (description = (address = (Protocol = TCP) (host = 192.168.0.199) (Port = 1521 )))
  14.  
  15. Connecting to (description = (address = (Protocol = IPC) (Key = extproc1521 )))
  16. Status of the listener
  17. ------------------------
  18. Alias listener
  19. Version tnslsnrForLinux: Version 11.2.0.1.0-Production
  20. Start date 25-jun-2012 18:04:25
  21. Uptime 0 days 0 HR. 0 min. 0 sec
  22. Trace Level off
  23. Security on: Local OS Authentication
  24. SNMP off
  25. Listener parameter file/u01/APP/Oracle/Network/admin/listener. ora
  26. Listener log file/u01/APP/diag/tnslsnr/localhost/listener/alert/log. xml
  27. Listening endpoints summary...
  28. (Description = (address = (Protocol = IPC) (Key = extproc1521 )))
  29. (Description = (address = (Protocol = TCP) (host = 192.168.0.199) (Port = 1521 )))
  30. Services summary...
  31. Service"Test"Has 1 instance (s ).
  32. Instance"Test", Status unknown, has 1 handler (s)For
    ThisService...
  33. The command completed successfully

Then you can use the client link:

Finally connected...

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.