Sunday, February 19, 2012

csvde from Execute Process Task not returning groupType

When I run csvde from within an SSIS package's Execute Process Task, it does not return the groupType attribute, but when I run it directly from a command prompt, it does return that attribute. The csvde swiches are set the same in both cases:

-t 3268 -u -f allGroups.csv -d "DC=corp,DC=microsoft,DC=com" -r "(objectClass=group)" -l "groupType,mail,member"

The header line in the output file produced by the package is:

DN,member,mail,member;range=0-1499

while the header line in the file produced when csvde is run directly is:

DN,member,groupType,mail,member;range=0-1499

Has anyone else encountered this behavior?

Thanks,

Ron Rice

How do you have the Execute Process task setup?

Also, you may want to specify a full path to the -f flag.|||

Phil,

Unfortunately, making the -f switch a full path did not change the results.

I also tried changing the order of the attributes in the -l switch to "mail,groupType,member". At first I thought this had worked, because it did return the groupType attribute, but then I noticed that the "mail" attribute was not returned after making this change!

So for whatever reason, when I execute csvde from a package, the first attribute in the -l switch is not returned.

Thanks,

Ron

|||

Drop the double quotes around the -l flag parameters.

-l mail,groupType,member

|||

Phil,

Removing the double quotes from around the -l switch list of attributes did fix the problem. Thanks!

I wonder why csvde would behave differently when run in an Execute Process task versus being run directly from a command prompt. Also, I tried running it using T-SQL and xp_cmdshell, and that had the same problem. And I seem to remember running into issues concerning double quotes when I ran the bcp command from an Execute Process task, as well.

Whatever the ultimate cause of the problem, now that I know the work-around I am a happy camper!

Ron

|||

Rice31416 wrote:

Whatever the ultimate cause of the problem, now that I know the work-around I am a happy camper!

Ron

It's not really a work around. According to the csvde page, double quotes are not required. (See the examples at the bottom.)

http://technet2.microsoft.com/WindowsServer/en/Library/1050686f-3464-41af-b7e4-016ab0c4db261033.mspx

No comments:

Post a Comment