![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Running SQL 2000 on Windows 2000 server. I have created a bulk insert set of instructions in DTS to bulk insert the contents of an ascii file into a SQL table. There are 970 ascii files to be loaded all with different names. I'd like to be able to run a DTSRUN command to load all these ascii files. I created a source connection to the ascii file and a destination to the SQL table. When I run this package WITHOUT the global variable, it runs very well. In the dynamic task, I selected Connection > AsciidataSource > OLE db properties > Data Source and I see the default assignment for the datasource. Well, I want to assign this dynamically. So, under property name, I double click and, for variable name, I inserted gvAsciiFile Then I guess I am supposed to click on Create Global Variables (This gets confusing and I cannot find any documentation on this) In the name column I enter gvAsciiFile (my global variable name) and, for type, I make sure it's set to STRING. I click OK and click OK and click OK a third time. My objective is to dynamically change the source file name. So, I click on the dynamic task (called set datasource variable) and click on the AsciiFileLoad object which is the name of the task which is the datasource to the bulk insert routine. I set up my DTSRUN command: dtsrun /S PII350 /E /A:gvAsciiFile:8=\\pii350\K-drive\Data\Investing\Ascii_files_from_Quotes_Plu s\AA.csv /N IN_Load_tblRawDataTempHold So, the global variable name is gvAsciiFile, it is a text variable (see the 8). The value of this variable is: \\pii350\K-drive\Data\Investing\Ascii_files_from_Quotes_Plus\ AA.csv When the DTSRUN is executed the message : Cannot load, save or execute the package if some objects do not have a name. Well, how can I tell if the global variable is not getting assigned correctly or if there is something else wrong? |
#3
| |||
| |||
|
|
Running SQL 2000 on Windows 2000 server. I have created a bulk insert set of instructions in DTS to bulk insert the contents of an ascii file into a SQL table. There are 970 ascii files to be loaded all with different names. I'd like to be able to run a DTSRUN command to load all these ascii files. I created a source connection to the ascii file and a destination to the SQL table. When I run this package WITHOUT the global variable, it runs very well. In the dynamic task, I selected Connection > AsciidataSource > OLE db properties > Data Source and I see the default assignment for the datasource. Well, I want to assign this dynamically. So, under property name, I double click and, for variable name, I inserted gvAsciiFile Then I guess I am supposed to click on Create Global Variables (This gets confusing and I cannot find any documentation on this) In the name column I enter gvAsciiFile (my global variable name) and, for type, I make sure it's set to STRING. I click OK and click OK and click OK a third time. My objective is to dynamically change the source file name. So, I click on the dynamic task (called set datasource variable) and click on the AsciiFileLoad object which is the name of the task which is the datasource to the bulk insert routine. I set up my DTSRUN command: dtsrun /S PII350 /E /A:gvAsciiFile:8=\\pii350\K-drive\Data\Investing\Ascii_files_from_Quotes_Plu s\AA.csv /N IN_Load_tblRawDataTempHold So, the global variable name is gvAsciiFile, it is a text variable (see the 8). The value of this variable is: \\pii350\K-drive\Data\Investing\Ascii_files_from_Quotes_Plus\ AA.csv When the DTSRUN is executed the message : Cannot load, save or execute the package if some objects do not have a name. Well, how can I tell if the global variable is not getting assigned correctly or if there is something else wrong? |
#4
| |||
| |||
|
|
Running SQL 2000 on Windows 2000 server. I have created a bulk insert set of instructions in DTS to bulk insert the contents of an ascii file into a SQL table. There are 970 ascii files to be loaded all with different names. I'd like to be able to run a DTSRUN command to load all these ascii files. I created a source connection to the ascii file and a destination to the SQL table. When I run this package WITHOUT the global variable, it runs very well. In the dynamic task, I selected Connection > AsciidataSource > OLE db properties > Data Source and I see the default assignment for the datasource. Well, I want to assign this dynamically. So, under property name, I double click and, for variable name, I inserted gvAsciiFile Then I guess I am supposed to click on Create Global Variables (This gets confusing and I cannot find any documentation on this) In the name column I enter gvAsciiFile (my global variable name) and, for type, I make sure it's set to STRING. I click OK and click OK and click OK a third time. My objective is to dynamically change the source file name. So, I click on the dynamic task (called set datasource variable) and click on the AsciiFileLoad object which is the name of the task which is the datasource to the bulk insert routine. I set up my DTSRUN command: dtsrun /S PII350 /E /A:gvAsciiFile:8=\\pii350\K-drive\Data\Investing\Ascii_files_from_Quotes_Plu s\AA.csv /N IN_Load_tblRawDataTempHold So, the global variable name is gvAsciiFile, it is a text variable (see the 8). The value of this variable is: \\pii350\K-drive\Data\Investing\Ascii_files_from_Quotes_Plus\ AA.csv When the DTSRUN is executed the message : Cannot load, save or execute the package if some objects do not have a name. Well, how can I tell if the global variable is not getting assigned correctly or if there is something else wrong? |
![]() |
| Thread Tools | |
| Display Modes | |
| |