Showing posts with label files. Show all posts
Showing posts with label files. Show all posts

Friday, March 23, 2012

Interesting scenario - Multiple files updating one table

Hi,

i have a scenario where I have to read 2 files that update the same table (a temp staging table)...this comes from the source system's limitation on the amount of columns that it can export. What we have done as a workaround is we split the data into 2 files where the 2nd file would contain the first file's primary key so we can know on which record to do an update...

Here is my problem...

The table that needs to be updated contains 9 columns. File one contains 5 of them and file2 contains 4 of them.

File 1 inserts 100 rows and leaves the other 4 columns as nulls and ready for file 2 to do an update into them.
File 2 inserts 10 rows but fails on 90 rows due to incorrect data.
Thus only 10 rows are successfully updated and ready to be processed but 90 are incorrect. I want to still do processing on the existing 10 but cant affort to try and do processing on the broken ones...

The easy solution would be to remove the incorrect rows from the temp table when ever an error occurs on the 2nd file's package by running a sql query on the table using the primary keys that exist in both files but when the error occurs on the Flat File source, I can't get the primary key.

What would be the best suggestion? Should i rather fail the whole package if 1 row bombs out? I cant put any logic in the following package that does the master file update/insert from the temp table because of the nature of the date. I

Regards
Mike

You have more than one way to accomplish that, I think.

You could add an extra column to the staging table that will act as a flag to indicate whether a row was properly updated by the 2 file or not; then further steps should filter the rows based on the value of that column.

Or...

Why you don't create 2 staging tables; one for each file. Then you can use SQL statements to join them, perform some data quality checks and decide which rows are going to be processed and which ones would be rejected.

|||You could also use a Merge Join transform with an inner join prior to loading the table - you would take the good record pipelines from the two flat file sources into the Merge Join and set up an inner join on the key from each file. The pipeline output from the Merge Join would then have only the ten records that had a key match and all 9 columns, which you can then load to the SQL table desitination.|||Thanks, I used the flag method and its doing fine.

Much Appreciated Rafael
Mike

Interesting scenario - Multiple files updating one table

Hi,

i have a scenario where I have to read 2 files that update the same table (a temp staging table)...this comes from the source system's limitation on the amount of columns that it can export. What we have done as a workaround is we split the data into 2 files where the 2nd file would contain the first file's primary key so we can know on which record to do an update...

Here is my problem...

The table that needs to be updated contains 9 columns. File one contains 5 of them and file2 contains 4 of them.

File 1 inserts 100 rows and leaves the other 4 columns as nulls and ready for file 2 to do an update into them.
File 2 inserts 10 rows but fails on 90 rows due to incorrect data.
Thus only 10 rows are successfully updated and ready to be processed but 90 are incorrect. I want to still do processing on the existing 10 but cant affort to try and do processing on the broken ones...

The easy solution would be to remove the incorrect rows from the temp table when ever an error occurs on the 2nd file's package by running a sql query on the table using the primary keys that exist in both files but when the error occurs on the Flat File source, I can't get the primary key.

What would be the best suggestion? Should i rather fail the whole package if 1 row bombs out? I cant put any logic in the following package that does the master file update/insert from the temp table because of the nature of the date. I

Regards
Mike

You have more than one way to accomplish that, I think.

You could add an extra column to the staging table that will act as a flag to indicate whether a row was properly updated by the 2 file or not; then further steps should filter the rows based on the value of that column.

Or...

Why you don't create 2 staging tables; one for each file. Then you can use SQL statements to join them, perform some data quality checks and decide which rows are going to be processed and which ones would be rejected.

|||You could also use a Merge Join transform with an inner join prior to loading the table - you would take the good record pipelines from the two flat file sources into the Merge Join and set up an inner join on the key from each file. The pipeline output from the Merge Join would then have only the ten records that had a key match and all 9 columns, which you can then load to the SQL table desitination.|||Thanks, I used the flag method and its doing fine.

Much Appreciated Rafael
Mike

Wednesday, March 21, 2012

Interesting problem with table/filesystem growth

Any body have any ideas on this one?
Have an Sqlserver 2000 instance with SP3a on it and had a
problem where we had multiple data files within the
primary filegroup. An end user was adding rows into the
table and received an out of space error on the data
component. Checking the properties on the files the auto
extend option had been turned off , which was fine in our
environment, however, checking the space used in each of
these files showed that there was plenty of space
available for use in all. (No, it wasnt the trans log that
gave grief), I allowed the autoextend on each file and got
over the problem for the table in the short term , (and
saw one of the files extend.)
This lead me to do some thinking about the way Sqlserver
handles the growth of tables on multiple files. The good
book says that Sqlserver will allocate in a round robin
fashion the data pages to a table, however this doesnt
seem to be the case. Also, How does the table what file it
is on. I found this in the sysindexes table and decoding
the first value (Contains fileid and page id and row
offset).
Thats fine, however the major problem is, if Sqlserver
doesnt do the round robin allocation of datapages like it
should, then are all your free space calcs on the file
allocation valid?
Any thoughts' Any stored procedures about to handle this'
cheers
MikeWe've had an experience in the past, where the disks seemed to get overused
and reported an error similar to (unable to allocate space). Unfortunately,
I cannot
remember the specifics. We've had a problem where the auto-extend conflicts
with
an insert.
With regard to the round robin filling, sql server will fill the files using
a proporitional
algorithm. Therefore if you fill one file then add another, the 2nd file
will get filled. If
you create 2 files at the same time, then you will observe that each file is
filled with the
same amount of data each time. In short a 20GB insert will put 10GB in each
file.
HTH
"Mike" <anonymous@.discussions.microsoft.com> wrote in message
news:1a9101c3e08e$548d4c70$a101280a@.phx.gbl...
> Any body have any ideas on this one?
> Have an Sqlserver 2000 instance with SP3a on it and had a
> problem where we had multiple data files within the
> primary filegroup. An end user was adding rows into the
> table and received an out of space error on the data
> component. Checking the properties on the files the auto
> extend option had been turned off , which was fine in our
> environment, however, checking the space used in each of
> these files showed that there was plenty of space
> available for use in all. (No, it wasnt the trans log that
> gave grief), I allowed the autoextend on each file and got
> over the problem for the table in the short term , (and
> saw one of the files extend.)
> This lead me to do some thinking about the way Sqlserver
> handles the growth of tables on multiple files. The good
> book says that Sqlserver will allocate in a round robin
> fashion the data pages to a table, however this doesnt
> seem to be the case. Also, How does the table what file it
> is on. I found this in the sysindexes table and decoding
> the first value (Contains fileid and page id and row
> offset).
> Thats fine, however the major problem is, if Sqlserver
> doesnt do the round robin allocation of datapages like it
> should, then are all your free space calcs on the file
> allocation valid?
> Any thoughts' Any stored procedures about to handle this'
> cheers
> Mike|||Interesting,
still leads to the problem where you think you should have
space available because you tally the total of all file
systems and unfortunately one is full!!! Kind of makes one
stop and think about what level should your space
statistcs be collected at and how you manage them!
>--Original Message--
>We've had an experience in the past, where the disks
seemed to get overused
>and reported an error similar to (unable to allocate
space). Unfortunately,
>I cannot
>remember the specifics. We've had a problem where the
auto-extend conflicts
>with
>an insert.
>
>With regard to the round robin filling, sql server will
fill the files using
>a proporitional
>algorithm. Therefore if you fill one file then add
another, the 2nd file
>will get filled. If
>you create 2 files at the same time, then you will
observe that each file is
>filled with the
>same amount of data each time. In short a 20GB insert
will put 10GB in each
>file.
>HTH
>"Mike" <anonymous@.discussions.microsoft.com> wrote in
message
>news:1a9101c3e08e$548d4c70$a101280a@.phx.gbl...
>> Any body have any ideas on this one?
>> Have an Sqlserver 2000 instance with SP3a on it and had
a
>> problem where we had multiple data files within the
>> primary filegroup. An end user was adding rows into the
>> table and received an out of space error on the data
>> component. Checking the properties on the files the auto
>> extend option had been turned off , which was fine in
our
>> environment, however, checking the space used in each of
>> these files showed that there was plenty of space
>> available for use in all. (No, it wasnt the trans log
that
>> gave grief), I allowed the autoextend on each file and
got
>> over the problem for the table in the short term , (and
>> saw one of the files extend.)
>> This lead me to do some thinking about the way Sqlserver
>> handles the growth of tables on multiple files. The good
>> book says that Sqlserver will allocate in a round robin
>> fashion the data pages to a table, however this doesnt
>> seem to be the case. Also, How does the table what file
it
>> is on. I found this in the sysindexes table and decoding
>> the first value (Contains fileid and page id and row
>> offset).
>> Thats fine, however the major problem is, if Sqlserver
>> doesnt do the round robin allocation of datapages like
it
>> should, then are all your free space calcs on the file
>> allocation valid?
>> Any thoughts' Any stored procedures about to handle
this'
>> cheers
>> Mike
>
>.
>

Interesting problem with table/filesystem growth

Any body have any ideas on this one?
Have an Sqlserver 2000 instance with SP3a on it and had a
problem where we had multiple data files within the
primary filegroup. An end user was adding rows into the
table and received an out of space error on the data
component. Checking the properties on the files the auto
extend option had been turned off , which was fine in our
environment, however, checking the space used in each of
these files showed that there was plenty of space
available for use in all. (No, it wasnt the trans log that
gave grief), I allowed the autoextend on each file and got
over the problem for the table in the short term , (and
saw one of the files extend.)
This lead me to do some thinking about the way Sqlserver
handles the growth of tables on multiple files. The good
book says that Sqlserver will allocate in a round robin
fashion the data pages to a table, however this doesnt
seem to be the case. Also, How does the table what file it
is on. I found this in the sysindexes table and decoding
the first value (Contains fileid and page id and row
offset).
Thats fine, however the major problem is, if Sqlserver
doesnt do the round robin allocation of datapages like it
should, then are all your free space calcs on the file
allocation valid?
Any thoughts' Any stored procedures about to handle this'
cheers
MikeWe've had an experience in the past, where the disks seemed to get overused
and reported an error similar to (unable to allocate space). Unfortunately,
I cannot
remember the specifics. We've had a problem where the auto-extend conflicts
with
an insert.
With regard to the round robin filling, sql server will fill the files using
a proporitional
algorithm. Therefore if you fill one file then add another, the 2nd file
will get filled. If
you create 2 files at the same time, then you will observe that each file is
filled with the
same amount of data each time. In short a 20GB insert will put 10GB in each
file.
HTH
"Mike" <anonymous@.discussions.microsoft.com> wrote in message
news:1a9101c3e08e$548d4c70$a101280a@.phx.gbl...
quote:

> Any body have any ideas on this one?
> Have an Sqlserver 2000 instance with SP3a on it and had a
> problem where we had multiple data files within the
> primary filegroup. An end user was adding rows into the
> table and received an out of space error on the data
> component. Checking the properties on the files the auto
> extend option had been turned off , which was fine in our
> environment, however, checking the space used in each of
> these files showed that there was plenty of space
> available for use in all. (No, it wasnt the trans log that
> gave grief), I allowed the autoextend on each file and got
> over the problem for the table in the short term , (and
> saw one of the files extend.)
> This lead me to do some thinking about the way Sqlserver
> handles the growth of tables on multiple files. The good
> book says that Sqlserver will allocate in a round robin
> fashion the data pages to a table, however this doesnt
> seem to be the case. Also, How does the table what file it
> is on. I found this in the sysindexes table and decoding
> the first value (Contains fileid and page id and row
> offset).
> Thats fine, however the major problem is, if Sqlserver
> doesnt do the round robin allocation of datapages like it
> should, then are all your free space calcs on the file
> allocation valid?
> Any thoughts' Any stored procedures about to handle this'
> cheers
> Mike
|||Interesting,
still leads to the problem where you think you should have
space available because you tally the total of all file
systems and unfortunately one is full!!! Kind of makes one
stop and think about what level should your space
statistcs be collected at and how you manage them!
quote:

>--Original Message--
>We've had an experience in the past, where the disks

seemed to get overused
quote:

>and reported an error similar to (unable to allocate

space). Unfortunately,
quote:

>I cannot
>remember the specifics. We've had a problem where the

auto-extend conflicts
quote:

>with
>an insert.
>
>With regard to the round robin filling, sql server will

fill the files using
quote:

>a proporitional
>algorithm. Therefore if you fill one file then add

another, the 2nd file
quote:

>will get filled. If
>you create 2 files at the same time, then you will

observe that each file is
quote:

>filled with the
>same amount of data each time. In short a 20GB insert

will put 10GB in each
quote:

>file.
>HTH
>"Mike" <anonymous@.discussions.microsoft.com> wrote in

message
quote:

>news:1a9101c3e08e$548d4c70$a101280a@.phx.gbl...
a[QUOTE]
our[QUOTE]
that[QUOTE]
got[QUOTE]
it[QUOTE]
it[QUOTE]
this'[QUOTE]
>
>.
>
sql

Friday, February 24, 2012

Integration Services For Each Loop Question

I'm wondering if this can be done (I've had no luck so far):
I would like to loop thru a set of files in a directory, place the file name
into a variable, then insert the file name as a record into a table.
I've gotten the for each (file) loop set up and working fine, placing the
file name into a user variable, but can't figure out how to use the value of
the variable to insert it into a table.
The next step would be to loop thru the records in the table retrieving each
file name into a variable to use in another for each file loop to copy the
file to another location.
The purpose of the entire exercise is to put file names into two tables for
log backups. I'm backing up log files to a local directory, and want to copy
them to a network share. Since I only want to copy newly backed up files, I
would like to go thru all the files on the local drive, write them to a
table, go thru all the previously copied files on the network share, write
the names to another table, join the two tables to find which files do not
exist on the network share and copy them to it.
There may be a better way to do this, but I've not figured it out so far.
Thanks for any assistance with this.
TomTTomT wrote:
> I'm wondering if this can be done (I've had no luck so far):
> I would like to loop thru a set of files in a directory, place the file na
me
> into a variable, then insert the file name as a record into a table.
> I've gotten the for each (file) loop set up and working fine, placing the
> file name into a user variable, but can't figure out how to use the value
of
> the variable to insert it into a table.
> The next step would be to loop thru the records in the table retrieving ea
ch
> file name into a variable to use in another for each file loop to copy the
> file to another location.
> The purpose of the entire exercise is to put file names into two tables fo
r
> log backups. I'm backing up log files to a local directory, and want to co
py
> them to a network share. Since I only want to copy newly backed up files,
I
> would like to go thru all the files on the local drive, write them to a
> table, go thru all the previously copied files on the network share, write
> the names to another table, join the two tables to find which files do not
> exist on the network share and copy them to it.
> There may be a better way to do this, but I've not figured it out so far.
> Thanks for any assistance with this.
> TomT
You're going about this the hard way. If you can run xp_cmdshell, you
can do this with a single insert statement:
CREATE TABLE #Table (
[FileName] VARCHAR(255)
)
DECLARE @.Command VARCHAR(255)
SELECT @.Command = 'master..xp_cmdshell ''DIR /B C:\WINDOWS'''
INSERT INTO #Table
EXEC (@.Command)
SELECT * FROM #Table
DROP TABLE #Table
Tracy McKibben
MCDBA
http://www.realsqlguy.com|||Thanks Tracy, I guess I was hoping to incoporate this into an SSIS package
which would do the backups, history clean up, and file copy. Also, trying to
get up to speed on SSIS capabilities.
"Tracy McKibben" wrote:

> TomT wrote:
> You're going about this the hard way. If you can run xp_cmdshell, you
> can do this with a single insert statement:
> CREATE TABLE #Table (
> [FileName] VARCHAR(255)
> )
> DECLARE @.Command VARCHAR(255)
> SELECT @.Command = 'master..xp_cmdshell ''DIR /B C:\WINDOWS'''
> INSERT INTO #Table
> EXEC (@.Command)
> SELECT * FROM #Table
> DROP TABLE #Table
> --
> Tracy McKibben
> MCDBA
> http://www.realsqlguy.com
>|||TomT wrote:
> Thanks Tracy, I guess I was hoping to incoporate this into an SSIS package
> which would do the backups, history clean up, and file copy. Also, trying
to
> get up to speed on SSIS capabilities.
>
Ahh, ok... Well, this may or may not interest you, I have a script that
will automatically backup any database on your server, including t-logs,
and will handle the history cleanup too...
http://realsqlguy.com/twiki/bin/vie...realsqlguy.com|||Thanks Tracy - that's very helpful, and definately of interest to me.
At the same time, I'm still interested in finding out if there's a way to do
what I'm attempting via SSIS, particularly getting the file loop variable
into a sql insert statement.
I appreciate your feedback and assistance with this issue...
"Tracy McKibben" wrote:

> TomT wrote:
> Ahh, ok... Well, this may or may not interest you, I have a script that
> will automatically backup any database on your server, including t-logs,
> and will handle the history cleanup too...
> http://realsqlguy.com/twiki/bin/vie...realsqlguy.com
>|||Hi,
Thanks for your post!
To make me clear about your issue, I appreciate to know:
1) You could retrieve each filename in a variable now and you didn't know
how to insert it into a table?
If so, you can write SQL like this:
INSERT INTO Table_Name([colname1],...[colnamen])
values(@.FileName1,...,[@.othervalue])
2) Are your purpose as following ?
Retrieve related files on the local drive and insert their names into
one table;
Retrieve related files on the remote network drive and insert their
names into a second table;
Compare the data between the two tables, if the 1st table's files names
are not in the second table, copy them into the network drive.
For such issue, you can't directly use TSQL in workflow control in SSIS.
I recommend you use "Execute SQL task" and map the variable to a
parameter in the task.
Right click task->Edit->Parameter Mapping.
Then you could use the parameter as you mentioned in the SQLstatement in
General tab of "Execute SQL task"
http://msdn2.microsoft.com/en-us/library/ms141003.aspx
Also, you could configure "variable mapping" of foreach loop container
to the variable you uses.
Other tasks like ActiveX Scripts Task can also help you deal with this
case.
http://msdn2.microsoft.com/en-us/library/ms137525.aspx
If you have any other concerns, please feel free to let me know. I'm
happy for your assistance.
+++++++++++++++++++++++++++
Charles Wang
Microsoft Online Partner Support
+++++++++++++++++++++++++++
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
========================================
=============
Business-Critical Phone Support (BCPS) provides you with technical phone
support at no charge during critical LAN outages or "business down"
situations. This benefit is available 24 hours a day, 7 days a week to all
Microsoft technology partners in the United States and Canada.
This and other support options are available here:
BCPS:
https://partner.microsoft.com/US/te...erview/40010469
Others:
https://partner.microsoft.com/US/te...upportoverview/
If you are outside the United States, please visit our International
Support page:
http://support.microsoft.com/defaul...rnational.aspx.
========================================
=============
This posting is provided "AS IS" with no warranties, and confers no rights.|||TomT - it sounds like everyone has an opinion! Here is a way to do
what you want with SSIS. Then see below that for my opinion .
1 - Open your new SSIS project, and add a Foreach Loop container
2 - In the properties, make it a Foreach File Enumerator, and choose
the folder you want. Set the other properties, such as if you want the
fully qualified filename
3 - In the variable mappings area, Add a new user variable named
"FileName"; it should appear as User::FileName. Click OK & you're done
with the loop container
4 - Now go modify the variable properties (View, Other Windows,
Variables). Highlight the variable created in #3 and press F4 to get
the properties window.
5 - Change "EvaluateAsExpression" to True
6 - Change the "Expression" property to be your SQL Statement, but now
you're including your variable (notice the single quotes around your
variable):
"INSERT test SELECT '" + @.[User::FileName] + "'"
7 - Now add an "Execute SQL Task" to your loop container. Choose your
database. Change the SQL SourceType to be Variable.
8 - Choose your variable, which has now been filled with your SQL
statement.
9 - test out by debugging & then select the data from your table
SELECT * FROM test
Your next step - you mentioned it was to copy the files from the
original location to a new location using the table to loop. You can
skip all of the above madness, by just using the file system task, and
copy the entire contents of directory #1 to directory #2.
---
I'm wondering if this can be done (I've had no luck so far):
I would like to loop thru a set of files in a directory, place the file
name
into a variable, then insert the file name as a record into a table.
I've gotten the for each (file) loop set up and working fine, placing
the
file name into a user variable, but can't figure out how to use the
value of
the variable to insert it into a table.
The next step would be to loop thru the records in the table retrieving
each
file name into a variable to use in another for each file loop to copy
the
file to another location.
The purpose of the entire exercise is to put file names into two tables
for
log backups. I'm backing up log files to a local directory, and want to
copy
them to a network share. Since I only want to copy newly backed up
files, I
would like to go thru all the files on the local drive, write them to a
table, go thru all the previously copied files on the network share,
write
the names to another table, join the two tables to find which files do
not
exist on the network share and copy them to it.
There may be a better way to do this, but I've not figured it out so
far.
Thanks for any assistance with this.
TomT|||Thanks Corey - that's the direction I wanted to go with this (getting the
variable mapped properly in the sql statement.
There are a couple of reasons I'm going about things in this way. Since I'm
doing log backups every hour locally, and then copying these files over to
another system, I want to only copy over the most recent file. The other
(network) system should also have copies of previously copied logs. I wanted
to keep the i/o down, and only copy over the latest backup.
Secondly, I wanted to do this as a way to get more familiar with SSIS. I
think all I need to do really is just get the name of the most recent backup
log file, but I don't know how to get that info via SSIS.
So, e.g., say I've got two days worth of log backups on the local system,
then copy these over (say manually just for now) to a network system. Then,
the next time a log backup takes place on the local system, I want to copy
JUST that one over to the network system. If I could just identify that
particular (most recent) log backup's file name, I'd be set.
Again, this is just as much to learn SSIS as anything else right now.
Thanks for your help
"CoreyB" wrote:

> TomT - it sounds like everyone has an opinion! Here is a way to do
> what you want with SSIS. Then see below that for my opinion .
> 1 - Open your new SSIS project, and add a Foreach Loop container
> 2 - In the properties, make it a Foreach File Enumerator, and choose
> the folder you want. Set the other properties, such as if you want the
> fully qualified filename
> 3 - In the variable mappings area, Add a new user variable named
> "FileName"; it should appear as User::FileName. Click OK & you're done
> with the loop container
> 4 - Now go modify the variable properties (View, Other Windows,
> Variables). Highlight the variable created in #3 and press F4 to get
> the properties window.
> 5 - Change "EvaluateAsExpression" to True
> 6 - Change the "Expression" property to be your SQL Statement, but now
> you're including your variable (notice the single quotes around your
> variable):
> "INSERT test SELECT '" + @.[User::FileName] + "'"
> 7 - Now add an "Execute SQL Task" to your loop container. Choose your
> database. Change the SQL SourceType to be Variable.
> 8 - Choose your variable, which has now been filled with your SQL
> statement.
> 9 - test out by debugging & then select the data from your table
> SELECT * FROM test
>
> Your next step - you mentioned it was to copy the files from the
> original location to a new location using the table to loop. You can
> skip all of the above madness, by just using the file system task, and
> copy the entire contents of directory #1 to directory #2.
>
> ---
> I'm wondering if this can be done (I've had no luck so far):
> I would like to loop thru a set of files in a directory, place the file
> name
> into a variable, then insert the file name as a record into a table.
> I've gotten the for each (file) loop set up and working fine, placing
> the
> file name into a user variable, but can't figure out how to use the
> value of
> the variable to insert it into a table.
> The next step would be to loop thru the records in the table retrieving
> each
> file name into a variable to use in another for each file loop to copy
> the
> file to another location.
> The purpose of the entire exercise is to put file names into two tables
> for
> log backups. I'm backing up log files to a local directory, and want to
> copy
> them to a network share. Since I only want to copy newly backed up
> files, I
> would like to go thru all the files on the local drive, write them to a
> table, go thru all the previously copied files on the network share,
> write
> the names to another table, join the two tables to find which files do
> not
> exist on the network share and copy them to it.
> There may be a better way to do this, but I've not figured it out so
> far.
> Thanks for any assistance with this.
> TomT
>|||Sounds good - good luck!
TomT wrote:[vbcol=seagreen]
> Thanks Corey - that's the direction I wanted to go with this (getting the
> variable mapped properly in the sql statement.
> There are a couple of reasons I'm going about things in this way. Since I'
m
> doing log backups every hour locally, and then copying these files over to
> another system, I want to only copy over the most recent file. The other
> (network) system should also have copies of previously copied logs. I want
ed
> to keep the i/o down, and only copy over the latest backup.
> Secondly, I wanted to do this as a way to get more familiar with SSIS. I
> think all I need to do really is just get the name of the most recent back
up
> log file, but I don't know how to get that info via SSIS.
> So, e.g., say I've got two days worth of log backups on the local system,
> then copy these over (say manually just for now) to a network system. Then
,
> the next time a log backup takes place on the local system, I want to copy
> JUST that one over to the network system. If I could just identify that
> particular (most recent) log backup's file name, I'd be set.
> Again, this is just as much to learn SSIS as anything else right now.
> Thanks for your help
> "CoreyB" wrote:
>

Integration Services For Each Loop Question

I'm wondering if this can be done (I've had no luck so far):
I would like to loop thru a set of files in a directory, place the file name
into a variable, then insert the file name as a record into a table.
I've gotten the for each (file) loop set up and working fine, placing the
file name into a user variable, but can't figure out how to use the value of
the variable to insert it into a table.
The next step would be to loop thru the records in the table retrieving each
file name into a variable to use in another for each file loop to copy the
file to another location.
The purpose of the entire exercise is to put file names into two tables for
log backups. I'm backing up log files to a local directory, and want to copy
them to a network share. Since I only want to copy newly backed up files, I
would like to go thru all the files on the local drive, write them to a
table, go thru all the previously copied files on the network share, write
the names to another table, join the two tables to find which files do not
exist on the network share and copy them to it.
There may be a better way to do this, but I've not figured it out so far.
Thanks for any assistance with this.
TomTTomT wrote:
> I'm wondering if this can be done (I've had no luck so far):
> I would like to loop thru a set of files in a directory, place the file name
> into a variable, then insert the file name as a record into a table.
> I've gotten the for each (file) loop set up and working fine, placing the
> file name into a user variable, but can't figure out how to use the value of
> the variable to insert it into a table.
> The next step would be to loop thru the records in the table retrieving each
> file name into a variable to use in another for each file loop to copy the
> file to another location.
> The purpose of the entire exercise is to put file names into two tables for
> log backups. I'm backing up log files to a local directory, and want to copy
> them to a network share. Since I only want to copy newly backed up files, I
> would like to go thru all the files on the local drive, write them to a
> table, go thru all the previously copied files on the network share, write
> the names to another table, join the two tables to find which files do not
> exist on the network share and copy them to it.
> There may be a better way to do this, but I've not figured it out so far.
> Thanks for any assistance with this.
> TomT
You're going about this the hard way. If you can run xp_cmdshell, you
can do this with a single insert statement:
CREATE TABLE #Table (
[FileName] VARCHAR(255)
)
DECLARE @.Command VARCHAR(255)
SELECT @.Command = 'master..xp_cmdshell ''DIR /B C:\WINDOWS'''
INSERT INTO #Table
EXEC (@.Command)
SELECT * FROM #Table
DROP TABLE #Table
--
Tracy McKibben
MCDBA
http://www.realsqlguy.com|||Thanks Tracy, I guess I was hoping to incoporate this into an SSIS package
which would do the backups, history clean up, and file copy. Also, trying to
get up to speed on SSIS capabilities.
"Tracy McKibben" wrote:
> TomT wrote:
> > I'm wondering if this can be done (I've had no luck so far):
> >
> > I would like to loop thru a set of files in a directory, place the file name
> > into a variable, then insert the file name as a record into a table.
> >
> > I've gotten the for each (file) loop set up and working fine, placing the
> > file name into a user variable, but can't figure out how to use the value of
> > the variable to insert it into a table.
> >
> > The next step would be to loop thru the records in the table retrieving each
> > file name into a variable to use in another for each file loop to copy the
> > file to another location.
> >
> > The purpose of the entire exercise is to put file names into two tables for
> > log backups. I'm backing up log files to a local directory, and want to copy
> > them to a network share. Since I only want to copy newly backed up files, I
> > would like to go thru all the files on the local drive, write them to a
> > table, go thru all the previously copied files on the network share, write
> > the names to another table, join the two tables to find which files do not
> > exist on the network share and copy them to it.
> >
> > There may be a better way to do this, but I've not figured it out so far.
> >
> > Thanks for any assistance with this.
> >
> > TomT
> You're going about this the hard way. If you can run xp_cmdshell, you
> can do this with a single insert statement:
> CREATE TABLE #Table (
> [FileName] VARCHAR(255)
> )
> DECLARE @.Command VARCHAR(255)
> SELECT @.Command = 'master..xp_cmdshell ''DIR /B C:\WINDOWS'''
> INSERT INTO #Table
> EXEC (@.Command)
> SELECT * FROM #Table
> DROP TABLE #Table
> --
> Tracy McKibben
> MCDBA
> http://www.realsqlguy.com
>|||TomT wrote:
> Thanks Tracy, I guess I was hoping to incoporate this into an SSIS package
> which would do the backups, history clean up, and file copy. Also, trying to
> get up to speed on SSIS capabilities.
>
Ahh, ok... Well, this may or may not interest you, I have a script that
will automatically backup any database on your server, including t-logs,
and will handle the history cleanup too...
http://realsqlguy.com/twiki/bin/view/RealSQLGuy/AutomaticBackupOfAllDatabases
Tracy McKibben
MCDBA
http://www.realsqlguy.com|||Thanks Tracy - that's very helpful, and definately of interest to me.
At the same time, I'm still interested in finding out if there's a way to do
what I'm attempting via SSIS, particularly getting the file loop variable
into a sql insert statement.
I appreciate your feedback and assistance with this issue...
"Tracy McKibben" wrote:
> TomT wrote:
> > Thanks Tracy, I guess I was hoping to incoporate this into an SSIS package
> > which would do the backups, history clean up, and file copy. Also, trying to
> > get up to speed on SSIS capabilities.
> >
> Ahh, ok... Well, this may or may not interest you, I have a script that
> will automatically backup any database on your server, including t-logs,
> and will handle the history cleanup too...
> http://realsqlguy.com/twiki/bin/view/RealSQLGuy/AutomaticBackupOfAllDatabases
>
> --
> Tracy McKibben
> MCDBA
> http://www.realsqlguy.com
>|||Hi,
Thanks for your post!
To make me clear about your issue, I appreciate to know:
1) You could retrieve each filename in a variable now and you didn't know
how to insert it into a table?
If so, you can write SQL like this:
INSERT INTO Table_Name([colname1],...[colnamen])
values(@.FileName1,...,[@.othervalue])
2) Are your purpose as following ?
Retrieve related files on the local drive and insert their names into
one table;
Retrieve related files on the remote network drive and insert their
names into a second table;
Compare the data between the two tables, if the 1st table's files names
are not in the second table, copy them into the network drive.
For such issue, you can't directly use TSQL in workflow control in SSIS.
I recommend you use "Execute SQL task" and map the variable to a
parameter in the task.
Right click task->Edit->Parameter Mapping.
Then you could use the parameter as you mentioned in the SQLstatement in
General tab of "Execute SQL task"
http://msdn2.microsoft.com/en-us/library/ms141003.aspx
Also, you could configure "variable mapping" of foreach loop container
to the variable you uses.
Other tasks like ActiveX Scripts Task can also help you deal with this
case.
http://msdn2.microsoft.com/en-us/library/ms137525.aspx
If you have any other concerns, please feel free to let me know. I'm
happy for your assistance.
+++++++++++++++++++++++++++
Charles Wang
Microsoft Online Partner Support
+++++++++++++++++++++++++++
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
=====================================================Business-Critical Phone Support (BCPS) provides you with technical phone
support at no charge during critical LAN outages or "business down"
situations. This benefit is available 24 hours a day, 7 days a week to all
Microsoft technology partners in the United States and Canada.
This and other support options are available here:
BCPS:
https://partner.microsoft.com/US/technicalsupport/supportoverview/40010469
Others:
https://partner.microsoft.com/US/technicalsupport/supportoverview/
If you are outside the United States, please visit our International
Support page:
http://support.microsoft.com/default.aspx?scid=%2finternational.aspx.
=====================================================
This posting is provided "AS IS" with no warranties, and confers no rights.|||TomT - it sounds like everyone has an opinion! Here is a way to do
what you want with SSIS. Then see below that for my opinion :).
1 - Open your new SSIS project, and add a Foreach Loop container
2 - In the properties, make it a Foreach File Enumerator, and choose
the folder you want. Set the other properties, such as if you want the
fully qualified filename
3 - In the variable mappings area, Add a new user variable named
"FileName"; it should appear as User::FileName. Click OK & you're done
with the loop container
4 - Now go modify the variable properties (View, Other Windows,
Variables). Highlight the variable created in #3 and press F4 to get
the properties window.
5 - Change "EvaluateAsExpression" to True
6 - Change the "Expression" property to be your SQL Statement, but now
you're including your variable (notice the single quotes around your
variable):
"INSERT test SELECT '" + @.[User::FileName] + "'"
7 - Now add an "Execute SQL Task" to your loop container. Choose your
database. Change the SQL SourceType to be Variable.
8 - Choose your variable, which has now been filled with your SQL
statement.
9 - test out by debugging & then select the data from your table
SELECT * FROM test
Your next step - you mentioned it was to copy the files from the
original location to a new location using the table to loop. You can
skip all of the above madness, by just using the file system task, and
copy the entire contents of directory #1 to directory #2.
---
I'm wondering if this can be done (I've had no luck so far):
I would like to loop thru a set of files in a directory, place the file
name
into a variable, then insert the file name as a record into a table.
I've gotten the for each (file) loop set up and working fine, placing
the
file name into a user variable, but can't figure out how to use the
value of
the variable to insert it into a table.
The next step would be to loop thru the records in the table retrieving
each
file name into a variable to use in another for each file loop to copy
the
file to another location.
The purpose of the entire exercise is to put file names into two tables
for
log backups. I'm backing up log files to a local directory, and want to
copy
them to a network share. Since I only want to copy newly backed up
files, I
would like to go thru all the files on the local drive, write them to a
table, go thru all the previously copied files on the network share,
write
the names to another table, join the two tables to find which files do
not
exist on the network share and copy them to it.
There may be a better way to do this, but I've not figured it out so
far.
Thanks for any assistance with this.
TomT|||Thanks Corey - that's the direction I wanted to go with this (getting the
variable mapped properly in the sql statement.
There are a couple of reasons I'm going about things in this way. Since I'm
doing log backups every hour locally, and then copying these files over to
another system, I want to only copy over the most recent file. The other
(network) system should also have copies of previously copied logs. I wanted
to keep the i/o down, and only copy over the latest backup.
Secondly, I wanted to do this as a way to get more familiar with SSIS. I
think all I need to do really is just get the name of the most recent backup
log file, but I don't know how to get that info via SSIS.
So, e.g., say I've got two days worth of log backups on the local system,
then copy these over (say manually just for now) to a network system. Then,
the next time a log backup takes place on the local system, I want to copy
JUST that one over to the network system. If I could just identify that
particular (most recent) log backup's file name, I'd be set.
Again, this is just as much to learn SSIS as anything else right now.
Thanks for your help
"CoreyB" wrote:
> TomT - it sounds like everyone has an opinion! Here is a way to do
> what you want with SSIS. Then see below that for my opinion :).
> 1 - Open your new SSIS project, and add a Foreach Loop container
> 2 - In the properties, make it a Foreach File Enumerator, and choose
> the folder you want. Set the other properties, such as if you want the
> fully qualified filename
> 3 - In the variable mappings area, Add a new user variable named
> "FileName"; it should appear as User::FileName. Click OK & you're done
> with the loop container
> 4 - Now go modify the variable properties (View, Other Windows,
> Variables). Highlight the variable created in #3 and press F4 to get
> the properties window.
> 5 - Change "EvaluateAsExpression" to True
> 6 - Change the "Expression" property to be your SQL Statement, but now
> you're including your variable (notice the single quotes around your
> variable):
> "INSERT test SELECT '" + @.[User::FileName] + "'"
> 7 - Now add an "Execute SQL Task" to your loop container. Choose your
> database. Change the SQL SourceType to be Variable.
> 8 - Choose your variable, which has now been filled with your SQL
> statement.
> 9 - test out by debugging & then select the data from your table
> SELECT * FROM test
>
> Your next step - you mentioned it was to copy the files from the
> original location to a new location using the table to loop. You can
> skip all of the above madness, by just using the file system task, and
> copy the entire contents of directory #1 to directory #2.
>
> ---
> I'm wondering if this can be done (I've had no luck so far):
> I would like to loop thru a set of files in a directory, place the file
> name
> into a variable, then insert the file name as a record into a table.
> I've gotten the for each (file) loop set up and working fine, placing
> the
> file name into a user variable, but can't figure out how to use the
> value of
> the variable to insert it into a table.
> The next step would be to loop thru the records in the table retrieving
> each
> file name into a variable to use in another for each file loop to copy
> the
> file to another location.
> The purpose of the entire exercise is to put file names into two tables
> for
> log backups. I'm backing up log files to a local directory, and want to
> copy
> them to a network share. Since I only want to copy newly backed up
> files, I
> would like to go thru all the files on the local drive, write them to a
> table, go thru all the previously copied files on the network share,
> write
> the names to another table, join the two tables to find which files do
> not
> exist on the network share and copy them to it.
> There may be a better way to do this, but I've not figured it out so
> far.
> Thanks for any assistance with this.
> TomT
>|||Sounds good - good luck!
TomT wrote:
> Thanks Corey - that's the direction I wanted to go with this (getting the
> variable mapped properly in the sql statement.
> There are a couple of reasons I'm going about things in this way. Since I'm
> doing log backups every hour locally, and then copying these files over to
> another system, I want to only copy over the most recent file. The other
> (network) system should also have copies of previously copied logs. I wanted
> to keep the i/o down, and only copy over the latest backup.
> Secondly, I wanted to do this as a way to get more familiar with SSIS. I
> think all I need to do really is just get the name of the most recent backup
> log file, but I don't know how to get that info via SSIS.
> So, e.g., say I've got two days worth of log backups on the local system,
> then copy these over (say manually just for now) to a network system. Then,
> the next time a log backup takes place on the local system, I want to copy
> JUST that one over to the network system. If I could just identify that
> particular (most recent) log backup's file name, I'd be set.
> Again, this is just as much to learn SSIS as anything else right now.
> Thanks for your help
> "CoreyB" wrote:
> > TomT - it sounds like everyone has an opinion! Here is a way to do
> > what you want with SSIS. Then see below that for my opinion :).
> >
> > 1 - Open your new SSIS project, and add a Foreach Loop container
> > 2 - In the properties, make it a Foreach File Enumerator, and choose
> > the folder you want. Set the other properties, such as if you want the
> > fully qualified filename
> > 3 - In the variable mappings area, Add a new user variable named
> > "FileName"; it should appear as User::FileName. Click OK & you're done
> > with the loop container
> > 4 - Now go modify the variable properties (View, Other Windows,
> > Variables). Highlight the variable created in #3 and press F4 to get
> > the properties window.
> > 5 - Change "EvaluateAsExpression" to True
> > 6 - Change the "Expression" property to be your SQL Statement, but now
> > you're including your variable (notice the single quotes around your
> > variable):
> >
> > "INSERT test SELECT '" + @.[User::FileName] + "'"
> >
> > 7 - Now add an "Execute SQL Task" to your loop container. Choose your
> > database. Change the SQL SourceType to be Variable.
> > 8 - Choose your variable, which has now been filled with your SQL
> > statement.
> > 9 - test out by debugging & then select the data from your table
> >
> > SELECT * FROM test
> >
> >
> > Your next step - you mentioned it was to copy the files from the
> > original location to a new location using the table to loop. You can
> > skip all of the above madness, by just using the file system task, and
> > copy the entire contents of directory #1 to directory #2.
> >
> >
> > ---
> >
> > I'm wondering if this can be done (I've had no luck so far):
> >
> > I would like to loop thru a set of files in a directory, place the file
> > name
> > into a variable, then insert the file name as a record into a table.
> >
> > I've gotten the for each (file) loop set up and working fine, placing
> > the
> > file name into a user variable, but can't figure out how to use the
> > value of
> > the variable to insert it into a table.
> >
> > The next step would be to loop thru the records in the table retrieving
> > each
> > file name into a variable to use in another for each file loop to copy
> > the
> > file to another location.
> >
> > The purpose of the entire exercise is to put file names into two tables
> > for
> > log backups. I'm backing up log files to a local directory, and want to
> > copy
> > them to a network share. Since I only want to copy newly backed up
> > files, I
> > would like to go thru all the files on the local drive, write them to a
> > table, go thru all the previously copied files on the network share,
> > write
> > the names to another table, join the two tables to find which files do
> > not
> > exist on the network share and copy them to it.
> >
> > There may be a better way to do this, but I've not figured it out so
> > far.
> >
> > Thanks for any assistance with this.
> >
> > TomT
> >
> >

Integration Services

When I try to run Data Flow to get multiple mdb files getting this error
any thoughts '
TITLE: Package Validation Error
--
Package Validation Error
ADDITIONAL INFORMATION:
Error at Data Flow Task [OLE DB Source [1]]: The AcquireConnection m
ethod
call to the connection manager "Northwind_1" failed with error code
0xC0202009.
Error at Data Flow Task [DTS.Pipeline]: component "OLE DB Source" (1) fa
iled
validation and returned error code 0xC020801C.
Error at Data Flow Task [DTS.Pipeline]: One or more component failed
validation.
Error at Data Flow Task: There were errors during task validation.
Error at ForEachLoop [Connection manager "Northwind_1"]: An OLE DB error
has
occurred. Error code: 0x80004005.
An OLE DB record is available. Source: "Microsoft OLE DB Provider for ODBC
Drivers" Hresult: 0x80004005 Description: "[Microsoft][ODBC Driver
Manager]
Data source name not found and no default driver specified".
(Microsoft.DataTransformationServices.VsIntegration)Gopinath,
Please see:
http://www.aspfaq.com/sql2005/show.asp?id=1
HTH
Jerry
"Gopinath" <Gopinath@.discussions.microsoft.com> wrote in message
news:628161DE-68B2-47F5-9420-897A93BB7D32@.microsoft.com...
> When I try to run Data Flow to get multiple mdb files getting this error
> any thoughts '
>
> TITLE: Package Validation Error
> --
> Package Validation Error
> --
> ADDITIONAL INFORMATION:
> Error at Data Flow Task [OLE DB Source [1]]: The AcquireConnection
method
> call to the connection manager "Northwind_1" failed with error code
> 0xC0202009.
> Error at Data Flow Task [DTS.Pipeline]: component "OLE DB Source" (1)
> failed
> validation and returned error code 0xC020801C.
> Error at Data Flow Task [DTS.Pipeline]: One or more component failed
> validation.
> Error at Data Flow Task: There were errors during task validation.
> Error at ForEachLoop [Connection manager "Northwind_1"]: An OLE DB err
or
> has
> occurred. Error code: 0x80004005.
> An OLE DB record is available. Source: "Microsoft OLE DB Provider for
> ODBC
> Drivers" Hresult: 0x80004005 Description: "[Microsoft][ODBC Driv
er
> Manager]
> Data source name not found and no default driver specified".
> (Microsoft.DataTransformationServices.VsIntegration)
>|||Hi Jerry,
Please check the URL its not have any details about my question, Am I
missing anything.
Thanks
Gopi
"Jerry Spivey" wrote:

> Gopinath,
> Please see:
> http://www.aspfaq.com/sql2005/show.asp?id=1
> HTH
> Jerry
> "Gopinath" <Gopinath@.discussions.microsoft.com> wrote in message
> news:628161DE-68B2-47F5-9420-897A93BB7D32@.microsoft.com...
>
>|||If the SSIS package doesn't validate then a likely cause is that you
have configured something incorrectly.
The first thing I would check is the OLE DB Connection Manager that
you are using.
Go over each step of the configuration and check that you set it up
correctly.
If you don't see a solution by that simple expedient I suggest that
you go to
http://forums.microsoft.com/msdn/de...ForumGroupID=19 and post
your question on the Integration Services forum.
Andrew Watt
MVP - InfoPath
On Wed, 19 Oct 2005 08:00:05 -0700, "Gopinath"
<Gopinath@.discussions.microsoft.com> wrote:

>When I try to run Data Flow to get multiple mdb files getting this error
>any thoughts '
>
>TITLE: Package Validation Error
>--
>Package Validation Error
>--
>ADDITIONAL INFORMATION:
>Error at Data Flow Task [OLE DB Source [1]]: The AcquireConnection
method
>call to the connection manager "Northwind_1" failed with error code
>0xC0202009.
>Error at Data Flow Task [DTS.Pipeline]: component "OLE DB Source" (1) f
ailed
>validation and returned error code 0xC020801C.
>Error at Data Flow Task [DTS.Pipeline]: One or more component failed
>validation.
>Error at Data Flow Task: There were errors during task validation.
>Error at ForEachLoop [Connection manager "Northwind_1"]: An OLE DB erro
r has
>occurred. Error code: 0x80004005.
>An OLE DB record is available. Source: "Microsoft OLE DB Provider for ODBC
>Drivers" Hresult: 0x80004005 Description: "[Microsoft][ODBC Drive
r Manager]
>Data source name not found and no default driver specified".
> (Microsoft.DataTransformationServices.VsIntegration)|||Gopi,
The URL is basically indicating the *best* community to answer your SQL
Server 2005 questions. SQL Server 2005 has not yet been released and is
still in BETA. Choosing the best NG to answer your post will likely expite
an answer and will help minimize a duplication of effort when posting to a
2000 and 2005 NG.
HTH
Jerry
"Gopinath" <Gopinath@.discussions.microsoft.com> wrote in message
news:5CA99ED7-07C4-48A2-883A-046CD61F007E@.microsoft.com...[vbcol=seagreen]
> Hi Jerry,
> Please check the URL its not have any details about my question, Am I
> missing anything.
> Thanks
> Gopi
>
> "Jerry Spivey" wrote:
>

Integration Services

When I try to run Data Flow to get multiple mdb files getting this error
any thoughts '
TITLE: Package Validation Error
--
Package Validation Error
--
ADDITIONAL INFORMATION:
Error at Data Flow Task [OLE DB Source [1]]: The AcquireConnection method
call to the connection manager "Northwind_1" failed with error code
0xC0202009.
Error at Data Flow Task [DTS.Pipeline]: component "OLE DB Source" (1) failed
validation and returned error code 0xC020801C.
Error at Data Flow Task [DTS.Pipeline]: One or more component failed
validation.
Error at Data Flow Task: There were errors during task validation.
Error at ForEachLoop [Connection manager "Northwind_1"]: An OLE DB error has
occurred. Error code: 0x80004005.
An OLE DB record is available. Source: "Microsoft OLE DB Provider for ODBC
Drivers" Hresult: 0x80004005 Description: "[Microsoft][ODBC Driver Manager]
Data source name not found and no default driver specified".
(Microsoft.DataTransformationServices.VsIntegration)Gopinath,
Please see:
http://www.aspfaq.com/sql2005/show.asp?id=1
HTH
Jerry
"Gopinath" <Gopinath@.discussions.microsoft.com> wrote in message
news:628161DE-68B2-47F5-9420-897A93BB7D32@.microsoft.com...
> When I try to run Data Flow to get multiple mdb files getting this error
> any thoughts '
>
> TITLE: Package Validation Error
> --
> Package Validation Error
> --
> ADDITIONAL INFORMATION:
> Error at Data Flow Task [OLE DB Source [1]]: The AcquireConnection method
> call to the connection manager "Northwind_1" failed with error code
> 0xC0202009.
> Error at Data Flow Task [DTS.Pipeline]: component "OLE DB Source" (1)
> failed
> validation and returned error code 0xC020801C.
> Error at Data Flow Task [DTS.Pipeline]: One or more component failed
> validation.
> Error at Data Flow Task: There were errors during task validation.
> Error at ForEachLoop [Connection manager "Northwind_1"]: An OLE DB error
> has
> occurred. Error code: 0x80004005.
> An OLE DB record is available. Source: "Microsoft OLE DB Provider for
> ODBC
> Drivers" Hresult: 0x80004005 Description: "[Microsoft][ODBC Driver
> Manager]
> Data source name not found and no default driver specified".
> (Microsoft.DataTransformationServices.VsIntegration)
>|||Hi Jerry,
Please check the URL its not have any details about my question, Am I
missing anything.
Thanks
Gopi
"Jerry Spivey" wrote:
> Gopinath,
> Please see:
> http://www.aspfaq.com/sql2005/show.asp?id=1
> HTH
> Jerry
> "Gopinath" <Gopinath@.discussions.microsoft.com> wrote in message
> news:628161DE-68B2-47F5-9420-897A93BB7D32@.microsoft.com...
> > When I try to run Data Flow to get multiple mdb files getting this error
> >
> > any thoughts '
> >
> >
> > TITLE: Package Validation Error
> > --
> >
> > Package Validation Error
> >
> > --
> > ADDITIONAL INFORMATION:
> >
> > Error at Data Flow Task [OLE DB Source [1]]: The AcquireConnection method
> > call to the connection manager "Northwind_1" failed with error code
> > 0xC0202009.
> >
> > Error at Data Flow Task [DTS.Pipeline]: component "OLE DB Source" (1)
> > failed
> > validation and returned error code 0xC020801C.
> >
> > Error at Data Flow Task [DTS.Pipeline]: One or more component failed
> > validation.
> >
> > Error at Data Flow Task: There were errors during task validation.
> >
> > Error at ForEachLoop [Connection manager "Northwind_1"]: An OLE DB error
> > has
> > occurred. Error code: 0x80004005.
> > An OLE DB record is available. Source: "Microsoft OLE DB Provider for
> > ODBC
> > Drivers" Hresult: 0x80004005 Description: "[Microsoft][ODBC Driver
> > Manager]
> > Data source name not found and no default driver specified".
> >
> > (Microsoft.DataTransformationServices.VsIntegration)
> >
> >
>
>|||If the SSIS package doesn't validate then a likely cause is that you
have configured something incorrectly.
The first thing I would check is the OLE DB Connection Manager that
you are using.
Go over each step of the configuration and check that you set it up
correctly.
If you don't see a solution by that simple expedient I suggest that
you go to
http://forums.microsoft.com/msdn/default.aspx?ForumGroupID=19 and post
your question on the Integration Services forum.
Andrew Watt
MVP - InfoPath
On Wed, 19 Oct 2005 08:00:05 -0700, "Gopinath"
<Gopinath@.discussions.microsoft.com> wrote:
>When I try to run Data Flow to get multiple mdb files getting this error
>any thoughts '
>
>TITLE: Package Validation Error
>--
>Package Validation Error
>--
>ADDITIONAL INFORMATION:
>Error at Data Flow Task [OLE DB Source [1]]: The AcquireConnection method
>call to the connection manager "Northwind_1" failed with error code
>0xC0202009.
>Error at Data Flow Task [DTS.Pipeline]: component "OLE DB Source" (1) failed
>validation and returned error code 0xC020801C.
>Error at Data Flow Task [DTS.Pipeline]: One or more component failed
>validation.
>Error at Data Flow Task: There were errors during task validation.
>Error at ForEachLoop [Connection manager "Northwind_1"]: An OLE DB error has
>occurred. Error code: 0x80004005.
>An OLE DB record is available. Source: "Microsoft OLE DB Provider for ODBC
>Drivers" Hresult: 0x80004005 Description: "[Microsoft][ODBC Driver Manager]
>Data source name not found and no default driver specified".
> (Microsoft.DataTransformationServices.VsIntegration)|||Gopi,
The URL is basically indicating the *best* community to answer your SQL
Server 2005 questions. SQL Server 2005 has not yet been released and is
still in BETA. Choosing the best NG to answer your post will likely expite
an answer and will help minimize a duplication of effort when posting to a
2000 and 2005 NG.
HTH
Jerry
"Gopinath" <Gopinath@.discussions.microsoft.com> wrote in message
news:5CA99ED7-07C4-48A2-883A-046CD61F007E@.microsoft.com...
> Hi Jerry,
> Please check the URL its not have any details about my question, Am I
> missing anything.
> Thanks
> Gopi
>
> "Jerry Spivey" wrote:
>> Gopinath,
>> Please see:
>> http://www.aspfaq.com/sql2005/show.asp?id=1
>> HTH
>> Jerry
>> "Gopinath" <Gopinath@.discussions.microsoft.com> wrote in message
>> news:628161DE-68B2-47F5-9420-897A93BB7D32@.microsoft.com...
>> > When I try to run Data Flow to get multiple mdb files getting this
>> > error
>> >
>> > any thoughts '
>> >
>> >
>> > TITLE: Package Validation Error
>> > --
>> >
>> > Package Validation Error
>> >
>> > --
>> > ADDITIONAL INFORMATION:
>> >
>> > Error at Data Flow Task [OLE DB Source [1]]: The AcquireConnection
>> > method
>> > call to the connection manager "Northwind_1" failed with error code
>> > 0xC0202009.
>> >
>> > Error at Data Flow Task [DTS.Pipeline]: component "OLE DB Source" (1)
>> > failed
>> > validation and returned error code 0xC020801C.
>> >
>> > Error at Data Flow Task [DTS.Pipeline]: One or more component failed
>> > validation.
>> >
>> > Error at Data Flow Task: There were errors during task validation.
>> >
>> > Error at ForEachLoop [Connection manager "Northwind_1"]: An OLE DB
>> > error
>> > has
>> > occurred. Error code: 0x80004005.
>> > An OLE DB record is available. Source: "Microsoft OLE DB Provider for
>> > ODBC
>> > Drivers" Hresult: 0x80004005 Description: "[Microsoft][ODBC Driver
>> > Manager]
>> > Data source name not found and no default driver specified".
>> >
>> > (Microsoft.DataTransformationServices.VsIntegration)
>> >
>> >
>>

Integration Services

When I try to run Data Flow to get multiple mdb files getting this error
any thoughts ?
TITLE: Package Validation Error
Package Validation Error
ADDITIONAL INFORMATION:
Error at Data Flow Task [OLE DB Source [1]]: The AcquireConnection method
call to the connection manager "Northwind_1" failed with error code
0xC0202009.
Error at Data Flow Task [DTS.Pipeline]: component "OLE DB Source" (1) failed
validation and returned error code 0xC020801C.
Error at Data Flow Task [DTS.Pipeline]: One or more component failed
validation.
Error at Data Flow Task: There were errors during task validation.
Error at ForEachLoop [Connection manager "Northwind_1"]: An OLE DB error has
occurred. Error code: 0x80004005.
An OLE DB record is available. Source: "Microsoft OLE DB Provider for ODBC
Drivers" Hresult: 0x80004005 Description: "[Microsoft][ODBC Driver Manager]
Data source name not found and no default driver specified".
(Microsoft.DataTransformationServices.VsIntegratio n)
Gopinath,
Please see:
http://www.aspfaq.com/sql2005/show.asp?id=1
HTH
Jerry
"Gopinath" <Gopinath@.discussions.microsoft.com> wrote in message
news:628161DE-68B2-47F5-9420-897A93BB7D32@.microsoft.com...
> When I try to run Data Flow to get multiple mdb files getting this error
> any thoughts ?
>
> TITLE: Package Validation Error
> --
> Package Validation Error
> --
> ADDITIONAL INFORMATION:
> Error at Data Flow Task [OLE DB Source [1]]: The AcquireConnection method
> call to the connection manager "Northwind_1" failed with error code
> 0xC0202009.
> Error at Data Flow Task [DTS.Pipeline]: component "OLE DB Source" (1)
> failed
> validation and returned error code 0xC020801C.
> Error at Data Flow Task [DTS.Pipeline]: One or more component failed
> validation.
> Error at Data Flow Task: There were errors during task validation.
> Error at ForEachLoop [Connection manager "Northwind_1"]: An OLE DB error
> has
> occurred. Error code: 0x80004005.
> An OLE DB record is available. Source: "Microsoft OLE DB Provider for
> ODBC
> Drivers" Hresult: 0x80004005 Description: "[Microsoft][ODBC Driver
> Manager]
> Data source name not found and no default driver specified".
> (Microsoft.DataTransformationServices.VsIntegratio n)
>
|||Hi Jerry,
Please check the URL its not have any details about my question, Am I
missing anything.
Thanks
Gopi
"Jerry Spivey" wrote:

> Gopinath,
> Please see:
> http://www.aspfaq.com/sql2005/show.asp?id=1
> HTH
> Jerry
> "Gopinath" <Gopinath@.discussions.microsoft.com> wrote in message
> news:628161DE-68B2-47F5-9420-897A93BB7D32@.microsoft.com...
>
>
|||If the SSIS package doesn't validate then a likely cause is that you
have configured something incorrectly.
The first thing I would check is the OLE DB Connection Manager that
you are using.
Go over each step of the configuration and check that you set it up
correctly.
If you don't see a solution by that simple expedient I suggest that
you go to
http://forums.microsoft.com/msdn/def...orumGroupID=19 and post
your question on the Integration Services forum.
Andrew Watt
MVP - InfoPath
On Wed, 19 Oct 2005 08:00:05 -0700, "Gopinath"
<Gopinath@.discussions.microsoft.com> wrote:

>When I try to run Data Flow to get multiple mdb files getting this error
>any thoughts ?
>
>TITLE: Package Validation Error
>--
>Package Validation Error
>--
>ADDITIONAL INFORMATION:
>Error at Data Flow Task [OLE DB Source [1]]: The AcquireConnection method
>call to the connection manager "Northwind_1" failed with error code
>0xC0202009.
>Error at Data Flow Task [DTS.Pipeline]: component "OLE DB Source" (1) failed
>validation and returned error code 0xC020801C.
>Error at Data Flow Task [DTS.Pipeline]: One or more component failed
>validation.
>Error at Data Flow Task: There were errors during task validation.
>Error at ForEachLoop [Connection manager "Northwind_1"]: An OLE DB error has
>occurred. Error code: 0x80004005.
>An OLE DB record is available. Source: "Microsoft OLE DB Provider for ODBC
>Drivers" Hresult: 0x80004005 Description: "[Microsoft][ODBC Driver Manager]
>Data source name not found and no default driver specified".
> (Microsoft.DataTransformationServices.VsIntegratio n)
|||Gopi,
The URL is basically indicating the *best* community to answer your SQL
Server 2005 questions. SQL Server 2005 has not yet been released and is
still in BETA. Choosing the best NG to answer your post will likely expite
an answer and will help minimize a duplication of effort when posting to a
2000 and 2005 NG.
HTH
Jerry
"Gopinath" <Gopinath@.discussions.microsoft.com> wrote in message
news:5CA99ED7-07C4-48A2-883A-046CD61F007E@.microsoft.com...[vbcol=seagreen]
> Hi Jerry,
> Please check the URL its not have any details about my question, Am I
> missing anything.
> Thanks
> Gopi
>
> "Jerry Spivey" wrote: