SQL Server: Identify And Defragment Indexes Using DBCC SHOWCONTIG & DBCC INDEXDEFRAG

A good defrag script is worth its weight in gold. This time, I copied this from Microsoft and am shamelessly posting it here because I don't know when MS will bury it somewhere where it cannot be located anymore! Just because you de-fragmented does not actually mean that it did it! It means, it tried. … Continue reading SQL Server: Identify And Defragment Indexes Using DBCC SHOWCONTIG & DBCC INDEXDEFRAG

Advertisements

PowerShell – Copy SQL Server Tables – Structure, Data & Indexes To Another Database/Instance

Requirement: Recently I got a request from a user that he wanted to copy a specific set of tables and their indexes into a new database to ship to the vendor for analysis. The problem was that the DB had thousands of tables (8,748 to be precise). Hunting and pecking for specific tables from that … Continue reading PowerShell – Copy SQL Server Tables – Structure, Data & Indexes To Another Database/Instance

Oracle – Simplify Your Joins – Using “USING” In JOIN Clause?!

Same SQL written in 3 different ways “There are a thousand ways to skin a cat” or so they say. Let us look at just three ways of writing the same SQL and build the case for using the USING clause. The query below is to get the current Oracle session’s effective “parallel” related parameter … Continue reading Oracle – Simplify Your Joins – Using “USING” In JOIN Clause?!

Oracle’s APPEND Hint – The Key Secret To Fast BULK Loading With NOLOGGING!

Oracle's logical storage structures: To developers who work with Oracle, the concept of tablespace is familiar.  We create tables and indexes in tablespaces taking appropriate care not to place all of our data into one tablespace. Let us take a quick look at the logical structure of an Oracle database A database has one or … Continue reading Oracle’s APPEND Hint – The Key Secret To Fast BULK Loading With NOLOGGING!