Hi, all here,
Hope the title is clear for your help.
I am having a problem with loading DTS packages from a SQL Server 2000 instance within a loop I established. What I am trying to do here is to load all packegs from that SQL Server 2000 instance and save them all to other instance. The problem now is : as there is the same task name for different DTS packages thus e.g. after loading the first DTS package, I save it to another instance, and then loop it through the source server instance and trying to load the next DTS package from that server instance, but because the second DTS package it is loading got the same names for some tasks as the first DTS package got, therefore during the execution it throws the error message telling that: step 'step_name' already exists in the collection. It seems like the computer is loading all the DTS packages into a memory until the connection with the server instance is closed and it does not allow duplicate names for whatever objects it saved into the memory within the collection? But in my case it is not allowed to change the tasks names within each DTS package, thus it seems like in order to loop through the source instance to load all DTS packages, the only thing we can try is to clear the collection after each iteration within the loop?
The statement I am using to load the DTS package is : Opkg.LoadFromSQLServer("servername", "user_name", "password", DTS.DTSSQLServerStorageFlags.DTSSQLStgFlag_Default, "", "", "", Package_name)Can any experts here give me any ideas of how to clear that so-called collection within the memory to enable the loading of the next package from the source server instance if there is any way of achieving it?
Thanks a lot in advance and I am looking forward to hearing from you for your kind help and advices.
With best regards,
Yours sincerely,
Hope the title is clear for your help.
I am having a problem with loading DTS packages from a SQL Server 2000 instance within a loop I established. What I am trying to do here is to load all packegs from that SQL Server 2000 instance and save them all to other instance. The problem now is : as there is the same task name for different DTS packages thus e.g. after loading the first DTS package, I save it to another instance, and then loop it through the source server instance and trying to load the next DTS package from that server instance, but because the second DTS package it is loading got the same names for some tasks as the first DTS package got, therefore during the execution it throws the error message telling that: step 'step_name' already exists in the collection. It seems like the computer is loading all the DTS packages into a memory until the connection with the server instance is closed and it does not allow duplicate names for whatever objects it saved into the memory within the collection? But in my case it is not allowed to change the tasks names within each DTS package, thus it seems like in order to loop through the source instance to load all DTS packages, the only thing we can try is to clear the collection after each iteration within the loop?
The statement I am using to load the DTS package is : Opkg.LoadFromSQLServer("servername", "user_name", "password", DTS.DTSSQLServerStorageFlags.DTSSQLStgFlag_Default, "", "", "", Package_name)Can any experts here give me any ideas of how to clear that so-called collection within the memory to enable the loading of the next package from the source server instance if there is any way of achieving it?
Thanks a lot in advance and I am looking forward to hearing from you for your kind help and advices.
With best regards,
Yours sincerely,