![]() | |
![]() |
| | Thread Tools | Display Modes |
#21
| |||
| |||
|
|
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. |
#22
| |||
| |||
|
|
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. |
#23
| |||
| |||
|
|
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. |
#24
| |||
| |||
|
|
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. |
#25
| |||
| |||
|
|
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. |
![]() |
| Thread Tools | |
| Display Modes | |
| |