dbTalk Databases Forums  

DTS - global variable problem

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


Discuss DTS - global variable problem in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Donald Pickering
 
Posts: n/a

Default DTS - global variable problem - 09-01-2003 , 04:51 PM






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?




Reply With Quote
  #2  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: DTS - global variable problem - 09-03-2003 , 01:27 AM






Assign an initial value to the GV in the package.
Also why do you have a : after the /A?


--

----------------------------
Allan Mitchell (Microsoft SQL Server MVP)
MCSE,MCDBA
www.SQLDTS.com
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org



"Donald Pickering" <donpick1 (AT) hotmail (DOT) com> wrote

Quote:
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?






Reply With Quote
  #3  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: DTS - global variable problem - 09-03-2003 , 01:27 AM



Assign an initial value to the GV in the package.
Also why do you have a : after the /A?

Also see this article

Looping, Importing and Archiving
(http://www.sqldts.com/default.aspx?246)

--

----------------------------
Allan Mitchell (Microsoft SQL Server MVP)
MCSE,MCDBA
www.SQLDTS.com
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org



"Donald Pickering" <donpick1 (AT) hotmail (DOT) com> wrote

Quote:
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?







Reply With Quote
  #4  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: DTS - global variable problem - 09-03-2003 , 01:28 AM



Assign an initial value to the GV in the package.
Also why do you have a : after the /A?

Also see this article

Looping, Importing and Archiving
(http://www.sqldts.com/default.aspx?246)

--

----------------------------
Allan Mitchell (Microsoft SQL Server MVP)
MCSE,MCDBA
www.SQLDTS.com
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org



"Donald Pickering" <donpick1 (AT) hotmail (DOT) com> wrote

Quote:
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?








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.