Logging the Oracle Data Server
Posted by jeffhobbs on October 17, 2007
Not sure how many are aware pf GeoMedia’s Oracle Data Server logging functionality. This is great if you ever have a problem writing to an Oracle database.
To get GeoMedia to log everything it does with the Oracle database, do the following:
- Close your connection to the Oracle database (or quit GeoMedia)
- Create a file named “GOracle.log” in c:\temp (minus the quotes)
NOTE – The file MUST be in c:\temp and MUST have the correct file name
- Open the Oracle connection (or restart GeoMedia and connect to your Oracle database)
- Start interacting with the Oracle database
You’ll notice that from that point forward EVERYTHING you do to the Oracle database is very verbosely logged. You can then go into the log file and review it for errors. Most of the time the error is easy to find and you can pull the information from the log to feed to Google or Intergraph support.
A couple of notes:
- The log file can get very big, very fast. In fact, after only a few minutes of logging, I’ve seen the file grow to well over 10mb in size! So, make sure to move the file from the c:\temp folder or delete it altogether. If you don’t, any interaction you have in GeoMedia with the Oracle database WILL be logged. This could obviously cause a space issue on your hard drive after a while.
- If you’re looking to write your own Oracle Locator/Spatial spatial query, this logging functionality can be an excellent first step. You can create the log file and then run a native query (Analysis > Native Query) inside of GeoMedia. For those that haven’t used the Native Query command, it’s basically a GUI for the Oracle Locator operators.
So, I created a native query asking Oracle (as opposed to the spatial query operators inside of GeoMedia) to identify all of the stations that fall within a pressure zone named “Cox Zone”. Since this was an Oracle query, GeoMedia created the query, but logged all of the interaction between GeoMedia and the database. Copying directly from the log:
select a.ROWID,a.GDO_GEOMETRY from SJWC_MIG.PRESSURE_ZONE b,SJWC_MIG.STATION a where PRESSURE_ZONE_NAME = ‘Cox Zone’ and mdsys.sdo_relate(a.GDO_GEOMETRY,b.GDO_GEOMETRY,’mask=ANYINTERACT querytype=window’) = ‘TRUE’
All in all, I find this logging tool to be extremely useful. Especially when you’re working with a data model as opposed to a bunch of independent tables in a schema. It helps you understand just what GeoMedia is doing and why Oracle doesn’t like it. You can download my log from this session using this link or the link to the left. Although it’s boring, it might help add some context to this entry. You will also see the spatial query embedded in the log on a few different occasions.
2 Responses to “Logging the Oracle Data Server”
Sorry, the comment form is closed at this time.