Direkt zum Hauptbereich

Posts

Posts mit dem Label "Oracle" werden angezeigt.

Using ORE 1.4 on Oracle 12.1c with pluggable databases

It is possible to use Oracle database tables in the R statistical software. And this is a very useful approach (if you know R's capabilities). The fact that you are on this blog now may means that you had no success trying to use tables in R and that you received ORA-12541 once more. To solve this problem, you can omit the next paragraph. However, for getting started with Oracle 12c and R you should take a look at the documentation provided by Oracle. Clear and brief it says that you have to do the following things to use Oracle database in R: Install the Oracle Instant Client if you don't have already from http://www.oracle.com/technetwork/database/features/instant-client/ Install Oracle's R distribution (ORD) from https://oss.oracle.com/OR Modify the PATH variable for the  path of Instant Client Set the environment variable OCI_LIB64 with the path to the Instant Client Install ORE Client Package for R from http://www.oracle.com/technetwork/database/options/advanced-...

Disaggregating CLOBs in PL/SQL

For a seminar during my Master's studies, I am currently occupied with Text Mining. Especially for that, I use a lot of CLOBs in an Oracle 11g2 database. Generally a CLOB is a Character Large Object and can store up to 8 terabytes of character data. The VARCHAR2 data type can just store up to 4000 characters. For a lot of applications 4000 characters is sufficient but for storing texts like a publication or a newspaper article it is not enough. Here a CLOB is required. Handling a CLOB can be very difficult because of its size. You need to cut of single words or even sentences. This can be very easy, using regular expressions. The process to disaggregate a text is called tokenization. The single words cut off from the text are the tokens. The code below shohs a procedures I use for tokenizing a CLOB. It will be loaded from the table into variable b_text . The a loop is run where a single word l_word will be cut off from the clob using a regular expression and the function REGEXP_...

Lazarus IDE, Oracle 11g and German Umlaute

Working with a database can be so easy - as long as you don't need to care about localization or languages with more or other letters than english. One of these Languages is German. And here the problem starts... Introduction Let's look at a simple scenario: Inserting a text with German letters like ä, ö, ü and ß into the Oracle 11g database. And right now there already could be a problem when trying to select it again. So what is the problem here? Actually the problem itself is very simple: The character encoding. However the solution is not as simple. I tried to connect to Oracle via an ODBC connection from Lazarus IDE for inserting german press releases with a lot of Umlauts (äöü). The result in the database was a mess. So how to solute this mess? The "problematic chain" First of all we have to consider that different operating systems have different character sets. Usually current Linux distributions have a Unicode character set in contrast to Windows, u...

Lazarus IDE and TOracleConnection - A How-To

Free programming IDEs are a great benefit for everybody who's interested in Programming and for little but ambitious companies. One of these free IDEs is the Lazarus IDE . It's a "clone" of the Delphi IDE by Embarcadero (originally by Borland). But actually Lazarus is much more than a clone: Using the Free Pascal-Compiler , it was platform-independent and cross-compiling since it was started. I am using Lazarus very often - especially for building GUIs easily because Java is still Stone-Age when a GUI is required (though there is a couple of GUI-building tools - they all are much less performant than Delphi / Lazarus). In defiance of all benefits of Lazarus there still is one Problem. Not all Components are designed for use on a 64 bit systems. Considering that 64 bit CPUs are common in ordinary PCs since at least 2008, this is very anpleasant. One of the components which will not be available on 64 bit installations is the TOracleConnection of Lazarus' SQLDB ...

How to teach Microsoft Access in Oracle Transactions

Because my Article about how to teach Mircosoft Access in Oracle transactions seems to be very popular, I decided to post an English version of it. In future I will concentrate to write in English. Microsoft Access is a widely used product in a number of companies in all industries. This is because the Microsoft Office package is widely used, and access solution 'so ubiquitous. Unfortunately, this solution has its drawbacks. These are noticeable when man realizes an Access front end for a database connection. One of these drawbacks is the lack of ability to implement transactions or to use stored procedures and table functions. About the Access interface alone this is not possible. While there is an SQL pass-through to execute DBMS-proprietary SQL queries, but these are often only possible static and need to be adjusted. Visual Basic for Applications (VBA briefly) here can provide some relief. So it is possible, for example, assign the button controls of an Access form VBA mac...

The tricky issue of Oracle, JDBC and Android

Since Christmas, I am proud owner of an Android powered smart phone (Samsung Galaxy S Plus). The first thing I wanted to do was coding an java app to connect to Oracle database and fire lots of queries into the DBMS. As you maybe know, a JDBC driver is needed for this intention. You can download it at Oracle Software Downloads ( http://www.oracle.com/technetwork/database/enterprise-edition/jdbc-112010-090769.html ). And as you also know, you need to add in Eclipse IDE as a JAR file to your project. If you now test your app with a connection code like the one below, you will get a lot of exceptions: Driver d = (Driver)Class.forName("oracle.jdbc.driver.OracleDriver").newInstance(); DriverManager.registerDriver((d)); Connection c = DriverManager.getConnection("jdbc:oracle:thin:@instance.server.com:1521:name", "user", "password"); I had not even been able to investigate what exception exactly does occur or where it does come from. It's ca...

Wie man Access 2010 (Oracle-) Transaktionen beibringt

Microsoft Access ist ein vielgenutztes Produkt in zahlreichen Unternehmen aller Branchen. Dies liegt darin begründet, dass das Microsoft-Office-Paket weit verbreitet ist, und die ,Access-Lösung' somit überall vorhanden. Leider hat diese Lösung auch Nachteile. Diese machen sich bemerkbar, wenn mann ein Access-Frontend für eine Datenbankanbindung realisiert. Einer dieser Nachteile ist die fehlende Möglichkeit, Transaktionen zu realisieren oder auf Stored Procedures sowie Table-Functions zurückzugreifen. Über die Access-Oberfläche allein ist dies auch so nicht möglich. Es gibt zwar einen SQL-Pass-Through, um DBMS-proprietäre SQL-Abfragen auszuführen, jedoch sind diese oftmals nur statisch möglich und müssen angepasst werden. Visual Basic for Applications (kurz VBA) kann hier eine gewisse Abhilfe schaffen. So ist es  z. B. möglich, den Button-Steuerelementen eines Access-Formulars VBA-Makros (Subs) zuzuweisen, und diese beim Klicken auszuführen. Ereignisse wie dieses OnClick-Ereign...

Oracle als ODBC-Datenquelle Excel 2010 - der SQL-Pass-Through

Excel ist das neben Word vermutlich am weitesten verbreitete Office-Produkt in Unternehmen sowie auf privaten Rechnern. Und Excel hat schon sehr umfangreiche Funktionen. Interessant und knifflig wird es aber, wenn man auf Daten aus einer Datenbank (Oracle) zugreifen möchte. Erforderlich hierfür ist eine eingerichtete ODBC-Datenquelle. Über das Menü "Daten", Untermenü "Aus anderen Quellen", Eintrag "Von Microsoft Query" kann man nun über den sog. DSN und Microsoft Query Daten aus der Datenbank abrufen. Möchte man aber eine proprietäre Oracle-Abfrage formulieren, wird Microsoft Query die Anfrage nicht verarbeiten könnnen. Der dafür liegt in der Vorverarbeitung der eingegebenen Statements. In Query selbst gibt es keine Möglichkeit, dies zu umgehen - in Excel selbst schon. Daher wählt man über eine "Dummy"-Abfrage einige Daten aus und manipuliert das SQL-Statement postwendend. Im abschließenden Query-Dialog wählt man "Daten an Excel zurückgeben...

Oracle ODBC-Datenquelle in Windows 7

Um Oracle-Daten in Office-Anwendungen nutzen zu können, benötigt man in den meisten Fällen eine sog. ODBC-Datenquelle (DSN). In Windows 7 findet man eine Möglichkeit zu deren Verwaltung unter "Systemsteuerung", "Verwantung", "Datenquellen (ODBC)". Hier sind auch bereits vordefinierte Datenquellen enthalten (z. B. für Excel-Datenblätter, Access-Dateien oder auch Microsoft SQL-Server). Um Oracle als ODBC-Datenquelle nutzen zu können, benötigt man den passenden ODBC-Treiber für die zu verwendend Datenbankversion. Diese kann man nach kostenloser Anmeldung im Oracle Software Download herunterladen nach vorheriger Registrierung. Zum Erstellen der ODBC-Datenquelle muss eigentlich nicht viel beachtet werden, wenn man denn den richtigen ODBC-Treiber (richtige Architektur 32/64-Bit, richtige Datenbankversion) heruntergeladen hat. Das Feld "Data Source Name" bekommt den Namen, den die Datenquelle erhalten soll. "TNS Service Name" referen...