Oracle DB. Run OS command from database itself using Java stored procedure.

There are some cases, when you need to access an OS running your database. You need it just right now, but you don’t have an accees or permissions. Let’s do it from database using java stored procedure. If you want to run following commands under non-system user, don’t forget to grant appropriate permissions to your …

Oracle DB. Run OS command from database itself using Java stored procedure. Read More »

Oracle DB. Advanced Queuing. Simple subscriber example.

In this article I will show you how to create Oracle queues, pull messages and push them using subscriber. Before we begin, please, grant dbms_aqadm and dbms_aq execute privileges to user. Queue table use an object data type to transfer message data. Let’s create it first. create or replace type tp_queue as object(n number); Second, …

Oracle DB. Advanced Queuing. Simple subscriber example. Read More »

Oracle DB. Simple AWR report generation from the database itself.

From the version 10g, Oracle database let you to use AWR for system performance analisis.I will show you how to generate AWR report fast and simple. All commands are running under SYS user, but you can use another one with appropriate privileges. First, let’s compile simple report generation function. create or replace function AWR_HTML(in_begin_point in …

Oracle DB. Simple AWR report generation from the database itself. Read More »

HP Vertica. Storing timestamp data depending on precision and encoding type.

One of the key moments using HP Vertica is an optimization of data storage using encoding. Encoding reduces disk space usage, making it faster to get huge amounts of data using on-the-fly decoding.We can suggest optimal encoding type based on data type, cardinality and encoding algorithm intensity. In this article I will investigate disk storage …

HP Vertica. Storing timestamp data depending on precision and encoding type. Read More »

HP Vertica. Timestamp binding. Error 4286: Operator does not exist.

Working with Vertica JDBC, you can get an error while binding timestamp variable.Possibly, you have a similar query: select id from test where d_add > ? – interval ‘1 day’ And you get the following error on prepareStatement stage: [Vertica][VJDBC](4286) ERROR: Operator does not exist: timestamp > interval(in seconds) Solution is simple, just add bind-variable …

HP Vertica. Timestamp binding. Error 4286: Operator does not exist. Read More »