September 15, 2016 at 5:46 am
Bascially we have a db which is on muliple instances, used by differant companies.
Somewhere along the way, indexes have gotten differant names, PK have differant names etc.
We want to as a starting poistion standardise them across the dbs.
Can we simply script a create of all objects on one db.
Drop them all and create on the other db, from the first one?
Is there a better solution and obvious problems to this?
So for FKs
http://blog.sqlauthority.com/2008/04/18/sql-server-generate-foreign-key-scripts-for-database/
Thanks
September 15, 2016 at 6:22 am
exec sp_rename ???
Dropping all the indexes and recreating them will take ages, and do massive IOs and bloat the transaction log.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
September 15, 2016 at 6:52 am
Sorry I should add that we want to do some changes to the indexes, which requires dropping the Fks anyway.
The db is small, biggest tables 1million or2 records, not more than 10 tables with more than say 10,000 records.
So I guess time doent matter here. Would be done out of hours, the transcation log, I guess I just back it up after?
Thanks
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply