Created a DTS Package is SQL that drops a table then recreates it then
imports data from an excel spreadsheet. This works fine if you run it
from the Local Packages and click execute package.
But, if you run it using the xp_cmdshell it doesn't popluate all the
columns. It will fill the 29 columns then the rest are null and then it
will fill the last 4 columns.
I thought that maybe that if the 30th column is null in the first row
then the rest would be null. So I sorted by that column in the package
and I'm getting the same results.
Does a package run differently with the xp_cmdshell versus righ
clicking and executing?
Thanks
MikeIf you run a exectue sql task with xp_cmdshell in it by right clicking and
executing, this will run same as executing full package with other steps.
How are you running it exactly (from where, how) and what is the sql stmt
inside xp_cmdshell ?
"Mike" wrote:
> Created a DTS Package is SQL that drops a table then recreates it then
> imports data from an excel spreadsheet. This works fine if you run it
> from the Local Packages and click execute package.
> But, if you run it using the xp_cmdshell it doesn't popluate all the
> columns. It will fill the 29 columns then the rest are null and then it
> will fill the last 4 columns.
> I thought that maybe that if the 30th column is null in the first row
> then the rest would be null. So I sorted by that column in the package
> and I'm getting the same results.
> Does a package run differently with the xp_cmdshell versus righ
> clicking and executing?
> Thanks
> Mike
>|||EXEC master..xp_cmdshell 'dtsrun /Sservername /E /NExcelInsert'
running this statement leaves most columns NULL.
Going through Enterprise manager --> local packages and right clicking
and hitting execute runs correctly.
MattB wrote:
> If you run a exectue sql task with xp_cmdshell in it by right clicking and
> executing, this will run same as executing full package with other steps.
> How are you running it exactly (from where, how) and what is the sql stmt
> inside xp_cmdshell ?
>
> "Mike" wrote:
>
No comments:
Post a Comment