Do you have a comment or suggestion to improve SQL Server? We’d love to hear it!

Add a BULK EXPORT command

If you follow the MSDN forums there is no end of pepole who invoke BCP through xp_cmdshell to export data to file. There are several problems with this method. One is the security aspect of xp_cmdshell. Another is the fact that since BCP runs in a separate process, you cannot access temp tables, which leads to various kludges.

CLR? Maybe the people who export data through a CLR procedure are the smart people who never have to ask in a forum, because I have never seen it.

SSIS? SSIS is good if you know it and you use it across your organisation, but if you don't it is an alien creature which is only difficult to manage.

For these reasons there should be a BULK EXPORT command similar to BULK INSERT and with about the options provided by BCP. Of course, it could be enhanced to be more useful, for instance an option to include column headers or an option to generate proper CSV files.

1 vote
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    Password icon
    Signed in as (Sign out)

    We’ll send you updates on this idea

    Erland Sommarskog shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

    0 comments

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      Signed in as (Sign out)
      Submitting...

      Feedback and Knowledge Base