[gdal-dev] When and why ogrinfo sends update for Oracle?

Rahkonen Jukka Jukka.Rahkonen at mmmtike.fi
Wed Aug 22 04:36:43 PDT 2012


Stefano Iacovella wrote:


>> I guess that meaning is to check all the metadata rows from the
>> ALL_SDO_GEOM_METADATA view which are referring to the queried table.
>> There can be several rows created be different Oracle users. Next the
>> maximum BBOX is constructed and that is updated into
>> USER_SDO_GEOM_METADATA view.

> It seems to me that first statement  should include an OWNER filter in the WHERE clause, or it will fetch all records for table with same name and same geometric filedname.

Not really, it is normal in managed envinronment that db admins or data managers are creating and updating the tables but reporting is done with minimal rights.  So reading ALL_SDO_GEOM_METADATA does make sense.  And actually  USER_SDO_GEOM_METADATA is a view into the same data than ALL_SDO_GEOM_METADATA filtered by the current username.  Oracle holds the data in a real table named mdsys.sdo_geom_metadata_table but users cannot handle that table directly, everything goes through views and triggers.

I do not know if it makes much sense really to have several metadata rows with different owners in the metadata table but it happens and it must be done sometimes. Some programs do not even try to read ALL_SDO_GEOM_METADATA.  That means that developers have not worked too much in a real production environment and they are creating their test tables with some Oracle admin account  and then they are reading the data with their clients with the same admin account. Bad habbit but totally understandable, it is much faster and easier so.  It is OK but before finalizing with coding it would be good to make a test: What if I try to do this with limited rights? It would be good also to write it into documentation what rights and into which tables are needed.  Policy in our house is that a non-admin Oracle user has by default no rights to do anything. Everything must be explicitly granted.  Now we have usually learned by trial and error by adding grants one by one and following what is blocking us next.

-Jukka Rahkonen-


Regards

stefano
---------------------------------------------------
41.95581N 12.52854E


http://www.linkedin.com/in/stefanoiacovella

http://twitter.com/#!/Iacovellas 


More information about the gdal-dev mailing list