Presentation at OBUG 2019

Here is the link to the presentation.

February 2, 2019 · 1 min · Øyvind Isene

Import Large Excel Files with SQL Developer

If you try to import large Excel files to SQL Developer, it may hang for a long time. But let say you like SQL Developer very much, or you are too lazy to find another tool, here is a way to load large Excel files. By converting the Excel files to CSV SQL Developer can load it much faster. The tool requires Python, and this week I’m into creating virtual environments, so I will do here. This works where Python works: ...

January 10, 2019 · 1 min · Øyvind Isene

Presentation at POUG 2018

Here is the link to my presentation at POUG 2018 in Sopot, Polen

September 7, 2018 · 1 min · Øyvind Isene

Converting Epoch Time to Date with a Virtual Column

Epoch time is common in some situations because it is easier to do date calculations than with normal dates. The most popular is UNIX Epoch time which is the number of seconds since the start of January 1, 1970. If you have your data in Oracle you don’t have to worry about date arithmetic, since Oracle handles that for you. So in case you have such a table with epoch time and want to query it with functions that expect the DATE datatype, you can add a virtual column that returns the epoch time converted to DATE like this: ...

April 15, 2018 · 2 min · Øyvind Isene

Oracle 12c and SSL

I was supposed to do something else that involved using the package UTL_HTTP from the database accessing an URL over HTTPS. Instead I lost several hours troubleshooting ORA-29024: Certificate validation failure and ORA-28750: unknown error (Nice error the last one). This is not the first time I’ve been through this. It is getting quite common that sites insist on using HTTPS, even if you access them using HTTP, the client will typically be redirected to HTTPS (port 443). ...

February 24, 2018 · 3 min · Øyvind Isene

ODC Appreciation Day: SQL

Oracle Developer Community Most of my work in the Oracle world has been DBA-oriented. But for the last years, I have rediscovered the joy of development and data analysis. When I haven’t been writing the code myself, I have often helped other developers when they connect to the Oracle database, and their program does not perform as expected. Developers coding in Java, Python, or most other programming languages spend time on figuring out how to get the work done. They learn algorithms to discover the fastest way to do it, or the lazy coders just punch out code without wondering too much about efficiency. If their test data is small, performance problems usually get detected after release to production with ensuing frustrations. ...

October 10, 2017 · 3 min · Øyvind Isene

ORA-01861

I’m writing this post so it can be found by googlers struggling with ORA-01861. Usually, ORA-01861 means that you missed something when using a date conversion function. But, here the other day I had created a table using some code generation tool, and I had accidentally declared a column with datatype DATE instead of NUMBER. When you are using the wrong datatype in SQL, Oracle tries to convert it for you. If you try to insert letters into a DATE column, Oracle will return error message ORA-01858 - a non-numeric character was found where a numeric was expected, if you try to insert a number into it, you’ll get ORA-00932 - inconsistent datatypes: expected DATE got NUMBER. But if you insert a number in quotes, and the string is in the right format, Oracle may succeed. ORA-01861 comes when you submit a number in quotes, but is not a complete date. ...

September 30, 2017 · 1 min · Øyvind Isene

Docker for Mac - Increase Swap

In an attempt to compare how long it will take to build a Docker image of Oracle XE (11.2) vs EE (12.2) on my Mac I ran into a problem. The building of XE failed, it complained that only 1023 MB swap space was available. I thought that adding swap during build with this workaround would do, but it turns out that with Docker things are different. I found suggestions here , but since I was not reading carefully enough, I missed the point that you add swap to the hypervisor Docker for Mac is running on. This is what I did to solve it. You connect to the hypervisor with: ...

September 30, 2017 · 3 min · Øyvind Isene

Slow SQL From Monitoring Software

Queries from monitoring software like BMC are not supposed to be among Top SQL, but that was happening in many databases at one site. This may happen if the dictionary statistics are not updated, leading Oracle to choose the wrong plan. Document with ID 1328789.1 on MOS shows an example of this. So the SQL that came from BMC sometimes took up to a minute and was executed every 5 minutes, easily making it to the Top SQL list in Enterprise Manager / Cloud Control. This is the SQL: ...

July 15, 2017 · 2 min · Øyvind Isene

Flashback Tables

It is probably the developers’ responsibility to run tests, but they may not be aware of features in the database that makes the testing easier. Here the other day an ETL developer asked for help with resetting tables after ETL-testing. But there was no need to create complicated scripts to do so. I showed him flashback tables so he could easily fix it himself and run the tests over and over again without any pain. ...

June 26, 2017 · 2 min · Øyvind Isene