Einträge für Juli 2007

myndian.de

Mittwoch, 11. Juli 2007

Drop all tables

We tried to deploy an application to a customer’s test system yesterday and needed to clean up the full database. We agreed before that they have to delete the schema and the user with all table etc. but they missed to notify their ORACLE adminstrators. We had only the permissions to work in, but not with the schema. So how to drop a few hundred tables?

DROP TABLE * CASCADE CONSTRAINTS!?

No. No such statement is possible. The solution of my workmate was a little funny:


  1. Open ORACLE SQL Developer and connect to the database / schema.

  2. Mark all tables to delete.

  3. Choose “edit / copy full path” from the applications menu.

  4. Paste the stuff into the script editor. You get something like “TABLE MySchema.MyTable@MyDb”.

  5. Open Search/replace and replace “TABLE MySchema” with “DROP TABLE MySchema”.

  6. Replace also “@MyDb” with “ CASCADE CONSTRAINTS;”.

  7. Run the script. :-)


Geschrieben von Jörg in Softwaretechnik um 07:58 | Kommentare (0) | Trackbacks (0)
Tags für diesen Artikel: database, oracle, sql, tools

Montag, 2. Juli 2007

Dynamic two dimensional array in Java

I need a dynamic two dimensional array in Java. I thought I might not be the only one, so I searched with regular search engines and the code searches. Surprisingly I did not find any free implementation. I thought this would be a such common case, that the JRE or at least the Jakarta Commons Collections might contain it. No, they do not.

It seems the rest of the world builds their own implementation or uses the javax.swing.table.TableModel and javax.swing.table.DefaultTableModel. The public API of the latter gets near to what I want, but it’s not exactly what I was looking for.

I thought about something like this:

interface TwoDimensionalArray<T>
{
T set(int x, int y, T value);
boolean add(int x, int y, T value);
T get(int x, int y);
Iterator<Iterable<T>> iterator();
boolean isEmpty();
/** returning the overall element count */
int size();
}
Geschrieben von Jörg in Softwaretechnik um 08:02 | Kommentare (0) | Trackbacks (0)
Tags für diesen Artikel: java, open source
(Seite 1 von 1, insgesamt 2 Einträge)

Suche

Inhalt

Startseite
Galerien
Impressum

Kategorien

  • XML Alltag
  • XML Internet
  • XML Musik
  • XML Politik
  • XML Softwaretechnik
  • XML Sonstiges
  • XML Visuelles

Alle Kategorien

Archive

Juli 2010
Juni 2010
Mai 2010
Das Neueste ...
Älteres ...

Blog abonnieren

XML RSS 2.0 feed
ATOM/XML ATOM 1.0 feed
XML RSS 2.0 Kommentare

Login

Verwaltung des Blogs

Login

Aktuelle Einträge

Netzwerkkultur verändert die Gesellschaft
Dienstag, 17. November

Absolute and relative date and time
Sonntag, 18. Oktober

Oren Lavie - Her Morning Elegance
Dienstag, 6. Oktober

Twitter & Blogroll
Samstag, 8. August

Read It Later: Round-Trip-Integration mit Firefox und Google-Reader
Montag, 3. August

Blogroll

* Jörg bei Twitter
* Jens bei Twitter
* Nils bei Twitter

* Beetlebum
* a life less ordinary?
* Martin Fowler's Bliki
* Springify
* BILDblog
* Plazeboalarm
* LawBlog
* ADOM Blog
* Being busy
* Dr. Gero Presser

Links

* Heise
* The Scala Programming Language
Nils' Fotos bei fotocommunity.de
Jogi auf Qype
Get Firefox!
Use OpenOffice.org

Heise News

* Alcatel-Lucent bleibt in den roten Zahlen

* IBM kauft Kompressionsspezialisten

* Speicherhersteller erwarten Preissteigerung

* Britischer Datenschützer findet in Googles WLAN-Datensammlung keine persönliche Daten

* Österreich wegen verpasster Einführung der Vorratsdatenspeicherung verurteilt

kostenloser Counter