Solved

Xp_Sendmail not mailing Ascii

Posted on 2011-09-14
4
539 Views
Last Modified: 2012-07-21
I have a process that does a simple select. Once it does this select, it executes the XP_Sendmail to a .csv, but the problem is the .csv file needs to be in ascii format, its defaulting to uuincode

Any Help?

0
Comment
Question by:sysadmn_ascent
  • 2
4 Comments
 
LVL 17

Expert Comment

by:dbaSQL
ID: 36542369
have you tried to use sp_send_dbmail?  it may not be a problem with xp_sendmail.  how are you creating the file?
http://dbaspot.com/sqlserver-server/369348-why-does-xp_sendmail-always-creates-using-unicode.html
0
 
LVL 21

Accepted Solution

by:
Alpesh Patel earned 500 total points
ID: 36542596
yes use the Database Mail. First configure it and use it
0
 
LVL 51

Expert Comment

by:Mark Wills
ID: 36546776
If you are running the query via the email then it makes little difference. The result will be unicode. At one point it used to generate Ansi / Ascii output but with the various upgrades it lost that ability and became unicode by default.

It has been some time since I last looked into it, and would have hoped there was an option by now. But cursory checks suggest it is still unicode output. I can check further if needed.

Possibly the best way is to generate the output and attach the results rather than attach the query. This is also true for dbmail.

Also, if using SQL 2005 and later, then most definitely look at the newer tools with dbmail - even though attached queries will still generate unicode, it is a far better tool (in my opinion).

But, execute the query first, generate the attachment, then attach that (and not the query).

If you can give us an example of what you are currently doing (and versions), we might be able to suggest the more appropriate solution.
0
 
LVL 51

Expert Comment

by:Mark Wills
ID: 38211609
Strange... Would have though dbasql might have earned some points given the accepted solution.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When you hear the word proxy, you may become apprehensive. This article will help you to understand Proxy and when it is useful. Let's talk Proxy for SQL Server. (Not in terms of Internet access.) Typically, you'll run into this type of problem w…
Everyone has problem when going to load data into Data warehouse (EDW). They all need to confirm that data quality is good but they don't no how to proceed. Microsoft has provided new task within SSIS 2008 called "Data Profiler Task". It solve th…
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now