Using BCP to export the contents of MAX datatypes to a file

Comments 0

Share to social media

This is a simple way of saving SQL Server text to a file. I’ve used it for years. Just pass it a string and all should be well, just as long as your database allows command-line access and you user has sufficient rights

To allow xp_cmdshell to be used you might need to do this.

Your login must be allowed access to the file system.

Load comments

About the author

Phil Factor

See Profile

Phil Factor (real name withheld to protect the guilty), aka Database Mole, has 40 years of experience with database-intensive applications. Despite having once been shouted at by a furious Bill Gates at an exhibition in the early 1980s, he has remained resolutely anonymous throughout his career. See also :

Phil Factor's contributions