Solved

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

Posted on 2008-10-06
2
742 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_
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed

734 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