dbTalk Databases Forums  

DTS Package - truncate, drop index and migrate data in same DTSpackage

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


Discuss DTS Package - truncate, drop index and migrate data in same DTSpackage in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #21  
Old   
matteus
 
Posts: n/a

Default Re: DTS Package - truncate, drop index and migrate data in same DTSpackage - 06-10-2008 , 05:16 AM






On Jun 10, 11:48 am, research_stuff <learnstu... (AT) ix (DOT) netcom.com> wrote:
Quote:
On Jun 10, 3:02 am, matteus <matteog... (AT) gmail (DOT) com> wrote:



On Jun 10, 5:22 am, research_stuff <learnstu... (AT) ix (DOT) netcom.com> wrote:

Hi,

I created a DTS package that migrates the data from a table on one
server to another. (The DTS package contains a Connection1, the source
server, the transformation and Connection 2, the destination server)

Connection 1
|
|
|
Connection 2

Prior to executing the above DTS package, I maunally truncate the
table and drop the index on the table located at Connection 2.

I would like to drop the index and truncate table prior to migrating
the data. But I would like to do it in the same DTS package.

Thanks in Advance

Hi, you must use the Execute SQL Task.
If you want to use only one task, then you must separate each
statement with GO. It should be something like this:
DROP INDEX...
GO
TRUNCATE TABLE...
GO

Alternatively you can use 1 Execute SQL task for each statement and
link one task to each other with a OnSuccess constraint (Workflow
menu).

Sorry for bad english, hope it helps anyway.
Bye,
Matteo- Hide quoted text -

- Show quoted text -

When I do that, the command affects the source table not the
destination table.
You have to select the correct connection in the Execute SQL task.
Double click on it, from the Existing connection popup menu choose the
connection 2 related to your destination server.
then select your yet-built ExecuteSQLTask, while pressing control
select your connection 1 (source server), release control and right
click on connection 1: from the popupmenu choose workflow>OnSuccess.

This should work


Reply With Quote
  #22  
Old   
matteus
 
Posts: n/a

Default Re: DTS Package - truncate, drop index and migrate data in same DTSpackage - 06-10-2008 , 05:16 AM






On Jun 10, 11:48 am, research_stuff <learnstu... (AT) ix (DOT) netcom.com> wrote:
Quote:
On Jun 10, 3:02 am, matteus <matteog... (AT) gmail (DOT) com> wrote:



On Jun 10, 5:22 am, research_stuff <learnstu... (AT) ix (DOT) netcom.com> wrote:

Hi,

I created a DTS package that migrates the data from a table on one
server to another. (The DTS package contains a Connection1, the source
server, the transformation and Connection 2, the destination server)

Connection 1
|
|
|
Connection 2

Prior to executing the above DTS package, I maunally truncate the
table and drop the index on the table located at Connection 2.

I would like to drop the index and truncate table prior to migrating
the data. But I would like to do it in the same DTS package.

Thanks in Advance

Hi, you must use the Execute SQL Task.
If you want to use only one task, then you must separate each
statement with GO. It should be something like this:
DROP INDEX...
GO
TRUNCATE TABLE...
GO

Alternatively you can use 1 Execute SQL task for each statement and
link one task to each other with a OnSuccess constraint (Workflow
menu).

Sorry for bad english, hope it helps anyway.
Bye,
Matteo- Hide quoted text -

- Show quoted text -

When I do that, the command affects the source table not the
destination table.
You have to select the correct connection in the Execute SQL task.
Double click on it, from the Existing connection popup menu choose the
connection 2 related to your destination server.
then select your yet-built ExecuteSQLTask, while pressing control
select your connection 1 (source server), release control and right
click on connection 1: from the popupmenu choose workflow>OnSuccess.

This should work


Reply With Quote
  #23  
Old   
matteus
 
Posts: n/a

Default Re: DTS Package - truncate, drop index and migrate data in same DTSpackage - 06-10-2008 , 05:16 AM



On Jun 10, 11:48 am, research_stuff <learnstu... (AT) ix (DOT) netcom.com> wrote:
Quote:
On Jun 10, 3:02 am, matteus <matteog... (AT) gmail (DOT) com> wrote:



On Jun 10, 5:22 am, research_stuff <learnstu... (AT) ix (DOT) netcom.com> wrote:

Hi,

I created a DTS package that migrates the data from a table on one
server to another. (The DTS package contains a Connection1, the source
server, the transformation and Connection 2, the destination server)

Connection 1
|
|
|
Connection 2

Prior to executing the above DTS package, I maunally truncate the
table and drop the index on the table located at Connection 2.

I would like to drop the index and truncate table prior to migrating
the data. But I would like to do it in the same DTS package.

Thanks in Advance

Hi, you must use the Execute SQL Task.
If you want to use only one task, then you must separate each
statement with GO. It should be something like this:
DROP INDEX...
GO
TRUNCATE TABLE...
GO

Alternatively you can use 1 Execute SQL task for each statement and
link one task to each other with a OnSuccess constraint (Workflow
menu).

Sorry for bad english, hope it helps anyway.
Bye,
Matteo- Hide quoted text -

- Show quoted text -

When I do that, the command affects the source table not the
destination table.
You have to select the correct connection in the Execute SQL task.
Double click on it, from the Existing connection popup menu choose the
connection 2 related to your destination server.
then select your yet-built ExecuteSQLTask, while pressing control
select your connection 1 (source server), release control and right
click on connection 1: from the popupmenu choose workflow>OnSuccess.

This should work


Reply With Quote
  #24  
Old   
matteus
 
Posts: n/a

Default Re: DTS Package - truncate, drop index and migrate data in same DTSpackage - 06-10-2008 , 05:16 AM



On Jun 10, 11:48 am, research_stuff <learnstu... (AT) ix (DOT) netcom.com> wrote:
Quote:
On Jun 10, 3:02 am, matteus <matteog... (AT) gmail (DOT) com> wrote:



On Jun 10, 5:22 am, research_stuff <learnstu... (AT) ix (DOT) netcom.com> wrote:

Hi,

I created a DTS package that migrates the data from a table on one
server to another. (The DTS package contains a Connection1, the source
server, the transformation and Connection 2, the destination server)

Connection 1
|
|
|
Connection 2

Prior to executing the above DTS package, I maunally truncate the
table and drop the index on the table located at Connection 2.

I would like to drop the index and truncate table prior to migrating
the data. But I would like to do it in the same DTS package.

Thanks in Advance

Hi, you must use the Execute SQL Task.
If you want to use only one task, then you must separate each
statement with GO. It should be something like this:
DROP INDEX...
GO
TRUNCATE TABLE...
GO

Alternatively you can use 1 Execute SQL task for each statement and
link one task to each other with a OnSuccess constraint (Workflow
menu).

Sorry for bad english, hope it helps anyway.
Bye,
Matteo- Hide quoted text -

- Show quoted text -

When I do that, the command affects the source table not the
destination table.
You have to select the correct connection in the Execute SQL task.
Double click on it, from the Existing connection popup menu choose the
connection 2 related to your destination server.
then select your yet-built ExecuteSQLTask, while pressing control
select your connection 1 (source server), release control and right
click on connection 1: from the popupmenu choose workflow>OnSuccess.

This should work


Reply With Quote
  #25  
Old   
matteus
 
Posts: n/a

Default Re: DTS Package - truncate, drop index and migrate data in same DTSpackage - 06-10-2008 , 05:16 AM



On Jun 10, 11:48 am, research_stuff <learnstu... (AT) ix (DOT) netcom.com> wrote:
Quote:
On Jun 10, 3:02 am, matteus <matteog... (AT) gmail (DOT) com> wrote:



On Jun 10, 5:22 am, research_stuff <learnstu... (AT) ix (DOT) netcom.com> wrote:

Hi,

I created a DTS package that migrates the data from a table on one
server to another. (The DTS package contains a Connection1, the source
server, the transformation and Connection 2, the destination server)

Connection 1
|
|
|
Connection 2

Prior to executing the above DTS package, I maunally truncate the
table and drop the index on the table located at Connection 2.

I would like to drop the index and truncate table prior to migrating
the data. But I would like to do it in the same DTS package.

Thanks in Advance

Hi, you must use the Execute SQL Task.
If you want to use only one task, then you must separate each
statement with GO. It should be something like this:
DROP INDEX...
GO
TRUNCATE TABLE...
GO

Alternatively you can use 1 Execute SQL task for each statement and
link one task to each other with a OnSuccess constraint (Workflow
menu).

Sorry for bad english, hope it helps anyway.
Bye,
Matteo- Hide quoted text -

- Show quoted text -

When I do that, the command affects the source table not the
destination table.
You have to select the correct connection in the Execute SQL task.
Double click on it, from the Existing connection popup menu choose the
connection 2 related to your destination server.
then select your yet-built ExecuteSQLTask, while pressing control
select your connection 1 (source server), release control and right
click on connection 1: from the popupmenu choose workflow>OnSuccess.

This should work


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.