How to track the SQL query launched in Oracle? - oracle

Please specify whether it is possible to track the SQL in Oracle launched queries?
If yes, you can, how to do it?
The essence of this, there are several employees, and you need to understand who and that runs, that is, some kind of username of users, where the start-up requests will be visible, who launched when I started, and how much time went to the execution of the query.
If I do not understand my question quite enough, ask. Thank you all for your attention!

If you are talking about real time performance monitoring of your database, then this will depend on a number of factors, including exactly which version of Oracle you have. Oracle is generally tooled to provide the kind of metrics you're talking about, but the most useful ones (in my experience) may require additional software and additional option licenses to make them visible.
SQL Developer has some basic functionality within its DBA connection options. It can also make ASH and ADDM reports more accessible. Other tools like Oracle Enterprise Manager and Foglight for Oracle provide more detailed metrics over time.
More recent versions of Oracle have more options built-in. Your best bet is to start with Oracle's "2 Day DBA + Performance Tuning Guide" for your version of the database:
Oracle 19c
Oracle 18c
Oracle 12cR2
Oracle 12cR1

Related

GoldenGate version 12 installation/upgradation on zOS

I have GoldenGate version 11.1 on my z/OS and Linux servers. I need to upgrade the GoldenGate to version 12 on both the servers. The database that GG is interacting is DB2. I looked up on the internet for the instructions but to me they seem little complex.
My question is if it is possible for a standard GoldenGate developer to install/upgrade its version on both the servers or I will need a consultant from Oracle to do this activity for me? The good part of calling a Oracle consultant is I will get a lot of learning but the con is they charge a lot for this activity.
Please suggest.
Upgrading a replication system is not a straightforward task. As you have mentioned, there are many thing you need to be aware of. You need first to plan the upgrade process, test it and as a final task, implement it on the production replication system.
For example, GoldenGate 12 has different default values for some parameters than GoldenGate 11. You might need to check the PRM files and adapt them to the never version.
Everything about the upgrade process is written in the documentation and in the Oracle MOS notes. It is possible that all the work that is done during the upgrade is made by a mortal person.
You have to choose by yourself what level of risk you are willing to accept. And make a plan what to do if something goes wrong.
Upgrading can be a complex task and time consuming. The product team for Oracle GoldenGate is attempting to make it as easy and painless as possible.
Seeing that you are on Oracle GoldenGate 11g for Non-Oracle (DB2 for z/OS), the upgrade process can be a bit perplexing.
First, I would recommend you skip 12c and go to 19c. Oracle GoldenGate 19c has all the patches and fixes that 12c does not.
Second, the 12c/19c set of binaries for GoldenGate for Non-Oracle (DB2 for z/OS) is a different install. Starting in Oracle GoldenGate 12c for Non-Oracle (DB2 for z/OS) you can do the install on a Linux mid-tier machine. The only thing that gets installed on the z/OS platform is two (2) stored procedures. This approach opens up a lot of flexibility for the z/OS platform and lowers the overall MIPS processes. More information can be found here: https://docs.oracle.com/en/middleware/goldengate/core/19.1/gghdb/using-oracle-goldengate-db2-z-os.html
Upgrading the system would be the similar to what you have done in the past, but now it will be all linux based and provide you a cost savings by lowing MIPS.

Can we install sybase on windows 7 laptop for learning purpose?

I have an interview next week, It requires a person with expertise in PL/SQL and sybase basic. I have decent knowledge in PL/SQL and planning to learn sybase for the next few days. I was not able to find precise answers on sybase, kindly share your knowledge
1) Can we install sybase in windows laptop ? Windows 7.. any inputs for the same would be of great help
2) What is the most special feature of sybase, to be make it simple... y ppl use sybase when we have oracle/DB2/MS-SQL (NOM, asked to seek understanding).
3)Is there any language like PL/SQL for oracle with respect to sybase.
Thanks in Advance
1) You should be able to download a developers version of SAP ASE (The Sybase name was dropped a few years ago). I don't know about specific OS install options, but hopefully one will work for you, and if not get a VirtualBox VM to install it into.
2) It typically has lower administrative overhead then Oracle, but still a full enterprise dbms taking advantage of *nix stability. At one point TCO was also lower than Oracle & SQLServer, but I'm not sure if that is still the case. It also robust database replication support using SAP Replication Server, with lower overhead then many other replication options.
3) T-SQL is the SQL variant used by SAP/Sybase (as well as SQLServer).

Requirements before jumping to OBIEE 11.7g

I'd like to know your opinions here, what tools do I have to learn first before studying OBIEE for ex. "Oracle Database" do I have to need a prior knowledge in Oracle Database in order for me to learn OBIEE in fast pace. I need your suggestions here.
Thanks
It actually depends on what you want to do with OBIEE. You can be a reports developer, the metadata developer or an OBIEE Administrator. If you end up becoming a reports developer, you'll require less database knowledge. But to start off, you will require knowledge of
Any one database (Oracle, mySQL etc)
Dimensional modelling concepts
I've always believed in installing the software and filling the knowledge gaps while you're working on it.

"Faking" an Oracle Database

The QA department that tests my apps at work uses an Oracle database that they all share. Things get really hairy w/ their cases getting changed. bug reported filed + I spend time just to find out the test case has been changed = time wasted.
What I'd like is for dev and qa to all have our own copy of Oracle running on our machines, so we can protect our data and chase our tails... less.
The problem, which I understand, is we don't have funding for all those licenses. Using an open source database won't work because we have all kinds of PL/SQL packages and triggers that I'm sure tie us to Oracle.
Does anyone know of a way (or maybe an open source product) to "fake" an Oracle database? There are no performance requirements at all. I don't mean mocking objects (we do use that for unit testing), but the actual "listening on a port for your request" RDMS. It's a longshot, but I have to ask.
Use Oracle Express for this purpose.
http://www.oracle.com/technetwork/products/express-edition/overview/index.html
Oracle Database 11g Express Edition
Free to develop, deploy, and distribute
Oracle Database 11g Express Edition (Oracle Database XE) is an
entry-level, small-footprint database based on the Oracle Database 11g
Release 2 code base. It's free to develop, deploy, and distribute;
fast to download; and simple to administer.
Oracle Database XE is a great starter database for:
Developers working on PHP, Java, .NET, XML, and Open Source
applications
DBAs who need a free, starter database for training and deployment
Independent Software Vendors (ISVs) and hardware vendors who want a
starter database to distribute free of charge
Educational institutions and students who need a free database for
their curriculum
With Oracle Database XE, you can now develop and deploy applications
with a powerful, proven, industry-leading infrastructure, and then
upgrade when necessary without costly and complex migrations.
Oracle Database XE can be installed on any size host machine with any
number of CPUs (one database per machine), but XE will store up to
11GB of user data, use up to 1GB of memory, and use one CPU on the
host machine.
Support is provided through a free Oracle Discussion Forum monitored
by Oracle employees as well as community experts.
You can use Oracle XE (Express Edition) which is free.
You can download it here.
Assuming that each developer needs less than 11 GB of data in their personal copy of the database, have you looked at using the free express edition of the Oracle database? You can install that on your local machine or even deploy it in production free of charge. You can't use enterprise edition features but basic PL/SQL should work exactly as it does in whatever edition of the database you're using now.
It's not obvious to me, however, that this is really the solution to the problem you're having. If test cases are getting changed without that information getting communicated to developers or test data that one person is relying on is being changed by some other person, creating more database instances with more copies of the same data isn't likely to be terribly helpful. If you have a local copy of the database, you need some way of getting the current version of all the objects (tables, packages, triggers, etc.). You need some way of getting the data that a particular tester is relying on. You need some way of moving your changes from your machine to the shared databases in a way that doesn't stomp on the changes other developers are making. None of these hurdles are insurmountable, but they do require a very solid build and deployment process-- otherwise, you end up with chaos where the version of code in your database is subtly different than the version of code in everyone else's database and the test data in your system has slightly different characteristics than the test data that QA is using leading to lots of bugs that are reproducible on one system but not another. If your current build and deployment process can't even ensure that test cases aren't changing while bugs are being investigated, I would tend to expect that adding more instances is going to make the problem worse, not better.

Oracle PL/SQL: Any benefits in changing PLSQL_CODE_TYPE from interpreted to native?

Are there are tangible benefits in changing the PLSQL_CODE_TYPE from interpreted to native? Was wondering if there are any case studies on the same.
If benefit justifies the change, how can I go about implementing the same ?
My platform is Windows 2003 server, running Oracle 10gR2 (10.2.0.1.0) if that helps.
The benefit should be speed. Whether it is 'tangible' depends on whether PL/SQL performance is an issue for you. It won't give any benefit on the SQL side (eg SELECTing) or if you have latency issues elsewhere (eg calling web services).
Unless you are doing some computationally heavy tasks in PL/SQL, I suspect you won't notice a difference. I'd be much more concerned about running the database without the appropriate patches, so would recommend you look to applying the patchsets to get you to 10.2.0.4
Just to supplement Gary's excellent answer (which I voted up) here is some further information from the Oracle documentation
http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14261/tuning.htm#LNPLS01209
In addition to the excellent answers already given, unless you really need to switch to Native now, I would recommend waiting until you migrate to Oracle 11g. Here is a relevant paragraph from the documentation:
Starting with Oracle Database 11g,
PL/SQL Native Compilation does not
need a C compiler. Therefore, if you
presently use a C compiler only to
support PL/SQL Native Compilation, you
can remove it from the machine where
your database is installed (and from
each node in an Oracle RAC
configuration).
We have switched to Native compilation in our 11g database, but we don't do a lot of computationally intensive PL/SQL, so our performance gains have been almost insignificant. We hope to have code in the future that will take greater advantage of it. On the plus side it hasn't caused us any problems and was easy to do.

Resources