I'm getting this Error while executing the query in Oracle Database :
ORA-00904: "STRDEF": invalid identifier
Oracle Database Version is :
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit
Production PL/SQL Release 11.2.0.4.0 - Production
"CORE 11.2.0.4.0 Production" TNS for Linux: Version 11.2.0.4.0 -
Production NLSRTL Version 11.2.0.4.0 - Production
STRDEF is not an attribute in the query referenced anywhere in tables / views.
The DB was refreshed recently from Production.
Anyone seen this kind of issue before?
Issue was with the Oracle Session Level parameter “QUERY_REWRITE_ENABLED”. From Oracle docs it’s found that it’s used by Oracle to quickly answer the query using materialized views. For some reason it was enabled at the database level causing all the queries to be rewritten by Oracle behind the scenes. This problem was introduced by Oracle while creating the fix.
It was linked to the issue discussed in -
ORA-00904: “from$_subquery$_014”.“column_name”: invalid identifier
JFYI we were facing this issue too.
Related
I'm trying to keep/pin frequently accessed table in buffer, but i see the db_keep_cache_size parameter is deprecated in 12c. is there any alternative way to perform same on 12c?
my oracle version: Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit.
I tried below steps in 12c and it executed without any error, but not sure it will have any impact on 12c.
show parameter keep;
alter system set db_keep_cache_size=1M scope=both;
show parameter keep;
SELECT SEGMENT_NAME, BUFFER_POOL from dba_segments where SEGMENT_NAME='cust_table' and owner='services';
alter TABLE services.cust_table storage (buffer_pool keep);
Could someone please suggest, whether above steps are valid in 12c?
Thanks in advance.
Laks
I tried to upload file using the oracle apex brower file item and got the below error:
ERR-7620 Could not determine workspace for application ().
Environment :
Oracle cloud
Database : ATP Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Oracle Apex : 19.2
Everything use to work, i change nothing.
Thanks.
In sqlplus under normal schema account (not sys), query select * from v$instance; runs OK. But when create view which references it, error happens:
create or replace view vw_test_instance
as
select * from V$instance;
SQL Error: ORA-01031: insufficient privileges
If switch v$instance to any normal table like select * from dual;, then the view created with no problem.
Oracle version:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
PL/SQL Release 11.2.0.4.0 - Production
"CORE 11.2.0.4.0 Production"
TNS for Linux: Version 11.2.0.4.0 - Production
NLSRTL Version 11.2.0.4.0 - Production
The back ground is I'm upgrading a database run on 10g to 11g, things used to work on 10g just broken on 11g... Can I fix it without touching source code of views? Appreciated!
This is related to user GRANTS.
1. GRANT SELECT ON V$INSTANCE TO <USER>; --> Will be provided by SYSDBA
2. Then try. It will definitley help.
This link will also help you to understand why this kind of behaviour occurs.
v$views Grant
"query select * from v$instance; runs OK. But when create view which references it, error happens:"
The error you get - SQL Error: ORA-01031: insufficient privileges - indicates that your user lacks the privileges to create a view.
" things used to work on 10g just broken on 11g"
Clearly on 10g privileges your user had privileges to create views and on 11g they do not.
The most likely explanation is that your user relies on the CONNECT role. In older versions of Oracle this role had several system privileges, including CREATE VIEW. This implicit granting of privileges was always dodgy. However, in 11g this changed and the role now only has CREATE SESSION. All other privileges must be granted explicitly. This is mentioned in the 11g Upgrade docs and explained in depth by the 11g Security Guide Find out more.
I've two environments, Oracle 12.1.0.2.0 - 64bit, which are basically identical.
In one I could successfully place the tables I wanted in memory, but in the other one I get 'ORA-00922: missing or invalid option'.
The command I'm executing is
ALTER TABLE USER_ROLE_T INMEMORY PRIORITY MEDIUM;
Both environments are configured with INMEMORY parameter and SGA_TARGET is configured to '0'.
What can be the cause?
The issue was caused due to incorrect parameter value.
The COMPATIBLE parameter was set to Oracle 11.2.4, as the server was upgraded to Oracle 12c from Oracle 11g.
Once I've set the parameter to the correct Oracle version, the issue was resolved.
I've come across a strange datatype in oracle called MLSLABEL. It's not listed on datatype docs, and is only valid for 'trusted oracle' (whatever that is). The documentation I could find on it is this. What is MLSLABEL, and what does it do?
MLSLABEL is (was?) a datatype used by Trusted Oracle, the foreunner of Oracle's Advanced Security Option. The Admin docs say it was included in regular Oracle for compatibility. Find out more.
Trusted Oracle as a brand was replaced by ASO with Oracle 9i (I think). I don't think MLSLABEL is used in ASO (I can't find anything in the relevant docs). It is still supported in modern versions of the database. probably for backwards compatibility:
SQL> select * from v$version;
BANNER
-----------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production
PL/SQL Release 11.1.0.6.0 - Production
CORE 11.1.0.6.0 Production
TNS for 32-bit Windows: Version 11.1.0.6.0 - Production
NLSRTL Version 11.1.0.6.0 - Production
SQL> create table mls (id number, lbl mlslabel);
Table created.
SQL>
If I recall correctly, it is used for a finer grained permission scheme. Oracle out of the box allows users to be granted permissions on views, tables, procs, etc. But if you need to limit access to users based on the value of a column in a record, I think that you can use Labels for that. On the other hand, I am not certain when you go to virtual private databases (VPDs), but that might not be what you are asking.