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

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.