Solved

How to copy / replace tables in MS SQL Server Management Studio 2005?

Posted on 2008-10-06
2
734 Views
Last Modified: 2012-05-05
I develop against a test database and then move my changes to a live database - as probably do 95% of the rest of you out there!  Back in the good ole days in previous versions of Enterprise manager, this was as simple as running the Export Data wizard, selecting your tables, telling it to copy indexes and PKs, and to replace the existing table.

But no - MS seems to have messed all this up in SQL MS 2005... or at least I can't figure out how to do it.  When I run the export wizard it will not create any indexes or PKs on new tables, and if the old table does not match the structure of the current table, it just decides to ignore the new columns.  Now if my "drop destination table first" option was not greyed out - that might work but I have never actually see it available.

How in the heck do we accomplish this simple, routine function with SQL 2005 without creating scripts, and then going back and exporting the data to the new tables. I have done this but this is a real PITA where for years it was a 2 minute point and click exercise.

Am I missing something or did Microsoft really mess this up?


0
Comment
Question by:Obeg_
2 Comments
 
LVL 14

Expert Comment

by:rob_farley
Comment Utility
The best thing to do is use Visual Studio for Database Professionals (aka, "Data Dude"). There is lots of functionality around this type of thing in there.

It's not so much that they messed up, but rather, discovered that they weren't doing it particularly well in the first place.

Rob
0
 
LVL 75

Accepted Solution

by:
Anthony Perkins earned 125 total points
Comment Utility
>>How in the heck do we accomplish this simple, routine function with SQL 2005 without creating scripts,<<
You will find most professional shops use something like Red-Gate's SQL Compare to achieve this.  It is a snap with this tool.
0

Featured Post

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Join & Write a Comment

Let's review the features of new SQL Server 2012 (Denali CTP3). It listed as below: PERCENT_RANK(): PERCENT_RANK() function will returns the percentage value of rank of the values among its group. PERCENT_RANK() function value always in be…
The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
Via a live example, show how to setup several different housekeeping processes for a SQL Server.

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now