Monthly Archives: January 2006

Constraints and Row Level Security

When you apply Row Level Security to a table, which has constraints, like a primary key or a unique constraint, then these constraints are evealuated regardless of the RLS policy. Of course this makes sense, especially in the case of a primary key, but it can be a problem with a unique constraint. If you […]

Read more

Column order

Yesterday I came across a rather strange problem, which was luckily relatively easily solved. The problem is like this: I am using QDA (Qnxo Development Architecture) packages┬áto get to the data in my tables. In the Query Package there is a function to retrieve a row from the table. I had generated this code and […]

Read more

Shrinking tablespaces

As you might know, Oracle uses tablespaces to store the tables and the data within them. If you drop tables and/or users, the tablespace is not automagically shrunk to it’s minimal size. While playing around with my local database, I imported a lot of (big) tables. I wanted to reload a schema, but before I […]

Read more

Simple comparison SQL

I am comparing tables in two different schemas. Since I am doing the same thing over and over again I created a small script which might be useful to you too. ACCEPT db1 CHAR prompt ‘owner 1 :’ ACCEPT db2 CHAR prompt ‘owner 2 :’ ACCEPT tabname CHAR prompt ‘tablename :’ PROMPT PROMPT &db1..&tabname minus […]

Read more

First day at the office in the new year…

For me, the first day at the office consists of analysing two databases with the same schema, just different data. I need to figure out if these two can be combined into one schema, where we can apply Row Level Security to separate the data again. Most tables will be easily merged, because the primary […]

Read more