Enable DB Mail-slight Confusion

Jun 12, 2008

Good morning all.
I am new with SQL 2005, and am experiencing some confusion with how database mail can be enabled. The SQL Server Books online and the online documentation is a bit vague.

SQL Server Books online says DB Mail may be enabled in two ways:
1. SQL Server Surface Area Configuration Tool
2. Database Mail Confige Wizard

In another section of Books Online it says one may use a series of sp_configure stored procedures(I'll omit them). This section goes on to say that if one uses the Wizard then you do no need to execute the stored procedure enabling.

So, this means there are three ways to enable Database Mail, correct?

Thanks... great forum.
[8D

Talk sense to a fool and he calls you foolish.

View 2 Replies


ADVERTISEMENT

Enable Service Broker For DB Mail On SQL 2005 Cluster

Aug 31, 2006

I'm having problems enabling service broker for DB Mail on a SQL 2005 cluster, when I try to execute this sql it just hangs. Any ideas?

USE master ;
GO

ALTER DATABASE AdventureWorks SET ENABLE_BROKER ;
GO

View 10 Replies View Related

Integration Services :: Sending Mail With HTML Format In Send Mail Task

Aug 18, 2015

I have to send mail with HTML formatĀ  and attaching multiple files dynamically via send mail task.

View 10 Replies View Related

DB Mail And Notify Operator Through DB Mail Error Could Not Retrieve Item From The Queue

Feb 2, 2007

I've set up DB mail and sent a test e-mail and that comes through fine.

I set up an Operator with email Name: DWhelpton@k-and-s.com;MWeaver@k-and-s.com

I created a job and set up the notifications to e-mail the operator on failure.

When the job runs and fails, I do not get an e-mail and I get the following exception in the db mail log:

Date 2/2/2007 8:35:00 AM
Log Database Mail (Database Mail Log)

Log ID 402
Process ID 3936
Last Modified 2/2/2007 8:35:00 AM
Last Modified By NT AUTHORITYSYSTEM

Message
1) Exception Information
===================
Exception Type: Microsoft.SqlServer.Management.SqlIMail.Server.Common.BaseException
Message: Could not retrieve item from the queue.
Data: System.Collections.ListDictionaryInternal
TargetSite: Microsoft.SqlServer.Management.SqlIMail.Server.Controller.ICommand CreateSendMailCommand(Microsoft.SqlServer.Management.SqlIMail.Server.DataAccess.DBSession)
HelpLink: NULL
Source: DatabaseMailEngine

StackTrace Information
===================
at Microsoft.SqlServer.Management.SqlIMail.Server.Controller.CommandFactory.CreateSendMailCommand(DBSession dbSession)
at Microsoft.SqlServer.Management.SqlIMail.Server.Controller.CommandFactory.CreateCommand(DBSession dbSession)
at Microsoft.SqlServer.Management.SqlIMail.Server.Controller.CommandRunner.Run(DBSession db)
at Microsoft.SqlServer.Management.SqlIMail.IMailProcess.ThreadCallBack.MailOperation(Object o)


What step am I missing?

View 1 Replies View Related

XP_sendmail Puts Copy Of Mail In Sent Mail Of Exchange Client.

Jul 9, 2001

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.

Thanks,

Ed.

View 6 Replies View Related

SMTP Database Mail Showing Error While Sending Mail

Mar 7, 2007

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."

View 1 Replies View Related

SSIS Send Mail Task - Failure Sending Mail

Dec 13, 2007

Dear all,
I have switched off the firewall settings on my system and as suggested im entering the minimal information and data to send the mail.
but still the Mail Task is failing..
plz suggest.

View 11 Replies View Related

SSIS Send Mail Task - Failure Sending Mail

Jun 8, 2006

Hi Everyone,

Hopefully someone out there will have an idea as this is driving me nuts.

I've setup a task to email on success/failure and keep receiving the following message when executed:

Progress: The SendMail task is initiated. - 0 percent complete
[Send Mail Task] Error: An error occurred with the following error message: "Failure sending mail.".
Progress: The SendMail task is completed. - 100 percent complete
Task Send Mail Task failed

When I configure Outlook Express on the same machine with the same settings it works.

On the SMTP Connection Manager I have left the default name, tested with both an IP address and Server Name, and no authentication or SSL.

On the Send Mail Task, it uses the above connection. The To: , From: , Subject fields are populated. Message SourceType is DirectInput, MessageSource is Test, Priority is Normal and no attachments or expressions etc.

Nothing useful is logged in the Event Viewer even with full logging turned on.

Any suggestions appreciated,

Thanks.









View 11 Replies View Related

Configure SMTP Server Mail To Send Mail

Feb 10, 2008

Hello,
The Database Mail feature is already enabled on the server, also I have a mail account on the other server.
The problem I faced is that I need to send mail from my SQL Server using a created email account on the other server. How should I configure my email to do that ?
Should I use a sysmail_add_account procedure to enable account, also set profile and profile account ? Does this way creates server mail account that is binded with other email account?
The mail should be sent from my SQL Server.
Thank You.

View 3 Replies View Related

Database Mail With Yahoo Business Mail Server

Feb 20, 2008

Hi all....

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

Thanks

Rajesh

View 10 Replies View Related

Error Sending Mail With Send Mail Task

Feb 6, 2008

I keep getting a generic "Error Sending Mail" error. For testing purposes I am just trying to send using my own email account. What goes in the SMTP Server box in the connection manager? I have tried:

A - the exchange server address (SOMETHING.us.company.com)
B - The SMTP properties I see when I look at the properties of my email address: (my.name@abcd.efgh.company.com)
C - Just the end portion of the SMTP properties: (abcd.efgh.company.com)
D - My email address (my.name@company.com)

I don't know what to enter, or what is giving me such a generic error message.

View 7 Replies View Related

Help With Mail That Send Mail When Database Bakcup Fails

Sep 1, 2006

Hello

I have got a script which gives the mail to the dba mail box when database backup fails.

In the script I want to make a change so that I get the particular database name , on what ever database i implement.

Can you tell me some suggestions.

The script I am using is :



use master
go
alter PROCEDURE dbo.SendMail
@to VARCHAR(255),
@subject VARCHAR(255),
@message VARCHAR(8000)
AS
BEGIN
SET NOCOUNT ON;
DECLARE
@rv INT,
@from VARCHAR(64),
@server VARCHAR(255);
SELECT
@from = 'testsql2000@is.depaul.edu',
@server = 'smtp.depaul.edu';


select @message = @message + char(13) + Char(13) + @@servername + '-'+ db_name()+ '-' + 'Backup Status Failed' + Char(13)

EXEC @rv = dbo.xp_smtp_sendmail
@to = @to,
@from = @from,
@message = @message,
@subject = @subject,
@server = @server;
END
GO




--- After the above script is run the following should be given in the 2nd step when
--- the backup jobs are scheduled ------

exec master.dbo.sendmail
@to = 'dvaddi@depaul.edu',
@subject =' Test sqlserver 2000',
@message = '' ;




Thanks

View 4 Replies View Related

Sending Mail To Several Users With Send Mail Task ?

Nov 10, 2006

I know you can specify additional recipients in the To column by sepperating them with a semicolon. But whats the easiest way to send to several users, when the email address must be retrieved from a table with a query like this:

select email from problem_subscribers

where project = 'project1'

and statusmail = 'OnError'

So when the eventhandler gets an OnError i want the mail task to be sent to each problemsubscriber.



View 3 Replies View Related

DTS Confusion...

Nov 28, 2001

I'm using DTS for the first time and am having difficulty understanding some of its usage.
In essence, I have 70 tables which are on an ORACLE database. I've created the schema on SQLServer from an ERWin model. I now wish to use DTS to import the data into SQLServer. Of course there are referential integrity constraints. The DTS 'import wizard' seems oblivious of these and carries out the import in alphabetical order!
I'm now trying the DTS designer (which I don't fully understand yet). It appears that I have to create a workflow which moves the workflow from table to table in the order dictated by RI - this is not a trivial task! (I want point and click!!).
Are there any shortcuts I can take to have DTS automatically arrange the workflow in the correct order? Can I do it programaticaly? I don't want to have to fiddle with 140 'workflow' and 'success' links.
Cheers.

View 1 Replies View Related

Confusion In AWE

Apr 26, 2007

suppose i have enabled only AWE option in sql server but i didn't add 3

GB switch in boot.ini. in this case what will be the effect on physical memory?

View 9 Replies View Related

SQLExpress ASP.NET Confusion

Jul 19, 2006

Hello,I am just getting reaquainted with programming and all. I work in GIS mapping and am having diffilculty using  a ASP.net internet Map site and adding records to a needed database.I would like to be able to add records to a linked SQLExpress table when the user clicks on a map location. I adapted the following code snippet from an example that does what I would like only using an .mdb file.CODE:    // create connection to database                        var connection;                        connection = Server.CreateObject("ADODB.Connection");                        connection.Open("Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=OutdoorsExp;Data Source=NOLOGOSQLEXPRESS;");                        status = "Can't access 'FishSQL' table.";                        // create recordset                        var recordset;                        recordset = Server.CreateObject("ADODB.Recordset");                        recordset.CursorType = 1                        recordset.LockType = 3;                        recordset.Open("dbo.FishTable", connection);                                                status = "Can't append new record.";                        // append record for clicked location                        recordset.AddNew();                        recordset.Fields("LongitudeI").Value = xco;                        recordset.Fields("LatitudeI").Value = yco;                                                recordset.Update();                        recordset.Close();                        // release the .mdb file                        connection.Close();However, this does not add anything to the SQLEx table. What am I missing? I am thinking that it might have something to with the primary key.I had a table with way more columns then just lat/longs (as above) but only coded it to add data to the latitude and longitude fields. Nothing got added of course. Would have to add data to every field that doesnt allow nulls.How do I generate a random, unique ID for a primary key on the fly and for example add it to the appropriate column.Thanks you in adavnce for any insights.

View 1 Replies View Related

Proc_problem Confusion

Nov 3, 2006

hi
i'm trying to write a stored_proc which involves 3 tables. Product, Orders and OrderDetails
i want to return products that haven't sold for a particular month. So these products aren't in the OrderDetails table. When i try and run this i get some really random results. when i change the Orders.OrderDate value to different months, i get the same result when i shouldnt. but then when i add the Orders.OrderDate row to the select statement, i get 400 results and i dont have that many products. the extended amounts are just for my datagrid
ALTER PROCEDURE proc_Report_NoSales_Septasset nocount onSELECT              Product.productID, Product.Title, Product.QtyOnHand, Product.Category, 0 as ExtendedAmount,              Product.BuyPrice, 0 as ExtendedAmount2 from       Orders, OrderDetails, Productwhere     Orders.OrderDate > '2006-09-01' and Orders.OrderDate < '2006-10-01'and        Orders.OrderID = OrderDetails.OrderID  and        Product.ProductID not in (Select distinct OrderDetails.ProductID from OrderDetails)/* Product.ProductID NOT EQUAL to OrderDetails.productID */and        Product.productID <> OrderDetails.productIDGROUP BY             Title, BuyPrice, Category, Product.ProductID, QtyOnHandORDER by            TitleRETURN
any ideas
cheers!!!

View 2 Replies View Related

Very Simple Confusion

Nov 7, 2006

hay friends
scene is that i wana read single multiple rows of a single column from a sql database and then want to shows those values in text box,,,
so plz tell me ho to do it.
 By using data set ,,data table or what to use for this and how....
wll be waiting for ur coordination

View 1 Replies View Related

Instance Confusion

Jul 26, 2007

I have built an application in web developer that has a sql data base in the App_Data
folder. It works locally fine.
I have uploaded it to my web host client successfully and it all displays. The web host is enabled
for asp.net.  But the sql data base is not working....no information is getting from the web application into
my instance of sql in App_Data.
My web host has given me an      e:/webs/mywebsitename.com/data/nameofdb.mdf
to alter in my web config connection string which I have done, but still not working.
I have also tried  every version of this in connection string without success
Im just confused about the e:  part................how is that going to get to my App_Data?
Can someone give me a quick overview of what the problem might be
richard

View 1 Replies View Related

DateTime Confusion.

Oct 25, 2007

Hi All,I'm stumped. I've got a stored procedure with a  number of input parameters, and working fine.I added two extra input parameters, FromDate datetime, ToDate datetime. I have not even included these in the SQL yet and just tried to execute the stored proc alone with manually inputting paramters, but I keep getting error: @FromDate: this input parameter cannot be converted.That surely means a formatting issue, so I copy and pasted a value directly from the database into this parameter field, and still get the same error. I've tried various formats, with single and double quotes, and without. But just dont know?And even when I populate these parameters in my code and call the stored proc, it returns no results either, even though I haven't included these new date paramters in the SQL select, so that means it was in error and no doubt a formatting issue on those date fields.format I used was:  17/07/2007 00:00:00 I tried to populate the parameters via the code as follows:            Dim dt As DateTime            DateFromTB1.Text = DateTime.Now            DateTime.TryParse(DateFromTB1.Text, dt)            SqlDataSource1.SelectParameters("FromDate").DefaultValue = dt I know there is an extra step for now (DateFromTB1.Text = DateTime.Now), this step will fall away and just parse the textbox.text field as entered by the user.Any help appreciated, thanks.  

View 4 Replies View Related

My ISNULL Confusion

May 1, 2008

I've got this query and it use to work or at least I thought it did. Could someone please help me with it.
Thank you
SELECT CID, CompletionDate, MarkedExport, CustomerName, EditUser, RouteID, WorkOrder FROM RouteCustomer WHERE (CompletionDate IS NOT NULL) AND (ExportDate IS NULL) AND (RouteID LIKE '%' + ISNULL(RouteID,@RouteID) + '%') AND (EditUser IS NULL OR EditUser = '' OR EditUser = @EmployeeID) AND (MONTH(CompletionDate) = ISNULL(MONTH(CompletionDate),@Month))
The problem comes with in the WHERE clause. What I wanted it to do is if the user did want to use a RouteID critera then the user would speified one else it wouldn't, and it was my belief that the ISNULL feature in SQL was the answer for that. same for the Month. I believe the EditUser is fine the way it is written.
thanks to anyone that can help me with this.
 Rex

View 9 Replies View Related

Connection Confusion

Apr 27, 2005

When I try to run my application on our server I cannot connect to the SQL Server that's on the same machine (a named instance). I get the SqlException:Login failed for ("null") user. Not a trusted SQL Server connection. I CAN however, connect to this database from the IDE on my laptop--the app works just fine.
I have reconfigured the IIS, the default site and the directory for the app: I turned off anonymous access, turned it on, changed users, changed passwords, etc. I have done the same for the database, added users, changed permissions, added permissions, etc., you get the picture...none of it worked. (I changed the connection string to those users/pwds)
I saw on an MS site that this error can occur under heavy loads...but that's not the case here.
Please help! Thanks!!

View 2 Replies View Related

Locking Confusion

Jun 15, 2000

In Query Analyzer I have 2 connections active. In the first connection I have the following SQL Insert statement:

Begin Tran
Update Account
Set SomeField = 0
Where CustomerId >= 1000 And CustomerId <= 1101

-----------------

In the second connection I have the following SQL Insert statement

Begin Tran
Insert Into Account (Account,AccountName,AccountTypeRowId,CustomerId,U serId)
Values('MMM-989', 'Test Account', 1, 1098,207 )

-----------------

The query in the second connection will hang waiting for the query in the first connection to finish. The query in the first connection touches 767 records (out of a total of 9174).

If I change the Where statement in the first connection to "... And CustomerId <= 1100", the query in the second connection will execute immediately. The query in the first connection is now only touching 645 records instead of 767.

Could someone explain to me why this is happening?

View 3 Replies View Related

Trans Log Confusion

Nov 5, 2002

:confused:

Here's my situation (SQL2K)

We have a testing database we're using to convert large amounts of data from 1 system to another. We might process 5-6 million records, but don't care about being able to recover point-in-time.

I set recovery mode to simple, do a full backup every night. I keep getting large transaction logs. I manually run Shrink Database when I realize the logs are big

What can I do to prevent the logs from getting big in the first place ?? Can I prevent logging from happening ?

I keep reading various books and BOL, but I guess I don't quite "get it" yet ......

Any plain spoken, detailed suggestions would be very appreciated .... thanks in advance.

View 5 Replies View Related

Domain Confusion?

Feb 24, 2002

I can map to a domain to the server where I have a sql Server database from my machine which is in another domin.
However, I cannot register the sql server with enterprise manager from the same machine. I am assuming that it is not a permission problem since I could not get the registration to work logging on as SA or with windows authorization. What should be looked at?

View 1 Replies View Related

Query Confusion...

Dec 11, 2006

Here's an example of two tables I need to get results from.

Client:
Number
1
2
3

Patient:
Number - Client - Hospitalized
50 - 1 - E
51 - 1 - E
52 - 2 - E
53 - 2 - ''
54 - 3 - ''


The only result I should be returning is Client '1' as they would be the only one where ALL patients have an 'E' under patient.hospitalized.

How would I go about running a query such as this?

Any help would be greatly appreciated!
Shawn

View 1 Replies View Related

Performance Confusion

Jun 29, 2006

Hi,
Can any of you folks take a minute to tell me why the results of the attached test are weird. I'm trying to come up with a method of allowing my business layer to interact with the data layer - specifically a nice, easy to maintain, but safe method of passing parameters without adversely impacting performance.

This is only a few of my sketchy ideas so far but I'm stuck because I cannot prove that using OR is slower than a straightforward = because each time I run the test the OR seems to perform better. Even changing the sequence in which the piece work still does alter the OR begin better than =.

And, of course, as that makes no sense whatsoever I cannto really progress.

Any thought would be appreciated. I hope I have altered the script enough that you can just run it straight in and see what I'm talking about. I only introduced the transactions to see if any of that stuff my be interfering.

Thanks.

View 7 Replies View Related

Mirroring Confusion.

Aug 10, 2006

I am testing out Synchronous Mirroring and have a question about failover. It seems the only way I can failover to the Mirror box is to log onto the Principal box and hit the Failover button? Is the whole point of mirroring to be able to handle the Principal not being available? Is there another way?

TIA, ChrisR

View 4 Replies View Related

Confusion About Indexes

Apr 10, 2008

Hi guys,
Is it possible for a column in a table to have a clustered index & the same column to be a part of a non clustered covering index.
Please try this one.I am confused
Create table test
(
id int primary key,
name varchar(40),
age int
)
CREATE NONCLUSTERED INDEX testindex ON test (
id,
name,
age
)

sp_help test

After I do sp_help test it shows two indexes created, one on id & the other one on id,name& age as a part of covering index.

View 4 Replies View Related

Dateadd Confusion

Aug 10, 2005

I am trying to find a group of clients that were entered last week. I am getting all the dates to go with the Monday of the week they were entered. i.e. If they were entered on 8-2 or 8-3, they go with 8-1. If they were entered, 8-9, they will be under the 8-8 Monday.

No problem with finding the Mondays using either the nice 'weekcommence' function I found here or using numerous t-sql examples.

One thing I don't understand is- how come I can't use an equal sign in my syntax?

For instance,

SELECT dbo.weekcommence(date_added)
FROM clients
where dbo.weekcommence(date_added) = dateadd(wk, -2, GETDATE() )

won't return any results. If I use a greater than sign, I get this week, 8-8 and last week 8-1. I only want to see the week of 8-1.

Now- look at what I have below: Shouldn't I really be able to see ONLY last week's Mondays with this?

select dateadd(wk, -2, dbo.weekcommence(date_added))from clients

To me- the way this reads is: show me 2 weeks ago, from these dates (first Mondays function).
The results are the last two MONTHS, not weeks. What am I misinterpreting?

I can also use this:

SELECT dbo.weekcommence(date_added) FROM clients
WHERE (dbo.weekcommence(date_added) >= dateadd("d",-7,DATEADD(wk, DATEDIFF(wk,1,getdate()), 0)))

and get the week's of 8-1 and 8-8. But I can't get JUST 8-1 if I take out the greater than sign.

To me- this one reads: Select all my Mondays from the function. Show me Mondays from my function that are = 7 days from this Monday's date.

It seems like it should be straightforward, but I'm obviously missing something big. Any help?

View 8 Replies View Related

Datediff Confusion

Jun 22, 2007

I have a DELETE statement that is taking ages. I was asked to look into it and immediately noticed the use of function on the column. So its doing a scan even though there is an index on the datecolumn.

HEre's the original statement:
Delete someTable Where datediff(year, DateColumn, getdate()) > 1

I have rewritten it as

Delete someTable Where DateColumn < dateadd(year, -1, getdate())

When I did a count(*) the counts from previous query didnt match with the new one. Did i miss something?
Perhaps a fresh pair of eyes might help me

thanks,
don.

View 6 Replies View Related

Login Confusion

Jul 23, 2005

Hi,I am Just beginning to get to grips with SQL Server v 7 security on a standalone win 98 PC.I have created a login which only has access to the pubs database and when Itry and connect to any other database (while using this login) I amcorrectly told that I don't have access. However, Enterprise Manager doesnot request a login and therefore the log in seems to grant full access toevery database.How can I get Enterprise Manager to request a log in?Thanks.

View 2 Replies View Related

Confusion Over ANY Keyword

Jul 23, 2005

I am studying for the MSCE/MCDBA exam 70-229. In the book I am using("MCSA/MCSE/MCDBA Self-Paced Training Kit: Microsoft SQL Server 2000Database Design and Implementation Exam 70-229, Second Edition") I amlooking at the section on the ANY/ALL keyword.<QUOTE>USE PubsSELECT TitleFROM TitlesWHERE Advance > ANY(SELECT AdvanceFROM Publishers INNER JOIN TitlesON Titles.Pub_id = Publishers.Pub_idAND Pub_name = 'Algodata Infosystems')This statement finds the titles that received an advance larger thanthe minimum advance amount paid by Algodata Infosystems (which, in thiscase, is $5,000). The WHERE clause in the outer SELECT statementcontains a subquery that uses a join to retrieve advance amounts forAlgodata Infosystems. The minimum advanceamount is then used to determine which titles to retrieve from theTitles table.</QUOTE>I don't understand why this references the "minimum advance". If yourun the subquery on its own, it returns the following values:5000.00005000.00005000.00007000.00008000.0000NULL[color=blue]>From my limited understanding, the "ANY" keyword applies to at least[/color]one value, but which one? How is this determined?Any help gratefully received.Edward--The reading group's reading group:http://www.bookgroup.org.uk

View 4 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved