Schlaflos in Le Mans
24 Heures Vélo in Le Mans
"Das Schöne am Fahrradfahren ist, dass man in der Gegend herumkommt". Das ist jedenfalls immer eines meiner unschlagbaren Argumente, wenn ich mich mit einem Läufer unterhalte und wir die Vor- und Nachteile der jeweiligen Sportart diskutieren. Während ein Rennradfahrer in 2-3 Stunden einen Umkreis von 50 oder mehr Kilometern beackern kann, steht dem Läufer in der gleichen Zeit meist nur ein relativ kleines lokales Gebiet zur Verfügung. Diese Abwechslung schätze ich am Radfahren sehr, denn selbst in den vielen Jahren, die ich diesen Sport betreibe, entdecke ich regelmäßig neue Strecken und Landschaften.
The Unsuccessful Success: Trondheim - Oslo 2016
Mein erfolgreicher Weg zum Misserfolg
Inzwischen sind einige Wochen seit meinem Saison-Höhepunkt dem Styrkeprøven vergangen, die Aufregung und Entäuschung haben sich wieder gelegt bzw. sind auf ein normales Maß zurückgegangen. Drei wichtige Erkenntnisse bleiben. Erstens: Dieses Rennen ist eine absolute Herausforderung. Das Wesen jeder Herausforderung ist es, dass Scheitern eine der möglichen Optionen ist. Wäre das nicht der Fall, würde die Herausforderung ihren Sinn verlieren. Zweitens: Der Weg kann genauso wichtig sein wie das Ziel. Drittens: Nicht zu sehr auf die Technik verlassen! Diese Erfahrungen nehme ich mit in mein Gepäck, doch nun erzähle ich die Geschichte ganz von vorne.
How to set manual locks to synchronize processes in Oracle
|
Read more: How to set manual locks to synchronize processes in Oracle
How to copy data with "Long Raw" columns
From time to time I will be faced the problem to move data from one table to another. Under normal circumstances this is not a big deal, but if the source table contains a long-/raw column this is impossible to manage that with plain SQL. So here is a suitable workaround to solve this problem with a few lines of PL/SQL code
Starting point is a table with a long raw column:
insert into long_table select 'new id', long_column /* LONG-Feld */ from long_table a where a.long_id = 'some old id';
This ends up with "ORA-00997: illegal use of LONG datatype error"
The workaround is:
How to create a relation from Oracle to another physical database
... exactly this was the question of a customer, because he wants to join tables between two Oracle databases. Well, the idea for this solution is based upon the fact, that we can have a foreign key constraint on a view. So let's go ahead:
1. We create a view which points to a table/view on the foreign database, using a database link:
create view test_view_dblink as select * from some_table@external_oracle_database;
2. We create a foreign key constraint on that view
alter view test_view_dblink add constraint test_view_dblink_fk foreign key (column_name) references table_in_local_database(column_name) disable;
The "disable" clause at the end of the statement is the important thing because constraints on views must be disabled.
2b. If we would need a primary key we also can define one:
alter view test_view_dblink add constraint test_view_dblink_pk primary key (column_name) disable;
Last but not least: with this technique, we can create relations to all databases for which we have a oracle connector/gateway (e.g. IBM DB2, ...). Check it out!
String Tokenizer with Oracle PL/SQL
|
The solution is based on the ability of oracle to use regular expressions within a SQL statement. In the first example we have comma seperated string, containing the most important crew members of the USS Enterprise:
SELECT regexp_substr(str, '[^,]+', 1, LEVEL) AS splitted_element, LEVEL AS element_no FROM (SELECT rownum AS id, 'Kirk,Spock,Scotty,McCoy,Uhura' str FROM dual) CONNECT BY instr(str, ',', 1, LEVEL - 1) > 0 AND id = PRIOR id AND PRIOR dbms_random.value IS NOT null;