Solved

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

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

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

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

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…
Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Via a live example, show how to shrink a transaction log file down to a reasonable size.

929 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