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
Related
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 have two Oracle 11G installations. I can run a script that imports a 37MB database into one of them with no problems (installation A). In the other (installation B), when I run the exact same script with the exact same file it gets "ORA-01000: maximum open cursors exceeded". I increased the max open cursors to 20,000 but when the script gets to row 20,000 then it stops with the same ORA-01000 error. The installation that is working has max open cursors set to 300.
Obviously there is no problem with the script or the SQL because it works in one Oracle database. So there must be a setting in the other Oracle instance that prevents open cursors from closing. What could it be?
Installation A works.
Database = Oracle Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options. Driver = Oracle JDBC driver 11.2.0.1.0.
Installation B does not work.
Database = Oracle Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, Automatic Storage Management, OLAP, Data Mining
and Real Application Testing options. Driver = Oracle JDBC driver 11.2.0.3.0.
I would recommend checking what cursors are open in a session. If you see 10.000 statements, all alike, with open cursors, there is something wrong in the code.
I myself find the easiest way to do this:
connect sys
alter system flush shared_pool; /* Removes everything can be finished, the trees hinder my view of the forest. */
/* Overall overview. */
select *
from v$sqlarea
/* Open cursors per session. */
select *
from v$open_cursor
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.
I've been trying to access the dba_data_files table to see whether the autoextend is turned on for my data files. However, even though I'm using Oracle 10g, this table seems to not exist:
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL> select * from dba_data_files;
select * from dba_data_files
*
ERROR at line 1:
ORA-00942: table or view does not exist
Is there some other way to check and even change whether a data file for a particular tablespace has the autoextend option turned on?
You should make sure you're connecting with an account that has privileges to see this view - try the SYSTEM account if you have that password, otherwise have your DBA grant the SELECT_CATALOG_ROLE to the account you are using.
You should be able to do this through the oracle enterprise manager under Administration