Groups | Blog | Home
all groups > sql server dts > april 2007 >

sql server dts : Drop and re-create destination table (?????)


Dan
4/27/2007 1:40:02 PM
I am trying to do something that took no time in SQL 2000, which appears to
be way more complex in 2005.

I have added a column to a table(attribute) and trying to push this table
out to another server using DTS. Well, when I select the table in the table
list, and go to "Edit Mappings", the new column cannot be created on the
Destination side, and the "Drop and re-create destination table" is disabled.

Now, I don't know why the option is disabled and it doesn't make any sense
why it's there since I don't think that have ever seen it enabled/selectable.
Or DTS to a new table, then script out a drop/rename script.

Any help will be greatly appreciated, as I can't believe that this is
something that was dropped out of DTS.

Is there a setting or something that I can change in DTS to force the table
to be dropped and recreated(like SQL 2000)?

It doesn't make sense to have to script to drop the tables, then use DTS to
recreated them.

Allan Mitchell
4/30/2007 8:12:17 PM
Hello Dan,

The wizard in 2K5 has changed a whole lot from that in 2K. There are a whole
raft of features not there because in SSIS they make no sense or the thought
process around what is being done has changed. I am no expert with the wizard
but I personally would be looking to write a real package to do this in BIDs.

If the source schema has changed and you want that reflected at the destination
then I would be issuing an ALTER TABLE through script and not recreating
the table each time. Schema changes should be a co-ordinated thing.

--

Allan Mitchell
http://wiki.sqlis.com | http://www.sqlis.com | http://www.sqldts.com |
http://www.konesans.com

[quoted text, click to view]

Dan
5/1/2007 8:46:02 AM
Allan,
Thanks for the response, and you told me pretty much what I thought. This
is a case where MS went backwards.

Since I want the columns in a particular order, I am going to have to:
1. Script out the table(temp) with the new column in the position where I
want it
2. Insert the existing data into the table from the source table
3. Update the column values, where applicable
4. Drop original table
5. Rename new(temp) table to the original table name

This is compared to checking one checkbox in the prior version. Something
doesn't seem right here....... Not that I can't script all of this out, but
it's a lot more time consuming than checking a checkbox. :)

Thanks again...
Dan
Basically, I am going to have to create a script to

[quoted text, click to view]
Dan
5/1/2007 9:50:03 AM
Allan,
I agree, to an extent, but it's more a visual than functional, but it makes
it easier, imo, to have "like" attributes grouped instead of spread-out

Also, just something that I was looking at. When the destination table does
NOT exist in the target database, the option for "Drop and re-create
destination table" is actually enabled and can be checked.

My guess, this is a bug and logic is reversed. I mean, how can you drop
something that doesn't exist?? Last I checked, it's not possible. :)



[quoted text, click to view]
Allan Mitchell
5/1/2007 4:27:08 PM
Hello Dan,

The ordering of the columns in the table is pretty irrelevant IMHO. It is
how you SELECT them that should determine their visual representation.


--

Allan Mitchell
http://wiki.sqlis.com | http://www.sqlis.com | http://www.sqldts.com |
http://www.konesans.com

[quoted text, click to view]

AddThis Social Bookmark Button