Check if feature is enabled Oracle 12g 12.2 - oracle

All,
New to Oracle and am tasked with seeing why a query will not complete in 12c but runs totally fine in 11g. The query will complete in 3-4 minutes on 11g, but will sit and process until you cancel it on 12c.
I'd like to view the features that are enabled, primarily anything dealing with query optimization. How can I do this?

youn can take a look at:
v$ses_optimizer_env
v$sys_optimizer_env
That said: I would start to take a look at the execution plan: Maybe the difference is not a question of Features, but a result of different statistics in the given Systems.

Oracle has an option to emulate optimizer behavior from older versions on the new one. Try to add hint OPTIMIZER_FEATURES_ENABLE('your version of 11g') on 12c, or run this statement within the same session before execution of the query on 12c (assume the version of 11g where query is running fine is 11.2.0.4):
ALTER SESSION SET OPTIMIZER_FEATURES_ENABLE='11.2.0.4';

Related

ORACLE 12c parameter to change , as db performace is a bottleneck with default parameters

we recently upgraded our db from 11g to 12c, now db with 12.2 version on linux.
the db is mostly of oltp type, having around 150GB application data and tables having approx 5GB to 10Gb in size,
after upgradation the performance of db is degraded, we believe we can improve that by changing db parameters.
Can you pls suggest any oracle parameters to look for to improve performance apart from memory related.
and any parameters specific to 12.2 version ?
Please check wehat is the value of parameter OPTIMIZER_FEATURES_ENABLE i.e. whether you are using 11g optimizer of 12c optimizer. Sometimes 12c optimizer dont perform well along with that check the values of OPTIMIZER_ADAPTIVE_PLANS and OPTIMIZER_ADAPTIVE_STATISTICS. Please refer to this article. I have faced a similar performance issue after migration from 11g to 12.2c, so please share yur feedback after checking these parameter values.

Tools for Oracle DB migration from AIX to Linux

My colleague running Oracle Database (11g) in AIX and they would like to move this DB to RHEL. I already found Link. However I would like to check if someone have already migrated or used any other best tools.
you have several options. As pointed out before, Oracle Data Pump is the easiest approach. It would lift you from every version >=10g upwards (or even back when you use the VERSION= parameter).
The caveat is:
Size of the database - and your downtime requirements.
In terms of larger databases, Transportable Tablespaces is the usual choice. More work as you will have to rebuild meta information such as synonyms, view, plsql, sequences etc - and in your case you'll have to either CONVERT the tablespaces as you are coming from a Big Endiann platform and going to a Little Endiann. DBMS_FILE_TRANSFER could assist you here as it can restore and covert at the same time whereas RMAN will need a 2-phase operation with staging space for it.
You can speed up transportable tablespaces with RMAN Incremental Backups to avoid most of the copy/convert time. And you can ease it with Full Transportable Export/Import (minimum source: 11.2.0.3 - minimum destination: 12.1.0.1) where Data Pump does the manual work of transportable tablespaces.
And of course there are other techniques such as Create-Table-As-Select or Insert-Append-Select options via Database Links and such.
Just see the big slide deck "Upgrade / Migrate / Consolidate to 12.2" for customer examples - and the "Migrate >230Tb in <24 hours" decks on my page: https://mikedietrichde.com/slides/
Cheers,
Mike
Is there some reason you can't just use Oracle Database Pump?
Create the database on RHEL, make sure you use a compatible character set.
https://docs.oracle.com/cd/B19306_01/server.102/b14215/dp_overview.htm

Oracle 11g to 12c migration gotchas?

I am embarking on an 11g to 12c Oracle DB migration. I will need to do it at least twice, once for testing, a 2nd time fro production. My initial thought is to use expdp/impdp. I export "full" the DB nightly using expdp.
My problem in the past when importing a full DB is it can get squirrely regarding the system schema/users. A full import tries to muck with system schemas (sys, system, sysman...). My new 12c DB is a portable DB, and obviously I want none of the settings or data from the system schemas, that may hose my new DB.
I do however want all of the non system schemas and users, of which there are 5 or so real schemas, and 30 or so "users."
I have been looking for some blogs or documents that address this issue, and can't find any. A pointer to documentation on how to avoid the problems described above would be great.
Also if there are any other gotchas when doing the migration, a heads up on that would be useful as well.

Replication advice Oracle 11g

We have a requirement to implement replication (of transactions) from a production database to a test database (across a db link). We're using 11g enterprise edition.
This is because it's not just the production data that's needed, the intention is that code releases in the test database would be tested against real-world transactions from the prod system, without the need for those transactions to be done manually. If a transaction fails then in the test system that worked in the prod system, something is wrong with the release.
It doesn't necessarily have to be in real-time however, a delay is acceptable.
There must be zero risk though on the production transactions failing, due an issue with the replication.
What are the options here? I believe Streams is deprecated in 12c, should that be of concern? GoldenGate is additional ££, which I'm afraid rules it out in this case. Some kind of custom trigger-based solution... too much risk on the prod system as far as I can see.
Any advice greatly appreciated!
As of Oracle release 12c (12.1.x), Oracle Advanced Replication and Oracle Streams are being discontinued. Oracle Golden Gate is going to replace all features of Oracle Advanced Replication and Oracle Streams.
Please review this list of possible alternatives (to name a few):
SharePlex
DBVisit
DBConvert

Can Hibernate 2.1.7 work with Oracle Database 11gR2?

A quick and simple question: has anybody used the combination of Hibernate 2.1.7 and Oracle 11gR2 database? We have a legacy app that is using Hibernate 2.1.7 (which we are not planning to update at this point in time) and our database back-end is being upgraded to Oracle 11gR2. Is there any issues we need to be aware of?
Thanks!
With jdbc driver 11.1.0.6.0 you can connect to Oracle 11gR2. No problem.
A simple issue that you might run into is the case of username and passwords. In 11g this is case sensitive, before that version it was not case sensitive.
An other nice one is that accounts now default expire. Check that with your local dba.
You should test the app during the upgrade tests. Database features change, optimizer features change, so the app behaviour could change. Technically I see no reasons why it would not work but knowing some software projects .... Test it. In many cases it does not give any problems at all. A lot depends on the quality of the code. If your app's code is working because it is based on a bug in Oracle that is now solved, you will run into an issue.

Resources