ORACLE Computed and Automatic Columns - oracle

I found this document on the official ORACLE page while searching for information on Computed/Automatic/Virtual Columns:
http://www.oracle.com/technetwork/database/rdb/automatic-columns-132042.pdf
(Title: "Guide to Using SQL: Computed and Automatic Columns. A feature of Oracle Rdb")
Can anyone tell of these features really exist in ORACLE (I'm using version 10g, the document says Computed/Automatic is there since 7.1)?
I can't get any of the examples to work. Also the SQL formatting and syntax highlighting with ORACLE SQL Developer (v 3.0.04) does not work on these statements.
The document does not state that it is a tech-preview or something like that and according to the last page it has been around since May 2002.
For me it reads like a very early preview of 11g's VIRTUAL COLUMNS. What do you think?
Thanks,
Blama

You're reading the documentation of another product: Rdb (this is not Oracle Database Server)!

Related

Checking DBMS versions in PL/SQL

I am looking for a way to find all previous versions of the DBMS (Oracle is used). My point is to return versions of the DBMS that ever existed on the server and time when they were renewed in the following format:
I found sys.registry$history, but not sure that this is exactly what I need.
Which functions is it better to use in this case?
DBA_REGISTRY_SQLPATCH should contain all of the information that you need.
SELECT action_time,
description,
source_version,
target_version
FROM DBA_REGISTRY_SQLPATCH
WHERE source_version <> target_version
ORDER BY action_time;
DBA_REGISTRY_PATCH was introduced in 12.1.0.2. This is the source of patching information you should use for Oracle Databases moving forwards. In 11.2 you could try selecting information from DBA_REGISTRY_HISTORY. Mike Dietrich has an article explaining all of this

What is the Oracle PL/SQL "--+rule"?

I am working with legacy SQL code and I am finding a lot of queries like the following:
SELECT --+rule
username,
usernotes
FROM
userinfotable
ORDER BY
username
I read the Oracle Optimizer Hints documentation, but I can't find an exact reference for a --+rule. I am thinking this rule is possibly an obsolete artifact from a code generation tool that may have been designed to replace "--+rule" with user or generated /*+ SQL */ hint code.
What do you think? Does the --+rule code [literally] in the above example actually do anything as-is? or can I just discard it?
Platform = Delphi 6 with Direct Oracle Access components, Oracle 10g2 with last supported updates. Most of the Legacy SQL code was developed when using Oracle 7 and 8.
The answer is in the referenced documentation you have given:
The following syntax shows hints contained in both styles of comments
that Oracle supports within a statement block.
{DELETE|INSERT|MERGE|SELECT|UPDATE} /*+ hint [text] [hint[text]]... */
or
{DELETE|INSERT|MERGE|SELECT|UPDATE} --+ hint [text] [hint[text]]...
The --+ hint format requires that the hint be on only one line.
So it was an allowed syntax rule for hints: but I think I have never seen it.
In Oracle SQL "rule" hint means use the Rule Based Optimizer (RBO) instead of CBO (Cost Based Optimizer): since Oracle 10 it is no more supported. So for Oracle you cannot discard it: it should be taken into account but without support ...
10.2 doc says:
Rule-based Optimization (RBO) Obsolescence
RBO as a functionality is no longer supported. RBO still exists in
Oracle 10g Release 1, but is an unsupported feature. No code changes
have been made to RBO and no bug fixes are provided. Oracle supports
only the query optimizer, and all applications running on Oracle
Database 10g Release 1 (10.1) should use that optimizer. Please review
the following Oracle Metalink desupport notice (189702.1) for RBO:
http://metalink.oracle.com/metalink/plsql/ml2_documents.showDocument?p_
database_id=NOT&p_id=189702.1
You can also access desupport notice 189702.1 and related notices by
searching for "desupport of RBO" at:
http://metalink.oracle.com
Notice 189702.1 provides details about the desupport of RBO and the
migration of applications based on RBO to query optimization.
Some consequences of the desupport of RBO are:
CHOOSE and RULE are no longer supported as OPTIMIZER_MODE initialization parameter values and a warning is displayed in the
alert log if the value is set to RULE or CHOOSE. The functionalities
of those parameter values still exist but will be removed in a future
release. See "OPTIMIZER_MODE Initialization Parameter" for information
optimizer mode parameters.
ALL_ROWS is the default value for the OPTIMIZER_MODE initialization parameter.
The CHOOSE and RULE optimizer hints are no longer supported. The functionalities of those hints still exist but will be removed in a
future release.
Existing applications that previously relied on rule-based optimization (RBO) need to be moved to query optimization.

Oracle Uniface - selected data too large for SQL Workbench

I am currently working on a stupid system where I have given no direct DB access but a weird SQL Workbench which can not do most of the things apart from some basic stuff. So for some reason I need to do a SELECT * on one of the tables which have 174 columns. And whenever I try that it gives me the following error:
"ERROR: Error -27 was encountered whilst running the SQL command. (-3)
Error -3 running SQL : ORACLE Driver Error [-27]: Selected data too
large for SQL Workbench"
Quick googling gave me nothing apart from (in one of the oracle documents):
In the SQL Editor, the maximum length of one row of the formatted
result is 8190 bytes. When this length is exceeded, the ORA connector
generates the above error
Now, I was wondering if anyone could give me a solution that would be a great help. One of the solution I am thinking is to increase the Maximum Length for Ora Connector/Driver. But I am novice in Oracle and do not know anything apart from querying. So haven't been able to change the Maximum Length yet.
So, please if anybody could help me out with this, that would be great.
Thanks a lot guys
Being asked to do database work trough the Uniface SQL Workbench is not a good situation. It is only a very simple thing that you can use in an emergency if nothing else is available.
You could run a couple of queries, each time with the primary key and a bunch of fields and stitch the result together in Excel.
If you have access to the Uniface Development Environment you can use it to convert your Oracle data to, for example, XML. Instructions are in the Uniface helpfile ulibrary.chm, see command line switch /cpy.
You cannot change the maximum record length of the Uniface Oracle Connector.

GUI to oracle Change data capture

I'm learning how to implement change data capture in oracle. However, not being a DB specialist but rather a DEV, i find the process tedious with respect to other things that i have to do. I end up doing it because my DBA/DEVOP don't want to take care of it.
Hence i was wondering if there is any tool that can help set oracle change data capture. In other words a simple graphical user interface that would write the all code for me. Creation of change table, PL/SQL Script and etc....
Many thanks
topic duplicated in: dba.stackexchange
What problem are you trying to solve?
How (when) will the CDC data be consumed
Are you planning to use something akin to: Oracle 11.1 CDC doc
Be sure to heed: Oracle 11.2 CDC Warning
"Oracle Change Data Capture will be de-supported in a future release of Oracle Database and will be replaced with Oracle GoldenGate. Therefore, Oracle strongly recommends that you use Oracle GoldenGate for new applications."
The company I work for, Attunity, has a pretty slick GUI CDC tool called "Replicate".
It can directly apply changes to a selected target DB, or store changes to be applies.
Many sources (Oracle, SQLserver, DB2...) many targets (Oracle. SQLserver, Netezza, Vertica,...)
Define your source and target DB, Search/Select source table, and one click to go.
Optional transformations such as: table and column names, drop and add columns, calculate values.
Regards,
Hein.

Index Check in OpenEdge 10.2b which uses Oracle schema

How to know index usage of particular module in Openedge 10.2 which uses Oracle db schema?
I have used XREF but .xrf does not give any index details for my module, so I have run below simple query and then checked in .xrf but no index detail available.
FOR EACH tablename NO-LOCK USE-INDEX indexname:
DISPLAY tablename.field.
END.
Please help me how to get index detail for Progress db using oracle schema.
First I assume you are using Oracle DataServer from Progress.
If that is the case, bear in mind that all USE-INDEX will be translated basically into ORDER BY in the resulting query, so mostly being used to order not to access the data.
If you want a know how your information is accessed you'll need to enable qt_debug when connecting to the schema holder, that will allow you to print many information about how your progress code is translated to SQL to access the Oracle DB. You'll need to analyze those SQL (SQL EXPLAIN as an example) to see the performance of your queries and how they are accessing the DB.

Resources