Phoenix is an apache project that attempts to provide an ANSI SQL standard interface to HBase data. This is just a quick implementation of it. Notice it has transactional semantics. Code below… import java.sql.*; import java.util.*; public class phoenixTest {…
Category: Database
Oracle database on NFS – Failure scenario testing
This post will provide a simple test case for the efficacy of creating and using an Oracle database cluster using NFS storage. The basic configuration will be shown, as well as the test case scenarios and results. A complete installation…
Does dropping a foreign key constraint drop the corresponding index?
No, you can safely drop a foreign key referential integrity constraint without affecting any underlying indexes. SQL> create table p(t number primary key); Table created. SQL> create table c(f number primary key, t number references p(t)); Table created. SQL> create…
The PL/SQL commit “optimization”
For those of you that may not know, PL/SQL has what is normally an enhancement that results in a full commit being performed at the end of a job, rather than when the programmer instructs it do so. The reason…
Gotcha on automatic PL/SQL recompilation
What is below is taken from an actual analysis of heavy latching and invalid objects after a change was made. This was done in early 2011. For a long period of time, we have avoided making changes that would result…
Crawling all SQL Server tables and columns for a specific value
We had a quick need to search all columns in every table during a data discovery exercise. This is by no means the most efficient, but it does work. It pulls 10,000 rows at a time from each table, and…
Querying hive from Excel
Install 32 bit driver from the following URL https://downloads.cloudera.com/connectors/hive-2.5.5.1006/Windows/ClouderaHiveODBC32.msi Start Excel and run the query wizard Create a new Data Source Enter the values shown below Enter the values shown below Click the Test button Select the stores table from…
Quick way to approximate the RBA for a given SCN
While setting up GoldenGate, we wished there was a way to say “create extract myextract begin scn “, or something similar. However, there is no supported way to get this (of which I am aware at least, but would gladly…
Programatically creating GoldenGate conflict detection/resolution rules
We initially started with checking all columns in every table for any differences in an active-active environment, and aborting the replicat if it failed. That seems a bit over the top in hindsight, so we changed it to simply discard…
Oracle analytic functions continue to exhibit the coolness factor
Sorry, but I never grow tired of these. We wanted to know the average duration between an online shopper creating their cart and when they actually checked out. Analytic functions make this a snap. select min(gap), bucket from (select submitted_date…