sql-serverssisdata-profiling

Find Multi-Column Primary key


I have about 30 tables from an old ERP which have multi-column primary keys. Unfortunately I don't know what those keys are. I've used the SSIS profiling task to determine primary key candidates for up to 5 columns, but it runs so slow as to be impractical. Is there any tool that would do this faster? My alternative is about 2 weeks of investigation using Excel and lots of select distinct queries.


Solution

  • As it turns out I was able to get primary keys for many tables by reverse-engineering with ER/Studio using an ODBC driver.

    I have no idea how they manage to get the primary keys (the reports produced by the database don't show them), but for most table it seems like they're there.