dbTalk Databases Forums  

SSIS: Transfer SQL Server Objects Task Manager

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss SSIS: Transfer SQL Server Objects Task Manager in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
sck10
 
Posts: n/a

Default SSIS: Transfer SQL Server Objects Task Manager - 05-24-2006 , 04:57 PM






Hello,

I am using Transfer SQL Server Objects Task Manager to transfer tables. I
am somewhat unsure as how to proceed. I want to replace tables that are in
one database with tables from another database. If the table exist, the
Transfer SQL Server Objects Task Manager works fine when I set
DropObjectsFirst = True. If the table does not exist in the destination
table, then the transfer errors out. When I did this with ss2k, this method
worked fine. Any suggestions would be appreciated.
--
Thanks in advance,

sck10

Setting that I am using
----------------------
Transfer SQL Server Objects Task Manager
DropObjectsFirst: True
CopyData: True
ExistingData: Replace
CopySchema: True

Copying Indexes Primary and Foreign keys: True



Reply With Quote
  #2  
Old   
AT
 
Posts: n/a

Default RE: SSIS: Transfer SQL Server Objects Task Manager - 05-24-2006 , 11:34 PM






Hi sck10,

Thank you for your post.

There will be 2 method to work around this issue.

Method 1:

1. Set the DropObjectsFirst = false and execute the package first.

2. Then set the DropObjectsFirst = true and execute the package.

Method 2:

1. Add a Execute SQL Task and type the following statement:

USE <your destination database>
GO

IF EXISTS( select * from sys.objects where [name] = <your table name>)
begin
DROP TABLE <your table name>
end

2. Then you could create a new connector from the Execute SQL Task to
Transfer Objects Task and set the DropObjectsFirst = false.

Please try the above steps and let me know the result.

Sincerely,

Wei Lu
Microsoft Online Community Support

==================================================

When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.

==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.