Browsing "Older Posts"

Browsing Category "Development tools"

Importing XML file with invalid character 22 (U+0016)

Von Tobias Arnhold → 1.15.2016
I have to import a set of XML files from time to time. Most of those XML files can be imported with out any problems. But at least one file includes a special character U+0016 which occurs randomly some where inside the file.

When I try to import that file I get this ORA- error message:
ORA-31011: XML-Parsing nicht erfolgreich
ORA-19202: Fehler bei XML-Verarbeitung
LPX-00217: Ungültiges Zeichen 22 (U+0016)
Error at line 39409 aufgetreten

APEX 5 Migration - Part 3 - The Universal Theme Migration

Von Tobias Arnhold → 1.12.2016
The last part of my APEX 5 migrations series:

- APEX 5 Migration - Part 1 - Requirements and Installation
- APEX 5 Migration - Part 2 - Common application issues after the migration
 
This part is about the best and hardest migration:
The Universal Theme migration (UT)!

Most of the developers love the new theme and its functionality but what makes it so different to the old ones? What is the value of the extra costs for the UT migration? Which rules should be followed? And what are the most common problems you will have to face?

APEX Anwendungen importieren und exportieren mit Hilfe des SQL Developers

Von Tobias Arnhold → 2.20.2015
Wussten Sie das der Oracle SQL Developer eine sehr gute APEX Integration bietet? Ich möchte dies Anhand der Import und Export Fähigkeit näher demonstrieren.

Im SQL Developer gibt es im Navigationsmenü neben den üblichen Verdächtigen (Tabellen, Funktionen, Triggern, ...) auch einen Punkt Namens: Application Express
Wenn Sie diesen öffnen, dann sehen Sie alle installierten APEX Anwendungen die auf das Schema referenziert sind.

Export
Über die Rechte Maustaste > Schnell-DDL > In Datei schreiben... können Sie die Anwendung exportieren.

Import
Rechte Maustaste auf Application Express, anschließend "Anwendung importieren..." auswählen. 
 Natürlich können Sie auch im SQL Developer alle Installations-Optionen wie in APEX mitgeben.
Und nun kommt etwas Neues!
Wenn die Installation gestartet ist, dann können Sie die komplette Installation im Log nachverfolgen.

Diese Info hat mir schon einmal mehrere Stunden Suche gespart. Denn falls Sie es hin bekommen eine APEX Anwendung zu zerstören, so dass der Import nicht mehr funktioniert. Können Sie mit Hilfe des SQL Developer's die genaue Stelle des Fehlers herausfinden und anschließend die Anwendung korrigieren und erneut exportieren.
APEX-AT-WORK no image

Switching from Windows to Mac

Von Tobias Arnhold → 11.24.2013
A year ago I bought a Macbook Pro and tried to develope APEX applications with it successfully.
You may ask yourself why? I just want to stay "up to date" and work with the best technique on the market. A couple of colleagues mentioned the performance is better with Mac. Reason enough for me to check it out.

I never needed many special developer tools to build APEX applications in Windows:

 - SQL Developer / Data Modeler - SQL/PLSQL development
 - Firefox + Firebug - APEX development
 - Notepad++ - Universal code editor
 - Greenshot - Make screen copies
 - WinMerge - Compare files
 - Gimp - Working with images
 - MS Office - Documentation / Importing / Presentation
 - Virtual Box - Virtual environment

All these tools (except MS Office) do not need an installation (portable version available) and became my standard apex-at-work-kit for each company. I hated to get used to different development-tools all the time.

With Mac I tried to find the same or at least similar tools which I was used to work with in Windows before:

 - SQL Developer / Data Modeler
 - Firefox + Firebug
 - Ultraedit (is payware but no freeware came so close to Notepad++ like Ultraedit)
 - Skitch
 - No good alternative found yet, but you could check out this link: apple.stackexchange.com
 - Gimp
 - MS Office
 - Virtual Box

The performance of my Macbook Pro (bought on Ebay and extended with SSD and RAM) is actually amazing. At the moment there is no reason to change from testing mode into buying the newest model mode. :)

Next step is to test APEX development on Windows 8.1 :)

I don't want to decide about the best OS. For me it is just interesting finding the most effective way in developing APEX applications.

Btw.: You may wonder why I didn't say anything about SVN or similar tools. Most companies have their own software versioning-tools which means company dependent solutions. My point of interest is company-independent-tools.

There are a lot of more necessary tools but to 95 % of the time I work with the described ones.





Select table and column comments (Oracle SQL)

Von Tobias Arnhold → 6.07.2012
My default development client is the Oracle SQL Developer. If I compare it with TOAD it is slim, free to use and includes a table modeling area.
One thing I don't like is the ability to see table comments. To find this information you need to click on the table inside the table view ("Connections" > #MY_CON2# > Tables), then on tab: "Details", scroll to column "Comments" and finally double click on the comment field to see all details.

Instead of going this way each time you can use this select instead:
-- All tables inside my user
select table_name, comments 
from user_tab_comments
where table_name = :MY_TABLE;

-- All tables for all users:
select table_name, comments 
from all_tab_comments 
where owner = :MY_USER
and   table_name = :MY_TABLE;
To select the column comments use this select: (idea comes from bdelmee)
select TABLE_NAME,
  K.COLUMN_ID, COLUMN_NAME,
  K.NULLABLE, K.DATA_TYPE || 
    case when K.DATA_SCALE is not null then '(' || K.DATA_PRECISION || ',' || K.DATA_SCALE || ')'
      when K.DATA_PRECISION is not null then '(' || K.DATA_PRECISION || ')'
      when K.DATA_LENGTH is not null and K.DATA_TYPE like '%CHAR%' then '(' || K.DATA_LENGTH || ')'
    end DATA_TYPE,
  C.COMMENTS
from user_col_comments C join user_tab_cols K
using(TABLE_NAME,COLUMN_NAME)
where table_name = :MY_TABLE
order by TABLE_NAME, K.COLUMN_ID;
Now we join both selects together and get all information we need:
select 
  decode(column_id,0,TABLE_NAME,null) as TABLE_NAME,
  decode(column_id,0,null,column_id)  as COLUMN_ID,
  COLUMN_NAME, NULLABLE, DATA_TYPE, COMMENTS
from (
  select cc.TABLE_NAME,
    tc.COLUMN_ID, tc.COLUMN_NAME,
    tc.NULLABLE, tc.DATA_TYPE || 
      case when tc.DATA_SCALE is not null then '(' || tc.DATA_PRECISION || ',' || tc.DATA_SCALE || ')'
        when tc.DATA_PRECISION is not null then '(' || tc.DATA_PRECISION || ')'
        when tc.DATA_LENGTH is not null and tc.DATA_TYPE like '%CHAR%' then '(' || tc.DATA_LENGTH || ')'
      end DATA_TYPE,
    cc.COMMENTS
  from user_col_comments cc
  INNER JOIN user_tab_cols tc ON (cc.TABLE_NAME = tc.TABLE_NAME and cc.TABLE_NAME = tc.TABLE_NAME and cc.COLUMN_NAME = tc.COLUMN_NAME) 
  UNION
  select tab.table_name as TABLE_NAME, 
         0 as COLUMN_ID, '' as COLUMN_NAME,
         '' as NULLABLE, '' as DATA_TYPE,
         tab.comments as COMMENTS
  from user_tab_comments tab
) 
where table_name = UPPER(:MY_TABLE)
order by table_name, column_id  ;
That's it.

Troubleshooting in der Firefox Entwicklung

Von Tobias Arnhold → 11.20.2010
In der Entwicklung von APEX Anwendungen verwende ich ausschließlich den Firefox (FF) Browser. Zum abschließenden Test kommt dann der entsprechende Standard-Browser zum Einsatz. Für gewöhnlich ist das der IE und leider ist dieser nicht so gut für die Entwicklung geeignet wie der FF.
Manchmal kann es vorkommend das unter bestimmten Situationen der FF nicht das darstellt was er soll. Dies kann leicht mit einem anderen Browser gegen geprüft werden. In so einem Fall können folgende 3 Optionen angepasst werden, um den Fehler auf die Spur zukommen.

1. Starten Sie ihre Seite ohne den Zugriff auf Cache-Informationen
- Nutzen Sie für die temporäre Nutzung den Privat-Modus


- Oder für die ständige Nutzung die entsprechende Einstellung in den Firefox Einstellungen


2. Schauen Sie ob die Proxy-Einstellungen korrekt sind und ihr APEX Server über die Proxy-Ausnahmen definiert ist


3. Unter umständen verwenden Sie unterschiedliche Sprachen, manchmal kann es helfen die Original-Sprache der Anwendung bzw. der Daten zu definieren



Fehler dieser Sorte treten meist zu Beginn der Anwendungsentwicklung auf und sind während der Entwicklung sehr selten anzutreffen.
APEX-AT-WORK no image

Data mapping with FlowHeater

Von Tobias Arnhold → 9.07.2009
Do you know this problem you get a csv file and need to import it into your database. Of course with APEX you can use the data load utility (Home>Utilities>Data Load/Unload>Load). But what if you don't have APEX or you need some changes on your import data. Using functions/processes or the SQL*Loader can be quite tricky especially at the beginning or if you haven't worked with it in a while. What if your task become even more difficult. For example: Importing one csv file into oracle, mysql and ms sql database.

There is a nice solution available: Data mapping tools
I am really a fan of visual data mapping tools and want to introduce you into a tool called FlowHeater which can make your life as a database administrator or application developer much easier.

In my example I used a portal version on my USB stick of the FlowHeater (\FlowHeater\BIN).
After I downloaded the Oracle Instant Client driver (10.2.0.4). I created the following batch to run my application:


ECHO off
ECHO Run application FlowHeater
ECHO All settings correlates on the current session inside this batch file

ECHO 1. Variablen setzen
ECHO 1.1 Path Variable
set PATH=D:\instantclient_10_2;%PATH%

ECHO 1.2 ORACLE_HOME Variable
set ORACLE_HOME=D:\instantclient_10_2

ECHO 1.3 TNS_ADMIN Variable
set TNS_ADMIN=D:\instantclient_10_2

ECHO 1.4 NLS_LANG Variable
set NLS_LANG=German_Germany.AL32UTF8

ECHO 2. Open application folder
cd \PortableApps\DATABASE\DATA_MAPPING\FlowHeater

ECHO 3. Run application
\PortableApps\DATABASE\DATA_MAPPING\FlowHeater\FlowHeater.exe


I had one issue running FlowHeater from USB-Stick. It had to do with the Oracle .Net driver and FAT32 file rights. There is an issue where you need the "authenticated user" group with full rights on the oracle home directory. Error: "System.Data.OracleClient requires Oracle Client software version 8.1.7 or greater" There are lots of entries about this error available. That is the reason why my oracle home is now located on volume D:. I didn't want to recreate my whole stick just because of NTFS!

Anyway in case you install the FlowHeater on you PC as normal then no issues like that should occur.

Now watch the flash movie I made:
Data mapping with FlowHeater

Download PDF version: oracle-csv-export.pdf
APEX-AT-WORK no image

Administration and development tools I work with

Von Tobias Arnhold → 2.09.2009
Hi all!
I wrote a lot about APEX the last couple of month. Now I want to write about the tools/applications I use to get these apps running and having always the full grip over it.

What main points should an application including to be usable in my eyes?
  • It should work for what I bought it "no more, no less"
  • It should be fast (During start up and use)
  • It should be always accessible better portable (like on an usb stick)
  • It should be intuitive and easy to use
  • It shouldn't cost to much (I mean thousands of €uros) or better be freeware or open source
Database administration tools:
Monitoring
  • LAB128 (Commercial) - One of the jewels: it fits to all main points I wrote before
Log file analysis
  • OraSentry (Charityware) - Small tool which shows you if your alertlog/database is in trouble
SQL and PL/SQL development tools:
  • PL/SQL Developer (Commercial) - In my eyes the best development tool for pl/sql programming
  • TORA (GPL) - This one (a tool with a long history) needs to be named too.
Database modeling tools:
  • DBSchema (Commercial) - A really good mix between price and performance
  • Schemester (Freeware) - I liked this one a lot unfortunately its not longer under development
Data mapping:
  • FlowHeater (Commercial) - A really good data mapping tool for an unbeatable price. It is still under development and unfortunately (until now) only in German available
HTML, CSS and JS development:
  • Notepad++ (GPL) - A must have for fast and easy programming
Website debugging tools:
  • Firefox - Of course a must have for all APEX developers
With these add ons:
  • Colorzilla
  • Firebug
  • Greasemonkey
  • IE Tab
  • Resizeable Textarea
  • Web Developer
Have fun trying them out and maybe some of you know other really good tools. Real jewels for the apex development community.

And of course I just write about them because I like them (and paid for them) and not because they paid for me. :D