Browsed by
Category: Database

Manual Oracle Uninstall

Manual Oracle Uninstall

A number of people have contacted me regarding problems uninstalling Oracle products. The two methods listed below should only be used as a last resort and will remove *all* Oracle software allowing a re-install. If you make any mistakes they can be quite destructive so be careful. Windows UNIX Windows In the past I’ve had many problems uninstalling all Oracle products from Windows systems. Here’s my last resort method: Uninstall all Oracle components using the Oracle Universal Installer (OUI). Run regedit.exe and delete the HKEY_LOCAL_MACHINE/SOFTWARE/Oracle key….

Read More Read More

Debezium with Oracle 11g

Debezium with Oracle 11g

Versions in use Kafka 2.3.0 / Confluent Platform 5.3.0 Debezium 0.10 Oracle 11g EE 11.2.0.4 tl;dr It works, though you need some small adjustments to the DB setup that is described in the Debezium Tutorial Using Oracle. You need a minimum version of 11.2.0.4. You also need an Oracle license for XStream in addition to your 11g database. Watch out for Oracle data types that come through Debezium as a byte array: KSQL can’t read it, so you need some other way…

Read More Read More

XStream Inbound… A Sample Java Program

XStream Inbound… A Sample Java Program

Oracle XStream is a new feature of Oracle Database 11g Release 2. Though it has been developed by the Streams team and is part of the database, XStream is part of GoldenGate! And now that the GoldenGate deal has been closed, 7 days before Oracle Openworld, it’s easy to guess why XStream went out a few hours ago. This post is about XStream; it provides a Java program that uses “XStream In” to enqueue messages to a buffered queue. A…

Read More Read More

XStream Outbound… A sample Java Program

XStream Outbound… A sample Java Program

Like with XStream InBound in my previous post, you’ll find below a simple Java for XStream Outbound. This new program subscribes to Streams captured changes. Does it sound easy ? It is, like you’ll figure out below. Step 1: Create a Sample Schema For this sample program, create a schema and a table : connect / as sysdbacreate user source identified by source default tablespace users temporary tablespace temp;grant connect,resource to source;col dbname new_value dbnameselect value dbname from v$parameterwhere name=’db_unique_name’;prompt &&dbnameconnect…

Read More Read More

Oracle to Kafka made easy.

Oracle to Kafka made easy.

Source: http://oebsnotes.blogspot.com Sometimes we need to expose data from Oracle database to external systems/services.  In our experience, it ends ups with kind of interim tables or even interim databases or REST service solutions, the downsides of such approaches are well known. These days one of the best solution to communicate services is message broker, namely Apache Kafka.  This time we would like to send data from Oracle database to Kafka, after some googling we come up with – GoldenGate, WebLogic,…

Read More Read More

Installing oracle 11.2.0.4 under Docker

Installing oracle 11.2.0.4 under Docker

1. Upload the oracle installation package to the host and extract it (for example, under the directory of / data) [root@localhost data]# ll total 2487256 drwxr-xr-x. 7 440 200 4096 Aug 27 2013 database drwx——. 2 root root 16384 Aug 30 23:23 lost+found -rw-r–r–. 1 root root 1395582860 Aug 30 23:59 p13390677_112040_Linux-x86-64_1of7.zip -rw-r–r–. 1 root root 1151304589 Aug 30 23:59 p13390677_112040_Linux-x86-64_2of7.zip 2. Start with the image of Docker official website and mount / data to / install docker run -it –privileged…

Read More Read More

Oracle for Absolute Beginners: Date, Timestamp and Interval

Oracle for Absolute Beginners: Date, Timestamp and Interval

Source: https://www.red-gate.com/simple-talk/sql/oracle/oracle-for-absolute-beginners-date-timestamp-and-interval/ All databases stand on a tripod of datatypes: strings, numbers and dates. And though they might dress them in fancy clothing – varchar2, clob, float, integer – strings are really just strings, and numbers are really just numbers. But dates — dates are interesting. In this article I’ll talk to you about dates, about time, and about how both are All databases stand on a tripod of datatypes: strings, numbers and dates. And though they might dress them…

Read More Read More

Data consistency in Rails: Understanding the different between transaction and locking

Data consistency in Rails: Understanding the different between transaction and locking

Source Tất cả bắt nguồn từ bài post này của bên Grokking VietNam. Đại ý của bài viết như sau: Một ứng dụng chuyển tiền của ngân hàng có một đoạn code như dưới đây:

Ứng dụng chạy một thời gian thì có bug là tài khoản của một vài người dùng bị âm tiền. Vấn đề ở đây là gì và cách giải quyết. Mới đầu khi đọc bài viết tôi cũng thấy hơi khó hiểu khi đoạn code trên về…

Read More Read More

CONNECT BY basics

CONNECT BY basics

Source It builds a hierarchical query. There are 2 components to is: “start with” — this identifies all LEVEL=1 nodes in the tree “connect by” — describes how to walk from the parent nodes above to their children and their childrens children. Easiest to use an example on emp. If we start with “where mgr is NULL”, we generate the set of employees that have no mgr (they are the top of the tree). If we CONNECT BY PRIOR EMPNO…

Read More Read More

Bulk Processing with BULK COLLECT and FORALL

Bulk Processing with BULK COLLECT and FORALL

Source: https://blogs.oracle.com/oraclemagazine/bulk-processing-with-bulk-collect-and-forall In the previous article in this series, I introduced readers to PL/SQL collections. These data structures come in very handy when implementing algorithms that manipulate lists of program data, but they are also key elements in some of the powerful performance optimization features in PL/SQL. In this article, I will cover the two most important of these features: BULK COLLECT and FORALL. BULK COLLECT: SELECT statements that retrieve multiple rows with a single fetch, improving the speed of data…

Read More Read More