Importing GPX files to Oracle database, part 2

The previous post showed how to import a file in GPX-format into a table that uses the XMLType. This post shows how to import the waypoints from the GPS logger into a table with the native SDO_GEOMETRY type. First create a table: create table gps_log ( log_time timestamp with time zone, waypoint sdo_geometry, src varchar2(20)); The datatype for log_time is chosen like shown because the type used in the XML-file (xsd:dateTime) maps to this, which makes importing the time data much easier. (Have a look at the previous post to see this mapping.) ...

October 16, 2016 · 3 min · Øyvind Isene

OTN Appreciation Day: A database that is reliable

As suggested by Tim Hall , aka Oracle-Base.com, this post is about my favourite feature in the Oracle world. My favourite product is the good old database, and my favourite feature is simply the fact that I don’t lose data! Never once have I lost data due to software errors, and after many hard landings the database always manages to come back online after wading through the redo logs and make sure the data remains consistent. ...

October 11, 2016 · 2 min · Øyvind Isene

Importing GPX files to Oracle database, part 1

Update 2016-10-16: Found and error in procedure, see below. In preparation for a presentation on Oracle Spatial for DBAs I decided to import some GPS-data. I have an app called GPSLogger on my Android mobile that logs GPS data to a file. The format for this is GPS Exchange Format (GPX). Since I spent some time understanding the XML side of this I decided to blog about it. Note, there are two versions of the GPX schema, 1.0 and 1.1. My app uses the version 1.0, if you try to import a GPX file, have a look in it to verify which schema definition it uses (Look for xsi:schemaLocation in the head of the GPX file). ...

October 2, 2016 · 5 min · Øyvind Isene

Oracle Open World 2016 Afterthoughts

So I went to Oracle Open World again. For me this year it was partly vacation, networking, and inspirations for work. I went on my own, to a few sessions, spent a lot of time on Oak Table World, hanging out in the OTN Lounge, socialising, and at meet-ups. On my way home I put down some of the takeaways: There were a lot of clouds, but it didn’t rain. There are a some speakers who manage to go back to stuff I’ve seen before, yet inspire me with new ideas. Some presenters are so inspiring that I went to sessions that I thought were almost irrelevant for me. It happened more than once that I had a “Huh, this is cool!”-moment. I am thankful for being part of the ACE program, and it is a great privilege to meet more or less likeminded people from all around the world. To stay inside it, I have to keep learning and share with the community, another good motivation for a better career. OOW, despite being one of the most commercial conferences I go to, is the best opportunity to meet all these people, I’ll do the same next year. Again I met some very helpful people from Oracle, people I like to talk to about everything, from Apocalypse to Zookeeper. These people reminds me that Oracle is more than a machine, and the software I work with every day is made by both smart and nice experts. Next year, join the biking on Saturday, or the running over the bridge on Sunday to see what I mean. OTN which is responsible for the ACE program does a lot of cool stuff like the IoT workshop, and much more. I hope the team do understand they have many friends around the world. Some of us plan to show this in near future, check this blog post by Tim Hall aka Oracle-Base: https://oracle-base.com/blog/2016/09/28/otn-appreciation-day/ ...

September 30, 2016 · 2 min · Øyvind Isene

24 Basic Tips on Using SQL Developer

I have been using SQL Developer since it required some goodwill to work. Some of the motivation came from an annoyance with Toad sessions in the database. Iremember that I back then googled “how to block Toad users from the database”. Anyway, these days most developers around me are using SQL Developer. But quite a few are learning only the least to get their job done. The following list is what I use often, and some of itresults in “How did you do that?” when they are looking over my shoulder. The shortcuts here refer to the Windows version since that is what I’m currently using at work. You can easily remap them from Preferences. ...

July 21, 2016 · 5 min · Øyvind Isene

Open Session Error when connecting to Hive from SQL Developer

This blog post from Oracle explains well how to connect to Hive from SQL Developer. In short, you need to download the JDBC driver from Cloudera and make sure you use the correct version, version 4 and not 4.1 Three zip files are included, use the one that starts with Cloudera_HiveJDBC4_2.*. Anyway, after adding the jar files to SQL Developer, and restarting it, the connection failed with: Error setting/closing session: Open Session Error ...

May 23, 2016 · 2 min · Øyvind Isene

Undo old mistakes with online table redefinition

There are times when you as a DBA wished you were involved before someone designed a data model. After release to production correcting mistakes is usually complicated and with risks. Update 2016-04-20: Fixed errors in code. There is an exception to this. Online table redefinition lets you change the structure of a table while everything is up and running. I have used it lately to partition large tables. During the process I also added compression, and moved some of the partitions to another tablespace that I have set read-only, in order to reduce backup time as well. LOBs in one table were moved to SecureFiles with deduplication. ...

April 19, 2016 · 4 min · Øyvind Isene

SQL Developer and SSH for DBAs

In version 4.0.3 SSH was introduced in SQL Developer; here’s a post from Jeff Smith about it. Now this feature has become even easier to use with SSH configuration made independent of the database connections. DBAs typically have a jump server they connect to in order to login further to the database servers. With the new implementation (I’m using version 4.1.3 at the moment) you setup one SSH host, and for every listener you want to connect to you configure a tunnel through the jump server. ...

February 17, 2016 · 2 min · Øyvind Isene

JRuby in SQL Developer Data Modeler on Mac

In SQL Developer Data Modeler you have Libraries under the meny Tools -> Design Rules and Transformations. But when you select that one you may have seen this error message: Notice the second line with Jruby lib is red. This is because the JRuby is not installed (or cannot be found) on your machine. I found the solution to this in Heli’s book on SQL Developer Data Modeler, but thought I could add the easy way to solve this on your Mac. You need to download an extension to your JDK installation. A jar-file can be downloaded from http://jruby.org/download (There are two main versions, I decided to go for the the 1.X one). Look for the jar-file, currently I downloaded jruby-complete-1.7.23.jar. ...

December 29, 2015 · 2 min · Øyvind Isene

ORA-01105

This post is meant to be found by people googling the error message ORA-01105 and ORA-19808 on RAC. The following error messages may be seen after starting an instance: ORA-01105: mount is incompatible with mounts by other instances ORA-19808: recovery destination parameter mismatch When this happened to me I ran this command on both instances: show parameter recovery it showed there was a mismatch for the parameter db_recovery_file_dest_size. Probably I forgot to add “sid=*” to the alter system command one time when I increased the limit. Since one instance was up I could update the parameter for both instances with: ...

November 23, 2015 · 1 min · Øyvind Isene