Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources
Viewing all articles
Browse latest Browse all 6937

Which class to export data from SQL Table to flat file?

$
0
0

Need to read 85 SQL tables and export them to a delimited flat file with a header.  I cannot use bcp or invoke sqlcmd. Has to work with SQL 2005 - 2014. Will execute from a SQL Agent job.

I have seen some partial examples with smo, serverconnection, sqlconnection with adaptor. Any others that I am missing.

What are the pros and cons of the various classes? Which is the most portable? The solution will be sent out to several clients and I have no control over their os, .NET, PS version. (I can force probably force the .NET and PS, but would prefer not to do it too often)


Viewing all articles
Browse latest Browse all 6937

Trending Articles