Scripting CREATE statements for Indexes

  • I am in the process of building a migration plan to move from 2000 to 2005. I have one database that, due to issues with the vendor, must be scripted out. I cannot simply restore a backup since it won't work.

    I have everything scripted out except for Indexes and Primary/Foreign keys. I found two scripts on this site, one that scripts out the CREATE statements from the 2000 databases and one from the 2005 databases. The problem is the CREATE statements from 2000 databases does not work in 2005 since the system table names are different.

    Does anyone know of a method to script out just the Indexes and Primary/Foreign keys? I want to create these AFTER I load the data so the load process will work quickly.

  • I know ApexSQL Diff can be used for that. RedGate SQL Compare can probably do it too.

    Might be a way to do it that doesn't require buying software. Not sure.

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • Have you tried using the scripting function in Enterprise Manager?

    Greg

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply