Tag Archives: oracle

Oracle Start as DBA Error [How to Solve]

Problem Description:

In the morning, I created Oracle11g on the new machine and reported an error when starting with the startup command:

This error message means:
ora-00119: the initialization parameters of the system are invalid

Ora-00132: unresolved network listener name

My understanding: there is a problem with the listening configuration in the initialization file. It cannot be initialized and listening cannot be started.

Troubleshooting direction:

View the initialization file. Everyone has different installation paths.

The initialization file must exist in the Oracle installation directory orcl. My path:

Open the initialization file in Notepad and find the local listening configuration: local_Listener: the original local listening configuration parameter is listener_ORCL

Now, change it to:

local_listener=(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521)

verification:

Load initialization file synchronously at startup:

The database started successfully.

[Solved] Navicat Connect Error: Oracle library is not loaded.

Navicat connection error – Oracle library is not loaded

Error reason: OCI. Of Navicat installation package There is a problem with the DLL

Solution: Download instantclient basic windows on the official website of Oracle x64-11.2.0.4.0.zip

Note that the version should be the same as Navicat –> Tools –> Options –> Environment –> OCI environment –> oci. The version information in the address of DLL is consistent

Finally, restart Navicat

[Solved] Error in invoking target ‘agent nmhs‘ of makefile

Error in invoking target ‘agent nmhs’ of makefile when installing Oracle 11g in Linux 7

Solution
add parameters linking libnnz11 Library in makefile
Modify $Oracle_HOME/sysman/lib/ins_ emagent. MK, modify
$(mk_event_nmectl) to $(mk_event_nmectl) – lnnz11
it is recommended to back up the original file before modification
[ oracle@ysserver ~]$ cd $ORACLE_ HOME/sysman/lib
[ oracle@ysserver lib]$ cp ins_emagent.mk ins_emagent.mk.bak
[ oracle@ysserver lib]$ vi ins_emagent. mk

After entering the VI editor, enter/nmectl in the command mode to quickly locate the line to be modified
append parameters -lnnz11 þ the first is the letter L þ the last two are the numbers 1

Save and exit retry

Error when accessing Oracle: connected to an idle instance

When accessing Oracle with SYSDBA, the following information is prompted:

[oracle@localhost ~]$ sqlplus/as sysdba

SQL*Plus: Release 19.0.0.0.0 - Production on Thu Dec 2 20:21:40 2021
Version 19.3.0.0.0

Copyright (c) 1982, 2019, Oracle.  All rights reserved.

Connected to an idle instance.

SQL> select * from dual;
select * from dual
*
ERROR at line 1:
ORA-01034: ORACLE not available
Process ID: 0
Session ID: 0 Serial number: 0

solve:

First, make sure to start listening:

[oracle@localhost ~]$ lsnrctl start

Then start instance:

SQL> startup;

This is the open status when you view the database instance again:

SQL> select status from v$instance;

STATUS
------------------------
OPEN

 

Linux First Install oracle Start Error [How to Solve]

The following error occurs when installing Oracle for the first time:

[oracle@localhost db_1]$ ./runInstaller
ERROR: Unable to verify the graphical display setup. This application requires X display. Make sure that xdpyi                                               nfo exist under PATH variable.

No X11 DISPLAY variable was set, but this program performed an operation which requires it.

Solution:

[oracle@localhost db_1]$ export DISPLAY=:0
[oracle@localhost db_1]$ echo $DISPLAY
:0

After execution, the following problems occur:

[oracle@localhost db_1]$ ./runInstaller
ERROR: Unable to verify the graphical display setup. This application requires X display. Make sure that xdpyi                                               nfo exist under PATH variable.
Exception in thread "main" java.lang.UnsatisfiedLinkError: /data/oracle/product/19.3/db_1/jdk/jre/lib/amd64/li                                               bawt_xawt.so: libXrender.so.1: cannot open shared object file: No such file or directory
        at java.lang.ClassLoader$NativeLibrary.load(Native Method)
        at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1941)
        at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1824)
        at java.lang.Runtime.load0(Runtime.java:809)
        at java.lang.System.load(System.java:1086)
        at java.lang.ClassLoader$NativeLibrary.load(Native Method)
        at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1941)
        at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1845)
        at java.lang.Runtime.loadLibrary0(Runtime.java:870)
        at java.lang.System.loadLibrary(System.java:1122)
        at java.awt.Toolkit$3.run(Toolkit.java:1636)
        at java.awt.Toolkit$3.run(Toolkit.java:1634)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.awt.Toolkit.loadLibraries(Toolkit.java:1633)
        at java.awt.Toolkit.<clinit>(Toolkit.java:1670)
        at com.jgoodies.looks.LookUtils.isLowResolution(LookUtils.java:484)
        at com.jgoodies.looks.LookUtils.<clinit>(LookUtils.java:249)
        at com.jgoodies.looks.plastic.PlasticLookAndFeel.<clinit>(PlasticLookAndFeel.java:135)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:348)
        at javax.swing.SwingUtilities.loadSystemClass(SwingUtilities.java:1879)
        at javax.swing.UIManager.setLookAndFeel(UIManager.java:582)
        at oracle.install.commons.util.Application.startup(Application.java:976)
        at oracle.install.commons.flow.FlowApplication.startup(FlowApplication.java:181)
        at oracle.install.commons.flow.FlowApplication.startup(FlowApplication.java:198)
        at oracle.install.commons.base.driver.common.Installer.startup(Installer.java:1106)
        at oracle.install.ivw.db.driver.DBConfigWizard.startup(DBConfigWizard.java:71)
        at oracle.install.ivw.db.driver.DBConfigWizard.main(DBConfigWizard.java:81)

Install libxrender.So.1 in the prompt as root:

[root@localhost ~]# yum install libXrender.so.1

New problems after installation:

[oracle@localhost db_1]$ ./runInstaller
ERROR: Unable to verify the graphical display setup. This application requires X display. Make sure that xdpyinfo exist under PATH variable.
Exception in thread "main" java.lang.UnsatisfiedLinkError: /data/oracle/product/19.3/db_1/jdk/jre/lib/amd64/libawt_xawt.so: libXrender.so.1: wrong ELF class: ELFCLASS32

Install libxrender:

[root@localhost ~]# yum install -y libXrender

New issues:

Can't connect to X11 window server using ':0' as the value of the DISPLAY variable.

After installation, restart oracle

[Solved] java: Compilation failed: internal java compiler error

Idea version 2121.2.1

1. JDK configuration problem

Setting project jdk

Setting module jdk

During the setting of compiler jdkthe clean operation was performed after several settings, resulting in @override error. Later, it was found that the compiler was not checked

use compiler from module target JDK when possible

2. Add in POM file

<properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <maven.compiler.source>1.8</maven.compiler.source>
    <maven.compiler.target>1.8</maven.compiler.target>
</properties>
<build>
    <plugins>
        <plugin>
            <artifactId>maven-compiler-plugin</artifactId>
            <configuration>
                <source>8</source>
                <target>8</target>
            </configuration>
        </plugin>
    </plugins>
</build>

Done!

How to Solve insufficent privileges error: Ora-01031

For Oracle database in remote multi instance linux environment, an error is reported when executing conn/as SYSDBA: ora-01031: insufficient privileges. The solution process is as follows:

Step 1: find the sqlnet.ora file. Add the following two

SQLNET.AUTHENTICATION_SERVICES=(ALL)
NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT, HOSTNAME)

Step 2: after saving, exit and execute lsnrctl reload

Step 3: the following errors occur after I finish executing:

TNS-12555: TNS:permission denied
 TNS-12560: TNS:protocol adapter error
  TNS-00525: Insufficient privilege for operation
   Linux Error: 1: Operation not permitted```


To solve this problem, execute: Chmod 777/var/TMP/.Oracle

Step 4: specify the connection instance. The orcl here should fill in your own instance name.

export ORACLE_SID=orcl

Step 5: when reconnecting, an error is reported connected to an idle instance.
. Note that this only means that the instance is not started, which is not a big problem. First query the status select status from V $instance

Step 6: start

startup

Since then.

How to Sovle expdp/impdp Data Pump Error

Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 – 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
ORA-39002: invalid operation
ORA-39070: Unable to open the log file.
ORA-29283: invalid file operation
ORA-06512: at “SYS.UTL_FILE”, line 536
ORA-29283: invalid file operation

Cause: Oracle failed to read the default backup directory

Solution:

1. Recreate the logical directory with an administrator such as system (if you want to have the same name as the original logical directory, you need to delete the directory and recreate it first)

Create directory mydata as’ logical directory path ‘;

For example: create directory mydata as’/data/Oracle/mydata ‘;

Delete directory:   drop directory   mydata

2. Check whether the logical directory is created successfully

select * from dba_directories

3. Re expdp export or impdp import data. If the default logical directory used before needs to specify the directory

impdp system/ ddddd@orcl remap_schema=mydb:testdb   directory=mydata DUMPFILE=data1.dmp table_exists_action=replace

[Solved] Pre requisite check “checksystemcommandavailable” failed

[oracle@db1 ~]$ /u01/app/oracle/product/11.2.0/db_1/OPatch/opatch apply -oh /u01/app/oracle/product/11.2.0/db_1  -local /soft/22646198/22502456
Oracle Interim patch installer version 11.2.0.3.29
Copyright (c) 2021, Oracle Corporation. all rights reserved.


Oracle home directory: /u01/app/oracle/product/11.2.0/db_1
Main product list: /u01/app/oraInventory
    From: /u01/app/oracle/product/11.2.0/db_1/oraInst.loc
OPatch version: 11.2.0.3.29
OUI version: 11.2.0.4.0
Log file location:/u01/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/opatch2021-11-05_08-58-35AM_1.log

Verifying environment and performing prerequisite checks...
Prerequisite check "CheckSystemCommandAvailable" failed.
The details are:
Missing command :fuser
Prerequisite check "CheckSystemCommandAvailable" failed.
The details are:
Missing command :fuser
Prerequisite check "CheckSystemCommandAvailable" failed.
The details are:
Missing command :fuser
Prerequisite check "CheckSystemCommandAvailable" failed.
The details are:
Missing command :fuser
Prerequisite check "CheckSystemCommandAvailable" failed.
The details are:
Missing command :fuser
Prerequisite check "CheckSystemCommandAvailable" failed.
The details are:
Missing command :fuser
Prerequisite check "CheckSystemCommandAvailable" failed.
The details are:
Missing command :fuser
Prerequisite check "CheckSystemCommandAvailable" failed.
The details are:
Missing command :fuser
Prerequisite check "CheckSystemCommandAvailable" failed.
The details are:
Missing command :fuser
Prerequisite check "CheckSystemCommandAvailable" failed.
The details are:
Missing command :fuser
UtilSession Failed: 
Prerequisite check "CheckSystemCommandAvailable" failed.
Prerequisite check "CheckSystemCommandAvailable" failed.
Prerequisite check "CheckSystemCommandAvailable" failed.
Prerequisite check "CheckSystemCommandAvailable" failed.
Prerequisite check "CheckSystemCommandAvailable" failed.
Prerequisite check "CheckSystemCommandAvailable" failed.
Prerequisite check "CheckSystemCommandAvailable" failed.
Prerequisite check "CheckSystemCommandAvailable" failed.
Prerequisite check "CheckSystemCommandAvailable" failed.
Prerequisite check "CheckSystemCommandAvailable" failed.
Log file location: /u01/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/opatch2021-11-05_08-58-35AM_1.log

OPatch failed with error code 73

Installation package:

yum install -y psmisc

Problem solving

[Solved] RHEL 7 installs Oracle RAC 11.2.0.4, executes root.sh error ohasd: failed to start

RHEL 7 installs Oracle RAC 11.2.0.4, executes root.sh and reports an error ohasd failed to start

Error reporting reason:

Because RHEL 7 uses SYSTEMd instead of initd to run and restart processes, while root.sh runs ohad processes through traditional initd.

Solution:
in RHEL 7, ohasd needs to be set as a service before running the script root.sh
the steps are as follows:

1. Create service file as root user
[root@rac1 ~]# touch /usr/lib/systemd/system/ohas.service
[root@rac1 ~]# chmod 777 /usr/lib/systemd/system/ohas.service
2. Add the following to the newly created ohas.service file
[root@rac1 init.d]# cat /usr/lib/systemd/system/ohas.service
[Unit]
Description=Oracle High Availability Services
After=syslog.target

[Service]
ExecStart=/etc/init.d/init.ohasd run >/dev/null 2>&1 Type=simple
Restart=always

[Install]
WantedBy=multi-user.target

3. Run the following command as root user
systemctl daemon-reload
systemctl enable ohas.service
systemctl start ohas.service
4. View running status
[root@rac1 init.d]# systemctl status ohas.service

Run root.sh after the service is up
if the ohad failed to start error is still reported, it may be that ohas.service does not start immediately after init.ohad is created by the root.sh script. Refer to the following for solutions:

When running root.sh, refresh/etc/init. D until the init.ohasd file appears. Start ohas.service manually immediately. The service command is systemctl start ohas.service

Oracle monitoring error tns-01189 [How to Solve]

[oracle@hellow ~]$ lsnrctl start
LSNRCTL for Linux: Version 12.1.0.2.0 – Production on 04-Nov-2021 15:30:14
Copyright © 1991, 2014, Oracle. All rights reserved.
TNS-01106: Listener using listener name LISTENER has already been started
– The ps command did not find the listening process
[root@sh ~]# ps -ef | grep -i tns
root 36 2 0 Jan26 ?00:00:00 [netns]
root 14995 14824 0 15:30 pts/1 00:00:00 grep -i tns
– Check the listening status, error reported; TNS-01189
[oracle@sh ~]$ lsnrctl status
LSNRCTL for Linux: Version 12.1.0.2.0 – Production on 4-NOV-2021 15:57:39
Copyright © 1991, 2014, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=hello)(PORT=1521)))
TNS-01189: The listener could not authenticate the user
– There are basically 2 reasons for this problem,
1, the ip and hostname in /etc/hosts file are not the same
2, the listener.ora listener host is not the current host.
After checking, the listener.ora listener host is incorrectly filled in
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = hellow)(PORT = 1521))
)
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
)
After changing to the current host name, restart the listener to resume normal.

An error is reported when kettle connects Oracle database and MySQL database

1. An error is reported when kettle connects to Oracle database

When kettle connects to Oracle database for the first time, it reports an error “wrong connection to database [Oracle]  ”, This is because spoon lacks the jar package corresponding to Oracle. If Oracle or Oracle client is installed, you can copy the corresponding jar file from their installation directory to solve the error problem.

Solution:

Copy and paste all files starting with ojdbc in Oracle database, such as ojdbc5 and ojdbc6.jar, into the spoon directory, such as D: \ kettle \ data-integration-8.2.0.7-719 \ lib\   Just under the path.

2. An error is reported when kettle connects to MySQL database

The error contents are as follows:

  This is caused by the missing jar connection package of MySQL.

Solution:

You need the jar connection package of MySQL database, such as mysql-connector-java-8.0.11.jar, copy and paste it into the spoon directory, such as D: \ kettle \ data-integration-8.2.0.7-719 \ lib\   Just under the path.

The attachment download link is as follows:

Kettle driver. TXT other document resources CSDN Download