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

My take away from OOW15

A big conference like Oracle Open World is an excellent opportunity to learn more. But with all the books, blog posts, and on-demand learning on Internet, I really did not have to go to OOW this year to keep myself busy learning. Of course, I learned a lot, but for me, the biggest reward is the inspiration and ideas for future projects, as well as meeting friends in the community including Oracle employees who take part in it. ...

November 8, 2015 · 2 min · Øyvind Isene

OUGN16 - Call for paper

The biggest conference for Oracle users in the Nordics is not far away. Be there as a speaker and attendee. Sure you have a war story or another experience worth sharing. Last year OUGN received 250 abstracts, please, do it again! Follow this link to submit your abstracts: http://c4p.ougn.no/ Deadline is November 15. See you on the ship (which is a boat with other boats on it, according to Millsap)!

October 30, 2015 · 1 min · Øyvind Isene

Who is your hero in the Oracle community?

I have my mental list of people in the Oracle community I look up to. They are people who help through social networks, emails, presentations, books, blog posts, or in a friendly conversation. Now, Oracle has recognised that there are many such individuals in the community, people that know a lot and spend much time sharing it with others. In fact they have asked us to vote on our developer heroes, and they will award them during a big celebration at Oracle Open World. Sure you have met one SQL guru, or a PL/SQL programmer, or someone really concerned about database design? Since I am a DBA I think that we should support our database developers since they are doing their part to make sure that the database, and database application that we will support later is as good as possible. ...

September 28, 2015 · 2 min · Øyvind Isene

Function to let user B see all tables of user A

In case you do not want to grant a user access to data dictionary tables like DBA_TABLES, but will let user B see the list of all tables belonging to user A, you can work around it with a pipelined function in schema A: create type str_set as table of varchar2(30); / create or replace function a_tables return str_set pipelined is l_str varchar2(30); begin for l_str in (select table_name from user_tables) loop pipe row(l_str.table_name); end loop; return; end; / grant execute on a_tables to B; Then user B can see the list of A’s table with: ...

September 27, 2015 · 1 min · Øyvind Isene

Gather statistics on spatial index

When you run dbms_stats.gather_table_stats on tables with spatial indexes or dbms_stats.gather_index_stats directly on the spatial index the routine may return without an error even if no statistics gathering took place. You can verify this by looking at the LAST_ANALYZED column in DBA_INDEXES: select owner,index_name,last_analyzed from dba_indexes where index_type='DOMAIN'; Another way to verify if statistics gathering for these indexes took place is to look for tables with names that start with MDXT: ...

July 27, 2015 · 1 min · Øyvind Isene

Orphan Processes in the database

When you need to find the OS-process on the database server for an oracle session (dedicated server) you can join v$session with v$process: select p.spid from v$session s join v$process p on(s.paddr=p.addr) where s.sid=42; But if you kill a session with ‘alter system kill session …’ the link between these views are broken because the value in v$session.addr changes. In order to look for these orphan processes run this query: select spid, program from v$process where program!= 'PSEUDO' and addr not in (select paddr from v$session) and addr not in (select paddr from v$bgprocess) and addr not in (select paddr from v$shared_server); You may check with OS tools like ps on Linux to see that these are indeed dead processes or with strace to see what they are doing and eventually kill them.

July 5, 2015 · 1 min · Øyvind Isene

ORA-00942

When I had my first Oracle DBA course some years before the start of this millennium I made a special mental note about a very common error message, ORA-00942, “table or view does not exist”. In most programming languages there are a similar message for a common situation; when you refer to an object that does not exist, quite often because you wrote the name wrong. What I found a bit remarkable when I heard about it first time was that ORA-942 may mean two things, either that the table or view does indeed not exist, or you do not have access to it. An example of the latter is when some user has created a table in her schema, and you try to query it, but you have not been granted a privilege to do so. Instead of you receiving some error message like “access denied”, Oracle responds with the same error message; “table or view does not exist”, even if it does exist. It may have added “for you” to make it more correct. I think there is a good reason why this is so, and I think it has to do with optimisation. ...

May 16, 2015 · 3 min · Øyvind Isene

Search and history in SQL Developer

Should be obvious, but I just discovered that it is much easier to change preferences if you search for it in the search field instead of wandering around in the Preferences GUI looking for the place where you can set it: And it is pretty fast, try to look for the place where you choose the OCI client, just write OCI in the field. And similarly, if you think you wrote some smart code a few days ago, just search for it in the SQL history: ...

March 4, 2015 · 1 min · Øyvind Isene