please help me connect spatials to oracle 10g XE
where can i find fun things to do with oracle spatial?
First, bookmark the reference, these are invaluable when you are writing spatial queries. If you it to be fast (particularly with joins) make sure you use SDO_RELATE (it was in the order of 100-1000x faster for spanning linestrings for me [over SDO_GEOM.RELATE oops]).
Second, Download SQL Developer (don't download 1.x, you will hate it), it will list the geometry column in its component parts instead of barfing at it like most utilities I have tried. So you don't need to spend time looking at the raw points, etc. When creating a geometry column, select the complex option, go to the MDSYS schema then scroll to SDO_GEOMETRY. When creating indexes for the spatial column click domain -> MDSYS then you should have RTREE and SPATIAL types. SDO_GEOMETRY also works as a type so you can pass it to and from procedures and functions within oracle.
As for what to do, that is up to you. I have done everything from making a service availability tool to writing utilities to span over linestrings with stop conditions. In most cases it will depend on your target field as to what is considered nifty and shiny.
Perhaps this might be of help:
Build a Google Earth Interface on Oracle Database XE
Related
I am working on ODI 10 project which has 153 interfaces divided in a few packages. What I want to do is create a PL/SQL procedure with INSERT statements instead of having 153 interfaces. These interfaces are more or less similar i.e they have the same source table and same target (in my case target is a Essbase Hyperion cube), the transformations & filters are different. So anytime I have to update something like a column value , I have to open 153 interfaces and update in each and every one of them. In a procedure, I could do this so easily, I can just replace all values.
So I feel that its best that I create a PL/SQL procedure, as I can maintain the code better that way.
Is there a way to convert the interface into a SQL query?. I want a direct data dump, I don't want to do an complex incremental load. I am just looking to truncate the table and load the data.
Thanks in advance.
It is possible to get the SQL code generated by ODI from the Operator in the log tables. It can also be retrieved in the repository.
Here is an example of a query for ODI 12c (10g being out of support for a long time now) :
SELECT s.sess_no, s.nno, step_name, scen_task_no, def_txt
FROM SNP_SESS_STEP s, SNP_SESS_TASK_LOG t
WHERE s.sess_no = t.sess_no
AND s.nno = t.nno;
Starting with ODI 11g, it is also possible to simulate the execution instead of doing an actual execution. This functionality will just display the code generated in ODI Studio instead of running it.
Finally, upgrading to a more recent of ODI would allow to use the ODI SDK. With it you could programmatically do changes to all the mappings in one go. Reusable mappings could also help as it sounds that some logic is implemented multiple times. That would enable to ease these kind of changes while keeping the benefits of an ELT tool (scheduling, monitoring, visual representation of flows, cross-technology, ...).
Disclaimer : I'm an Oracle employee
I am trying copy an oracle table into postgres. One of the columns in the oracle table is of "sdo_geometry" type. I want to know what is the equivalent for that data type in postgresql and how I can copy that data into my postgres table and if it requires any transformation etc. I am not looking for any migration tool as it is just one table and I am manually copying the data which is very small in size.
Thanks!
PostgreSQL has a number of geometrical data types built in, see the documentation. These offer limited functionality, but if these types and the functions and operators available for them do the trick for you, it would be the simplest solution.
If you need more advanced geometry support, you'll have to install the PostGIS extension.
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.
We have an Oracle Enterprise Edition 10 installation and as its been explained to me by our DBAs, Oracle Enterprise installs include all extensions and you're simply licensed by what you use.
We've discovered we're using Oracle Spatial but we don't want to be. I can confirm for myself that its being used with this SQL:
select * from dba_feature_usage_statistics;
Unfortunately that's all I can find out. We have a large number of applications which use Spatial elements, but having asked all of our vendors they assure us their apps are using Oracle Locator (which is the free subset of Spatial).
So my question is simple - how do I discover exactly which app is using the Oracle Spatial extension?
Alternately (brought to light by ik_zelf's answer), how do I prove I'm only using the Locator subset of Spatial.
Check the sdo metadata:
select * from mdsys.sdo_geom_metadata_table where sdo_owner not in ('MDSYS', 'OE')
when you dig a little deeper in the dba_feature_usage_statistics you will find this query as part of the determination of what is being used and what not. The schema's MDSYS and OE are not counted, even when they have sdo objects.
There is a list of functionality that is part of Oracle Spatial vs. Oracle Locator on the Oracle website: http://docs.oracle.com/cd/B19306_01/appdev.102/b14255/sdo_locator.htm#SPATL340 - specifically pay attention to the section that lists things only available in Oracle Spatial.
The short story is that (basically) the following things are off the table for Locator:
Topology
Network data model
GeoRaster
Geocoding
In-built data mining functions
Linear referencing
Some spatial aggregation functionality
Some parts of the sdo_geom package
Storage, indexing, partitioning, sdo_util package, coordinate transformations and more are all fully within Locator. I would simply check the dba_source view for any stored procedures that use any of the prohibited functions.
For code outside of the database, I guess you have to take someone's word for it, but in my experience external applications tend to use their own methods rather than Oracle in-built features.
We are planning a new system for a client in ORACLE 11g. I've been mostly in the Sql Server world for several years, and am not really current on the latest ORACLE updates.
One particular feature I'm wondering if ORACLE has added in by this point is some sort of logical "container" for database objects, akin to Sql Server's SCHEMA.
Trying to use ORACLE's schemas like Sql Server winds up being a disaster for code comparisons when trying to push from dev > test > live.
Packages are sort of similar, except that you can't put tables into a package (so they really only work for logical code grouping).
The only other option I am aware of is the archaic practice of having to prefix object names with a "schema" prefix, i.e. RPT_REPORTS, RPT_PARAMETERS, RPT_LOGS, RPT_USERS, RPT_RUN_REPORT(), with the prefix RPT_ denoting that these are all the objects dealing with our reporting engine say. Writing a system like this feels like we never left the 8.3 file-naming age.
Is there by this point in time any cleaner, more direct way of logically grouping related objects together in ORACLE?
Oracle's logical container for database objects IS the schema. I don't know how much "cleaner" and "more direct" you can get! You are going to have to do a paradigm shift here. Don't try to think in SQL Server terms, and force a solution that looks like SQL Server on Oracle. Get familiar with what Oracle does and approach your problems from that perspective. There should be no problem pushing from dev to test to production in Oracle if you know what you're doing.
It seems you have a bit of a chip on your shoulder about Oracle when you use terms like "archaic practice". I would suggest you make friends with Oracle's very rich and powerful feature set by doing some reading, since you're apparently already committed to Oracle for this project. In particular, pick up a copy of "Effective Oracle By Design" by Tom Kyte. Once you've read that, have a look at "Expert Oracle Database Architecture" by the same author for a more in-depth look at how Oracle works. You owe it to your customer to know how to use the tool you've been handed. Who knows? You might even start to like it. Think of it as another tool in your toolchest. You're not married to SQL Server and you're not being unfaithful by using Oracle ;-)
EDIT:
In response to questions by OP:
I'm not sure why that is a logistical problem. They can be thought of as separate databases, but physically they are not. And no, you do not need a separate data file for each schema. A single datafile is often used for all schemas.
If you want a "nice, self-contained database" ala SQL Server, just create one schema to store all your objects. End of problem. You can create other users/schemas, just don't give them the ability to create objects.
There are tools to compare objects and data, as in the PL/SQL Developer compare. Typically in Oracle you want to compare schemas, not entire databases. I'm not sure why it is you want to have multiple schemas each with their own objects anyway. What does is buy you to do that? Keep your objects (tables, triggers, code, views, etc.) in one schema.