![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi All, There are 20 Databases on my server. Each one has same structure, but for dfferent companies. I have a DTS which transfers data from Source server [erp] to another server and then the same data to text files. Presently it's on development and will be shifted to live server. It's obvious that, I have to create different DTS for connecting to those databases , Now, My DTS is same for all of them, excluding the Source and destination databases and text file names. I am storing them in INI file and using it. There is a SQL task which has a query like "Select field1....., field10 from [servername].[dbname].dbo.tablename where .." here [servername] is not the local server name. Except for "[dbname]", everything is common in all dts. I want this to come from INI and yes also the Server name. Is it possible? how? note: presently i am using storeprocedure for this task, and for each dts there is a SP. thanks and regards, |
#3
| |||
| |||
|
#4
| |||
| |||
|
|
Look at Dynamic Properties task. You can change the properties of just about everything in a DTS based on code, variables, constants, whatever. Use a global variables. Now create a 2nd DTS that will execute the first DTS X amount of times. X being the number of variants you need. If you examine the properties of the execute package task, you can see that you can pass variables into and out of the package. Then just make sure you have the ODBC's setup in the main DTS and you should be good to go that could save you some time if the only difference is the source/destination server/database. If structure varies, then you really just need to code it. I'm not proficient enough to know for sure, but I think you can do it in a stored procedure by passing variables, but that should require linked servers on the server that will be executing the code. |
![]() |
| Thread Tools | |
| Display Modes | |
| |