ORA-01861: literal does not match format string

Remove the TO_DATE in the WHERE clause TO_DATE (alarm_datetime,’DD.MM.YYYY HH24:MI:SS’) and change the code to alarm_datetime The error comes from to_date conversion of a date column. Added Explanation: Oracle converts your alarm_datetime into a string using its nls depended date format. After this it calls to_date with your provided date mask. This throws the exception.

Why do I have ORA-00904 even when the column is present?

ORA-00904-invalid identifier errors are frequently caused by case-sensitivity issues. Normally, Oracle tables and columns are not case sensitive and cannot contain punctuation marks and spaces. But if you use double quotes to create a quoted identifier, that identifier must always be referenced with double quotes and with the correct case. For example: create table bad_design(“goodLuckSelectingThisColumn … Read more

Execute Immediate within a stored procedure keeps giving insufficient priviliges error

Oracle’s security model is such that when executing dynamic SQL using Execute Immediate (inside the context of a PL/SQL block or procedure), the user does not have privileges to objects or commands that are granted via role membership. Your user likely has “DBA” role or something similar. You must explicitly grant “drop table” permissions to … Read more

How can I keep Oracle SQL Developer from closing the DB connection?

Answer It’s most likely a firewall between SQL Developer and the database that breaks things. You can solve that from SQL Developer using the SQL Developer Keepalive plugin. You can also fix this from the Database Server by using the answers by Thomas and David Mann. Oracle Net can be configured with Dead Connection Detection … Read more