0

anyone can Me help uderstand what is happends? i have oraenv corectly, use su oracle to change user, use this command to conncet as sysdba -

sqlplus / as sysdba 

answer is:

SQL*Plus: Release 19.0.0.0.0 - Production on Mon Mar 4 16:33:30 2024
Version 19.16.0.0.0

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

Connected to an idle instance.

i try

SQL> STARTUP;

answer:

ORA-01078: failure in processing system parameters LRM-00109: could not open parameter file '/oracle/impuls/19c/db_home1/dbs/initIMPDBP.ora'

but when I use this command

sqlplus sys@pdbname as sysdba 

paste password and answer is ok,

database working, bud i don't anderstand what is happends

lsnrctl status

LSNRCTL for Linux: Version 19.0.0.0.0 - Production on 04-MAR-2024 16:42:39

Copyright (c) 1991, 2022, Oracle.  All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=amvmor1.andoria.net)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 19.0.0.0.0 - Production
Start Date                26-JAN-2024 19:40:33
Uptime                    37 days 21 hr. 2 min. 5 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /oracle/impuls/19c/db_home1/network/admin/listener.ora
Listener Log File         /oracle/diag/tnslsnr/amvmor1/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=amvmor1.andoria.net)(PORT=1521)))
Services Summary...
Service "02dd7d33e92ebc5fe0631801000a2bb3" has 1 instance(s).
  Instance "impdbt", status READY, has 1 handler(s) for this service...
Service "bpsc" has 2 instance(s).
  Instance "bpsc", status UNKNOWN, has 1 handler(s) for this service...
  Instance "impdbp", status READY, has 1 handler(s) for this service...
Service "e81af78f0d129774e0531801000a28a1" has 1 instance(s).
  Instance "impdbt", status READY, has 1 handler(s) for this service...
Service "e81bb4c3318fb858e0531801000abe14" has 1 instance(s).
  Instance "impdbp", status READY, has 1 handler(s) for this service...
Service "e81c4e8d6234d523e0531801000a4126" has 1 instance(s).
  Instance "impdbp", status READY, has 1 handler(s) for this service...
Service "impdbp" has 1 instance(s).
  Instance "impdbp", status READY, has 1 handler(s) for this service...
Service "impdbpXDB" has 1 instance(s).
  Instance "impdbp", status READY, has 1 handler(s) for this service...
Service "impdbt" has 1 instance(s).
  Instance "impdbt", status READY, has 1 handler(s) for this service...
Service "impdbtXDB" has 1 instance(s).
  Instance "impdbt", status READY, has 1 handler(s) for this service...
Service "test" has 2 instance(s).
  Instance "impdbt", status READY, has 1 handler(s) for this service...
  Instance "test", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully

1 Answer 1

1

When you use @pdbname, you are using TNS to connect through the listener, which creates a shadow process with an environment correctly set up (thanks to listener.ora) to attach to the instance (which, by the way, could be any database in the world as far as we can tell). When you connect without the @..., Oracle bypasses TNS altogether, does not use the listener at all, but instead uses a bequeath mechanism to adopt your client process as the database process of a locally running instance, utilizing the environment you have already set up manually. If you have failed to set up that environment, the connection will fail.

Typically, "Connected to an idle instance." is what you'll get if you haven't set your $ORACLE_SID properly. It must match the instance name (do a ps -ef | grep pmon to see instances) exactly, and it is case-sensitive. You will also need to set the correct $ORACLE_HOME that points to the home that the instance is using, and you should find either an init file or an spfile for the instance specified by $ORACLE_SID in the $ORACLE_HOME/dbs directory.

Try setting your environment with . oraenv and enter the SID (instance name) you want. if that doesn't work, find the proper home in /etc/oratab or /var/opt/oracle/oratab and set both of the above mentioned variables to valid values. It is possible (though not common) that those could be wrong, in which case you may need to spy at the environment of a random database process such as PMON (strings /proc/[pid]/environ | grep ORACLE) to get the real values.

2
  • thank you for help. But: root 943968 943883 0 07:58 pts/0 00:00:00 grep --color=auto pmon oracle 1846153 1 0 Jan26 ? 00:08:44 ora_pmon_impdbt oracle 1846590 1 0 Jan26 ? 00:12:22 ora_pmon_impdbp [oracle@amvmor1 root]$ echo $ORACLE_SID IMPDBP "Connected to an idle instance." Commented Mar 5 at 7:00
  • 1
    /etc/oratab you have right, $ORACLE_SID whos writen not (OMF) IMPDB - it was writen in lowercase letters imdbp i change oraenv and work.... Commented Mar 5 at 7:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.