sqlplus not connecting as "/ AS SYSDBA" - oracle

I installed oracle database express edition 18c. I'm using windows 10.
when I execute "/ AS SYSDBA" in sqlplus to user-name, it gives the following error.
ERROR:
ORA-28056: Writing audit records to Windows Event Log failed
ORA-28056: Writing audit records to Windows Event Log failed
when I execute below
Enter user-name: SYS AS SYSDBA
Enter password: <password I gave on installation>
it prints below error
ERROR:
ORA-28056: Writing audit records to Windows Event Log failed
OSD-32765: Message 32765 not found; product=RDBMS; facility=SOSD
O/S-Error: (OS 5) Access is denied.
ORA-28056: Writing audit records to Windows Event Log failed
OSD-32765: Message 32765 not found; product=RDBMS; facility=SOSD
O/S-Error: (OS 5) Access is denied.
when I try to execute below
Enter user-name: SYSTEM
Enter password: <password I gave on installation>
it prints below error
ERROR: ORA-01034: ORACLE not available ORA-27101: shared
memory realm does not exist Process ID: 0 Session ID: 0
Serial number: 0
So how can I connect to the database?
Note: I cleared all the event logs from event viewer. not worked!!
Additionally by default there are no environment variable set. so I set
set ORACLE_HOME=C:\app\user\product\18.0.0\dbhomeXE
set ORACLE_SID=CLRExtProc
After setting above it provides below error
ERROR:
ORA-12560: TNS:protocol adapter error
so please help me to connect to database
Thank you!!!

Probably you have not configured properly the sqlnet.ora file
Try to run this
C:\>sqlplus / as sysdba
SQL*Plus: Release 18.0.0.0.0 - Production on Wed Aug 26 15:49:17 2020
Version 18.4.0.0.0
Copyright (c) 1982, 2018, Oracle. All rights reserved.
ERROR:
ORA-01017: invalid username/password; logon denied
If you get this error, then open the SQLNET.ORA file and edit the following parameter AUTHENTICATION_SERVICES value to NTS. Save it.
SQLNET.AUTHENTICATION_SERVICES= (NONE)
to
SQLNET.AUTHENTICATION_SERVICES= (NTS)
Try again and it should work, as long as the windows service is running. Don't forget to set the ORACLE_SID environment variable
set ORACLE_SID=sid
Where sid is the name of the database you want to connect to. Finally
C:\>sqlplus / as sysdba
SQL*Plus: Release 18.0.0.0.0 - Production on Wed Aug 26 15:49:34 2020
Version 18.4.0.0.0
Copyright (c) 1982, 2018, Oracle. All rights reserved.
Connected to:
Oracle Database 18c Express Edition Release 18.0.0.0.0 - Production
Version 18.4.0.0.0
SQL>
Update
The database can't write into the Windows Event Log.
Open Event Viewer, click Start, click Control Panel, click Performance and Maintenance, click Administrative Tools, and then double-click Event Viewer. You must be logged on as an administrator or a member of the Administrators group to free an event log.
Then use any of the next options:
When a log is full, it stops recording new events. Clearing the log is one way to free the log and start recording new events. You can also free a log and start recording new events by overwriting old events. To overwrite events, on the Action menu, click Properties, and then click Overwrite events as needed. This ensures that all new events are written to the log, even when the log is full.
You can also start logging new events by increasing the maximum log size. To increase the log size, on the Action menu, click Properties, and then increase the Maximum log size.

Related

Can't restart oracle database inside docker

So I'm trying to configure debezium on a Oracle database inside this docker image, according to the documentation described here.
At the "Preparing the Database" the first config I have to do is:
ORACLE_SID=ORACLCDB dbz_oracle sqlplus /nolog
CONNECT sys/top_secret AS SYSDBA
alter system set db_recovery_file_dest_size = 10G;
alter system set db_recovery_file_dest = '/opt/oracle/oradata/recovery_area' scope=spfile;
shutdown immediate
startup mount
alter database archivelog;
alter database open;
-- Should now "Database log mode: Archive Mode"
archive log list
exit;
The problem is that when I run shutdown immediate, the database dies and never returns. When I try to run:
docker exec -ti oracle sqlplus sys/top_secret#localhost:1521/ORCLCDB as SYSDBA
I get the error:
SQL*Plus: Release 19.0.0.0.0 - Production on Tue Aug 10 07:44:23 2021
Version 19.3.0.0.0
Copyright (c) 1982, 2019, Oracle. All rights reserved.
ERROR:
ORA-12514: TNS:listener does not currently know of service requested in connect
descriptor
I tried running this script inside the container, but still nothing. Anyone knows how could I start the database again?
There are 2 solutions for this
create a static listener configuration that has the database defined in the listener. Doing so enables startup through sqlnet like you tried.
run the script on the server using an account that is member of the local dba group. For startup use something like: ORAENV_ASK=NO; ORACLE_SID=ORCLCDB; source oraenv; “echo startup”| sqlplus / as sysdba.
This asumes that ORCLCDB is listed in /etc/oratab

On startup of database it denies with error ORA-01078: failure in processing system parameters | LRM-00109: could not open parameter file?

SQL*Plus: Release 12.2.0.1.0 Production on Thu Jul 9 15:06:37 2020
Copyright (c) 1982, 2016, Oracle. All rights reserved.
SQL> conn sys#Databasename as sysdba
Enter password:
Connected to an idle instance.
SQL> shutdown abort;
ORACLE instance shut down.
SQL> startup nomount;
ORA-01078: failure in processing system parameters
LRM-00109: could not open parameter file 'C:\APP\ADMINISTRATOR\VIRTUAL\PRODUCT\12.2.0\DBHOME_1\DATABASE\INITdatabasename.ORA'
SQL>
If I go to C:\APP\ADMINISTRATOR\VIRTUAL\PRODUCT\12.2.0\DBHOME_1\DATABASE\ There is no file with this name INITdatabasename.ORA
After search I found that I should create a pfile from spfile.
SQL> create pfile from spfile;
create pfile from spfile
*
ERROR at line 1:
ORA-01565: error in identifying file '?=\DATABASE\SPFILE%ORACLE_SID%.ORA'
ORA-27041: unable to open file
OSD-04002: unable to open file
O/S-Error: (OS 5) Access is denied.
SPfile is available in database folder. But is unable to open. Please help.
You can specify spfile and pfile locations:
create pfile='path_to_pfile' from spfile='path_to_spfile';
Maybe you could try to restore it from backups if you have any.
Bellow you have a good guide:
https://www.thegeekstuff.com/2014/11/oracle-rman-restore/

What to do whenever I opens my browser it shows "ORACLE DATABASE 10g EXPRESS EDITION LICENSE AGREEMENT"?

None of my browser are working whenever I query in browser I get the message "ORACLE DATABASE 10g EXPRESS EDITION LICENSE AGREEMENT". What to do?
I too faced same issue and fixed the issue by following these steps. Please have a try.
From Start | Run open a command window. Assuming your environmental variables are set correctly start with the following:
C:\>sqlplus /nolog
SQL*Plus: Release 10.2.0.1.0 - Production on Tue Aug 26 10:40:44 2008
Copyright (c) 1982, 2005, Oracle. All rights reserved.
SQL> connect
Enter user-name: system
Enter password: <enter password if will not be visible>
Connected.
SQL> Exec DBMS_XDB.SETHTTPPORT(3010); [Assuming you want to have HTTP going to this port]
PL/SQL procedure successfully completed.
SQL>quit
Now restart the PC and check.

Starting up a database instance fails when not connected to my home network

Every time I'm trying start a database instance and I'm not connected to my home wireless network or wireless is disabled, this is what happens:
[mati#Mati-PC ~]$ sqlplus sys as sysdba
SQL*Plus: Release 10.2.0.1.0 - Production on Mon Oct 17 21:07:39 2011
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Enter password:
Connected to an idle instance.
SQL> startup
ORA-00600: internal error code, arguments: [keltnfy-ldmInit], [46], [1], [], [], [], [], []
SQL>
I have googled the issue, checked /etc/hosts - everything seems OK, including permissions. I'm using Fedora 15.
Why is this happening?
Metalink Note 336447.1 addresses the problem. It appears to be related to the database server not being able to resolve your system's hostname due to DNS not being available.
Run a caching DNS server on your machine and verify all your DNS-related configuration files and their permissions as described in the note.

unable to import dump using "imp"

I am trying to import into oracle using imp command and the output of the command is as below.
invincible:/home/invincible# imp
Import: Release 10.2.0.1.0 - Production on Thu Aug 12 22:19:00 2010
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Username: n_data
Password:
IMP-00058: ORACLE error 1034 encountered
ORA-01034: ORACLE not available
ORA-27123: unable to attach to shared memory segment
Linux Error: 13: Permission denied
IMP-00005: all allowable logon attempts failed
IMP-00000: Import terminated unsuccessfully
invincible:/home/invincible#
user name and password are correct(I am able to connect using sqldeveloper). I have granted dba access to n_data. All the environment variables are set (I ran oracle_env.sh before running env ). So what might be the problem? I am running oracle on debian.
Check this blog post: ORA-27123: unable to attach to shared memory segment.
It describes same error as you have and problem was caused with incorrectly set permissions on oracle executable.
This is excerpt from the above blog post:
Here the oracle file permission has
-rwxrwxr-x i.e. 775, but this file must have the permission -rwsr-s- -x
i.e. 6751
Change the permissions for oracle
file.
$ cd $ORACLE_HOME/bin
$ chmod 6751 oracle
$ ls -l oracle
-rwsr-s--x 1 oracle dba 119582976 Feb 3 2008 oracle
After changing the permissions on
oracle executable file, all the users
are now able to connect to the
database without any errors.
Read blog post for detailed information.
The error suggests it is trying to connect to an instance on the same host that isn't there. Generally I'd say the database isn't actually up and running, but if you can connect with SQL Developer, it suggests it is. But check you are on the correct machine.
Also try
echo :${ORACLE_SID}:
There may be some stray character in the SID. If you are using XE, you want to see :XE: (in upper case, not mixed or lower)
Have you tried
imp n_data/password#XE

Resources