What is the MLSLABEL Oracle datatype? - oracle

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.

Related

db_keep_cache_size in depreciated in oracle 12c

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

Oracle: Copy Database Oracle 10.2.0.2 to Oracle 12c

Currently we have a database running on Oracle 10g (10.2.0.2) in production which needs to be up 24/7, but since it is not supported by the data center, both server OS and Oracle database 10g, we have to move to Oracle 12c as agreed by the superiors. I know I can't use a direct expdp/impdp from 10.2.0.2 to 12.2.0.1. And with limited resources, meaning server resources and no access to oracle support to download oracle 10.2.0.5 patch set or any patch set that is available.
What is the safest and best way with minimal downtime option to move it from 10g to 12c? Do I need to install an 11gR2 software and use it to expdp the data?
The impdp should be downward compatible, but what you can do is:
Do the expdp of your 10.2 database with the 12c software
Use the VERSION parameter of expdp and impdp if you still have problems
You have not told us how big your 10.2 database is and whether you have a limited budget or not. Sometimes the 'superiors' want every last transaction accounted for, and the only way to do this is to use Goldengate. So you can setup the target database, take as long as you need to import the data, and all the while goldengate is keeping the source and target in synch. Goldengate is expensive though and should only be necessary if you have terabytes to deal with.

Failed to create view contains v$view

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.

Can OracleXE's APEX access another Oracle Database (10g) on the same Server, or is it Restricted to those Users/Tablespaces in the XE Database?

My work uses Oracle 10G and is planning on installing Apex. In the meantime, I have downloaded Oracle XE and have taught myself APEX on it; however, I can only access users/tablespaces that I have made in the XE database. What I would like to do is use the XE's Apex to access the users/tablespaces in the production databases of my work.
My colleague says that this should be possible because my workstation is connected to the server, and that there should be a way to configure access from my XE's Apex to the 10g's databases, such as by setting up an appropriate DAD.
I see nothing in the Apex user interface to allow this. I've read every word of the Apex documentation but nothing registered.
XE uses the embedded PL/SQL gateway, as opposed to 10/11G which uses either an Apex Listener or an HTTP Server with the mod_plsql plugin.
Thank you,
Matthew Moisen
I have done this before where we didn't have access to the actual database hosting the data to be worked with save for the standard port 1521 listener access. Apex at the time was new enough to the organization that the DBA's also had a voodoo taboo on using their database server as a webserver gateway as well. You can use your database instance with APEX installed as a "middle tier" or app server with the following steps:
Set up an account on your 10g database that is accessible remotely via dblink.
Set up dblinks to your 10g database table on your workstation with XE installed, use the account and connection information for the 10g database as set up in (1). Note, you may have to update a TNS names file or explicitly indicate your host/networking settings within the dblink itself.
For simple sanity and simplicity in coding your apex projects, set up synonyms for all your dblinked objects (i.e., table1 for table1#dblink) so you're not referencing the dblinks directly in your apex code. Making changes later will be easier if you adhere to this.
That's it. One proviso is that you need to know that LOBs will not work with the out-of-the-box functionality of APEX driven DML operations while using dblinks. This may have changed with the newest version. One workaround you may consider is trying to use a stored procedure which passes your LOB data as a input parameter which will do your DML operation for you.
Otherwise, this approach works nicely. The place where I implemented this model has several production level apps, a test and a development tier all using servers hosting APEX separately from the actual data sources. We used Oracle Standard Edition One (for the support), but Oracle XE should work as well since APEX is the platform in common between either Oracle version.

Oracle 11g Backward compatibility with older oracle releases

Our organization is planning to upgrade its most of the oracle servers & clients to 11g Release 2.
But one of our client system is still using oracle 8i installation.
Can we able to access the objects of Oracle 8i from oracle 11g client?
Some blogs says that it should work and other say it won't.
Can anybody faced any issue with such configuration.
One of the senior dba told us that oracle only supports backward compatibility of 2 versions earlier to current version. Assuming this fact we shouldn't been able to access database objects running on oracle version 8.
Kindly help.
Thanks in advance.
We had to revert to Oracle 10 client (10.1, I believe) in order to connect to an Oracle 8 database. If there is a way to do it using 11.2, I'd like to be schooled.
EDIT: 10.2 will work. Here's the official word:
http://www.oracle.com/technetwork/database/windows/install10202-083849.html
"Access to an Oracle Database Server (Oracle8i Release 3 or later)"
And as of 11.1, you're out of luck:
http://www.oracle.com/technetwork/database/windows/install11106-087844.html
"Access to an Oracle Database Server (Oracle9i Release 2 or later)"
Oracle doesn't even list version 8 in any compatibility tables on their web site. We verified that current (11g R2) JDBC drivers from Oracle do not work with Oracle 8 database sources. It means that it is not possible to access Oracle 8 databases from the latest version of Oracle SQL Developer because it is using JDBC driver.
While there is a slim chance to be able to access Oracle 8 from some other Oracle 11g client, I would not bet my business on that.
Check out MyOracleSupport
Subject: Client / Server / Interoperability Support Between Different Oracle Versions
Doc ID: 207303.1
It won't go directly.

Resources