Solved

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

Posted on 2008-10-06
2
738 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 15

Expert Comment

by:rob_farley
ID: 22655705
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
ID: 22656199
>>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

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction In my previous article (http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/SSIS/A_9150-Loading-XML-Using-SSIS.html) I showed you how the XML Source component can be used to load XML files into a SQL Server database, us…
Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

831 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