Copying indexes from Oracle to SQL Server
I'm working with a client that has access to an Oracle 10g database containing transactional data that they copy to their new SQL Server 2012 as a data warehouse. (We recently migrated the straight from SQL 2000 into SQL 2012, but that's another story.) They already had scripts to copy the tables and data to a staging database, and then copy new records to their data warehouse. Queries were slow against this data, as no indexes were created on the target tables. I wanted to copy the Oracle indexes to SQL Server, but found no simple way to do this, so I created a script to do so. I used Toad for Data Analysts to connect to the Oracle database, which is a really fantastic program for working with Oracle.…