Simplifying complex problems is difficult but when done, the rewards are definitely worth it. How I single-handedly managed to migrate 55 Billion rows in 4000+ tables: Last year, I created PowerPump a PowerShell based data copy server which continuously migrated 4000+ Oracle tables to SQL Server. It was no simple task given that I had … Continue reading Eating An Elephant – How To Work With Huge Datasets In Oracle And SQL Server
MERGE statement does INSERT/UPDATE/DELETE For the longest time Oracle and SQL Server users have written code like this (pseudo code) This is great but this is such a common construct that everyone has also been long craving for built in support in the database for what people commonly call UPSERT (UPDATE if key exists else INSERT). … Continue reading SQL Server: MERGE (AKA UPSERT) =(INSERT / UPDATE / DELETE) – All In One
In an earlier post, we saw how Oracle’s UNDO works in very basic terms. REDO is another critical aspect that goes hand in hand with UNDO. Let us get the basics of REDO sorted out here. UNDO and REDO In its most basic sense UNDO is information saved to get back in case a ROLLBACK … Continue reading Oracle REDO – A Basic Explanation
Nasty data-related errors: If you are looking to resolve one of these types of errors, you are in the right place. Please keep reading. ORA-01400: cannot insert NULL into (string) ORA-01401: inserted value too large for column ORA-02290: check constraint (string.string) violated ORA-02291: integrity constraint (string.string) violated - parent key not found ORA-02292: integrity constraint … Continue reading Oracle – Find A Needle In The Hay Stack – How To Pinpoint Data Errors Like “ORA-12899: value too large for column”
Why DELETE is bad? In Oracle, when it comes to deleting ** A L L ** the data from a table (clearing the contents of a staging table for example), using a DELETE statement is the most inefficient choice. Here are some reasons why DELETE is bad It uses UNDO It uses REDO It fires … Continue reading Oracle – TRUNCATE vs DELETE – Spoiler: TRUNCATE Wins & Why? Hours vs Seconds!