Database Mail only sends SMTP email messages and logs problems
connecting to the mail server. However, I also need to log bounced
emails (bad address, etc).
Are there any clean ways to do this with Database Mail and Exchange?
Or will I have to mix Database Mail with SQL Mail to read bounces out
of the inbox? Or, have a .NET windows service that talks to the
Exchange API?
I have set up database mail in SQL 2005. We have an MS Exchange group that is alerted when SQL jobs fail. Two things ; i) I can't seem to be able to use Exchange mail Groups. If I specify the group name SQL returns ;
The mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 1 (2007-10-30T15:40:39). Exception Message: Cannot send mails to mail server. (The specified string is not in the form required for an e-mail address.). If Exchange cannot be used in the way that Outlook did then how can we alert a group of users about SQL job failures ?
Therefore I tried specifiying an indiviual email address rather than a group ;
- sending a test message (right click database mail) using the full single email address works fine. - sp_send_dbmail using the full single email address is also fine.
ii) When a job fails the notifications do not seem to work. The Job history log just reports ; NOTE: Failed to notify 'Operator Name ' via email. The SQL Error log reports ; Message [264] An attempt was made to send an email when no email session has been established
However sysmail_help_status_sp indicates that database mail has started. The job fails to notify the operator and in this case it is a single email address.
Anybody got any suggestions, (thanks in advance) ?
I am using nt4.0 sp5 with sql7.0 sp3 and exchange client. Does anyone know how to keep xp_sendamil form putting a copy of the mail message in the sent mail folder or an automated process for deleting all mail in the sent folder? As it stands now I must manually delete all messages from the sent mail folder on a daily basis.
Is there any way to run SQL Mail with exchange CLOSED? Keeping Exchange always minimized seems rather unneedy, inexperienced developers might just have the tendency to close it. Is there any way to avoid that?
Also, can SQL Mail be configured with something else besides Exchange?
I setup a domain user account and e-mail account for the sql agent. When I want the agent to mail me a message when something happens it puts it in the out box but does not send until I pull up the outlook express and ping the server to send recieve. If I don't have outlook express running in the taskbar, it won't send the message at all. The e-mail is configured as an internet mail component. Any suggestions??
I saw from SWYNK that you were able to set up SQL Mail using Lotus Notes. I tried following the post by Edward Alexander but got into some trouble:
We were using MAPI to get to Notes Mail.
1. We know that MAPI works because we were able to send mail by a. using the exchange client (Windows Messaging client) b. using VB script to send a message with MAPI.Session
The problem is that SQL server cannot see the Exchange Profile that was defined on the SQL box.
Hi all, I'd like to link a SQL Server database / table to Microsoft Exchange Server E-Mail-Address data, for an Employee Directory project.
I've read a little about "Web Store", a little about ExOLEDB, but I've come across nothing along practical lines. I.e., I still don't know where to begin!
For example the "Web Store" should be created on the SQL server, but how do you create it? Any insights will be greatly appreciated.
I just read that if you use an exchange server...the account that youstart SQL with needs a mail on the exchange box.Is this true?I know I didn't need an account when I've set it up before...but Imight have been using a POP3 server.I have Outlook 2003 installed on the server. Windows 2003 Enterprise.Thanks.
I would like to configure e-mail alerts on my SQL Server 2000 box.However, we also run Exchange on the same machine. I've been told therecould be conflicts/issues having Outlook on the same machine asExchange; and apparently, one needs Outlook to configure a mail profilefor SQL Server Agent.Is there, in fact, anything to worry about? If so, are there anywork-arounds beside moving Exchange to another server? (we've only gotone server, so this is not an option for us at this time).Thanks.- Dana
I have a .NET app recently ported from 1.1 to 2.0 with a pending feature request. I'd first like to state that I'm not asking anyone for the programmatic answer, unless of course, you'd like to provide it. I'm simply asking the best way to accomplish this task with the tools I have available to me (VS 2005, SQL 2000 and 2005). I do not consider myself a professional .NET or T-SQL programmer but I do have a good understanding of the technologies so that I can find what I need to know once I know I'm going about something the right way. The application I wrote, from scratch, manages News, Featured Connections, and FAQs for a web site. It was designed in a multi-layer approach where there are: items -> assigned to categories -> assigned to users So if user Fred is granted rights to category A, when he authenticates to the app he can Add/Change/Delete any item in category A. Simple enough. But also what Fred can do is see all the other items other users have created and *schedule* any relevant item related to his web page to appear within his own items even tho he has no rights to change that item in the admin interface. The feature request is a notification service, so that Fred gets an e-mail when someone has added a new item or edited an existing one. I don't want Fred to get an e-mail *every* time an item is created or edited, that would be big bother and would generate lots of e-mails. What I'd like to do is send Fred an e-mail sometime in the middle of the night that informs him of the items added or changed since his last login, so that at his choosing he can go into the admin interface and schedule one or more of those items for his page. Should I just write a new console app that does this, compile it and schedule the .EXE to run at midnight? Or is there a better way to leverage the new features in SQL 2005 (extended strored procs, triggers) and .NET to do this a better way? Currently, the DB is in SQL 2000 but I have no problems moving it to SQL 2005 if that helps me in some way. Thanks in advance for your comments. ...Bill
I've recently converted from access to sql and am running into a problem matching records against a massive 60million record table..
The 60mil table consists of nothing more than telephone numbers in a varchar format and I need to compare other tables with this one and tag them as matched..
I am getting a ODBC timeout error and I have set my query time-out to 0..
Why would it call an ODBC driver and why would it timeout? HELP!
**the table is in the same table as my other stuff
I have a database with 2 users - 'dbo' and 'user1'.Currently:=> 'dbo' is tied to login - 'login1'=> 'user1' is not tied to any login.I want to change the login tied to the database users to:=> 'dbo' tied to no login=> 'user1' tied to 'login1'I try to use:sp_change_users_login 'Update_One', 'user1', 'login1'But it give me an error said 'login1' is already tied to a user.Then I try to remove the login tied to 'dbo' with this:sp_change_users_login 'Update_One', 'dbo', ''Then I get another error said that 'dbo' is a forbidden value for thelogin name parameter.------Previously, all the while 'dbo' is not tied to any login and 'user1' istied to 'login1', but yesterday I restore the DB from the backup filebring back from customer side, then I saw the login changed to the oneI mention above, I'm not sure whether is the DBA from customer sidechange it or what, but is there any way for me to change the login backto the state I want?Thanks.Peter CCH
Lokendra writes "I have configured the Database mail profile and account in Sql Server 2005 but the mail is not sending and showing the following error message:
Error,235,The mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 1 (2007-03-05T15:16:07). Exception Message: Cannot send mails to mail server. (Mailbox name not allowed. The server response was: Sorry<c/> that domain isn't in my list of allowed rcpthosts.). ),3000,90,,3/5/2007 3:16:07 PM,sa
but while in the same mail set up in previous instance of sql server 2005 the message was sending very well. After installing new instance of sql server 2005 the problem is arising.
Anybody can tell me that what I can do so that i can send mail using the SMTP databasemail account."
Our company use yahoo business mail server for our corporate mails. I know that I can configure database mail with SMTP. But when I try to configure database mail account with yahoo bizmail, I cannot do that. It gets configured but when I test it it doesn't send any mails. Do I need to have any special condiguration for this. SMTP address is smtp.bizmail.yahoo.com. Also I have specified the Authentication using my user name and password. Please help
I want to send a simple mail using DATABASE MAIL feature in SQL SERVER 2005.
I've defined a public profile. I've enabled Database Mail stored procedures through the Surface Area Configuration .
but I can't send a mail with sp_send_dbmail stored procedure in 'msdb' database .
when I execute sp_send_dbmail in the Managment Studio the message is "Mail queued" but the mail is not sent.
Could it be related to Service Broker?Because the Surface Area Configuration indicates:'this inctance does not have a Service Broker endpoint'.If so, how should I make an endpoint?
here is the log file after executing sp_send_dbmail:
1) "DatabaseMail process is started"
2) "The mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 2 (2007-03-08T00:49:29). Exception Message: Could not connect to mail server. (No connection could be made because the target machine actively refused it)."
The DatabaseMail90.exe is triggred ,so the mail is transfered to the mail queue but DatabaseMail90.exe couldn't give the mail to SMTP server.The promlem is what should I do to make DatabaseMail90.exe able to connect to the server?
Hello,I work for an attorney staff, so basically the whole day they aresending themselves a lot and a lot of papers (Word docs or Excellsheets).We are going to propose them the use of a Document Exchange andDatabase System (like Lotus Notes or Oracle Managment Content,formerly known as Internet File System IFS ) with .NET interfazes.Basically the idea is that instead of sending papers the whole day,they can use a software to check and manage more quickly theirdocuments.We are looking for a system that allows us to manage:- Security- Versioning- Folders- Check-in/Check-out- Workflow- Search and Retrieval- Extensible MetadataMy question is:1) Is there any Microsoft tool who can help us to achieve that(management of codes, dates, text, names of documents- I mean like aDocument Exchange and Database System) with .NET interface?2) Or do we have to built it from scratch?Thank you very much!Jorge
We have installation of Dbase Engine and SSIS that is PRODUCTION, and want to replace with newer hardware. In "the old days", we built "boxname_new" and installed SQL with "sqlname_new", took PROD users off-line, and quickly renamed original boxes/SQL and new boxes/SQL to original name, copied data and off we went with upgrade.
NOW, the "renaming" option for SQL tools is not supported, but with re-installation.
Has anyone developed game plan steps for accomplishing hardware upgrade, including SQL environment swap with MINIMAL downtime for PRODUCTION environment? Can you share?
I want to be able to see when records have been added to a table. The issue is we have a DTS job scheduled to run every night. The developer who wrote it password protected it and doesn't work here anymore. I want to add a step to this series of DTS jobs and want to run it just prior to his job. Is there a way to see when the records are being added or when this job is being run? Thanks again, you guys are the best.
The situation is I need info from a certain SharePoint site that is in a sql database. The problem is The SharePoint site currently contains data from 9 different projects, all using the same database. The database is a complex setup and it would not be an easy operation to extract the special information alone. The database is run with Microsoft SQL and is comprised of 4 separate databases. 3 databases organize the data (500+mb of data total) and 1 stores the data for all the sites (12.5+GB and increasing at a rate of 100-300mb per day).
How can I get the special data I need from this setup???
SELECT COUNT(*) FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'tab_db1'The above query will give the information of the table 'tab_db1' if it is available in the current database (say db1) connected.How can i access the information of a table (say 'tab_db2') which is created under a different database say db2 from the current db connected say db1.I tried the above query with changing the table_name to 'db2..tab_db2'but went invain.sysobjects also dint work..Any help on this will be appreciated..regards,Sathya V
I have a database that has a table with tons of data in it and it is getting close to the 999 days before it starts deleting the oldest records. Is there a way to allow the table to keep all of the information? I don't think there is, so here is my next question. Is there a way that I can move the entire table into another database to save all the information and start over with the 999 days? My main goal here is to not lose ANY information from any table from the database.
Also, I was thinking that when an entry is added into the main table, if it can also be added into the other table where I move the old data? I think a trigger can be used here, but I'm not sure how to do one in 2005. Thank you very much in advance for your help!!!
Creating custom Register form That inserts user info in to database via storeprocgetting following errorCompilation Error Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: BC30456: 'ValidateInput' is not a member of 'System.Web.UI.WebControls.TextBox'.
Source Error:
Line 3496: Me.__BuildControlTree(Me) Line 3497: Me.AddWrappedFileDependencies(Global.ASP.partfrm_aspx.__fileDependencies) Line 3498: Me.Request.ValidateInput Line 3499: End Sub Line 3500:
<tr> <td align="Left" colspan="2"> <h3> PARTICIPANT INFORMATION: </h3><hr /> Please enter information for the attendee and click 'continue'.</td>
<p> Your account has been successfully created. </p> <asp:Button ID="ContinueButton" runat="server" CommandName="Continue" Text="Continue" />
</asp:WizardStep> </WizardSteps> </asp:Wizard> > CODE-BEHIND 'This event handler fires when the user clicks Finish. We need to insert the new participant record into the database Protected Sub AddParticipant_FinishButtonClick(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.WizardNavigationEventArgs) Handles AddParticipantWizard.FinishButtonClick 'Insert the Participant into the database InsertPartDataSource.Insert()
'Send the user back to the homepage Response.Redirect("~/PartReg.aspx") End Sub
I use detach/attach method to move database to a new SQL Server 7 on MSCS. The security information was lost in the new server. Database Access permission was gone and I failed to select it again because message showed the database role is already exist. The default databases were also posted incorrectly. Would you please to tell me how to fix this type of peoblem or let me know how to move the login info such as login id, password, database permisson to the new server which locates in a different machine.
Hi, all, I found that the SQL2000 EM does not show database space allcoated information, as well as tables and indexes size while SQL 7.0 does. Someitmes these information are fairly handy. is there any other easy ways to find out the same info from SQL2000 through Em, or elsewhere ?? Thanks Anthony
I have seen a bunch of ways to get the size of all the tables within a database posted on this board. I decided to modify an older one I found here (http://www.sqlteam.com/item.asp?ItemID=282). I set it up so there is no cursors or temp tables. Pretty much just one select statement to return all the info you would need. It seems to be faster than anything I have seen so far. Take it for whats its worth. Thanks to the original creator.
/* Original by: Bill Graziano (SQLTeam.com) Modified by: Eric Stephani (www.mio.uwosh.edu/stephe40) */
declare @low int
select @low = low from master.dbo.spt_values where number = 1 and type = 'E'
select o.id, o.name, ro.rowcnt, (r.reserved * @low)/1024 as reserved, (d.data * @low)/1024 as data, ((i.used-d.data) * @low)/1024 as indexp, ((r.reserved-d.data-(i.used-d.data)) * @low)/1024 as unused from sysobjects o
inner join (select distinct id, rowcnt from sysindexes where keys is not null and first != 0) ro on o.id = ro.id
inner join (select id, sum(reserved) reserved from sysindexes where indid in (0, 1, 255) group by id) r on o.id = r.id
inner join (select c.id, dpages+isnull(used, 0) data from (select id, sum(dpages) dpages from sysindexes where indid < 2 group by id) c full outer join (select id, isnull(sum(used), 0) used from sysindexes where indid = 255 group by id) t on c.id = t.id) d on r.id = d.id
inner join (select id, sum(used) used from sysindexes where indid in (0, 1, 255) group by id) i on d.id = i.id