Click here to Skip to main content
15,892,059 members
Home / Discussions / Database
   

Database

 
GeneralRe: Self-join to return either/or results? Pin
Chris Meech18-Nov-11 7:46
Chris Meech18-Nov-11 7:46 
QuestionSSIS - SQL Job Pin
Sun Rays17-Nov-11 5:41
Sun Rays17-Nov-11 5:41 
Question"Lazy Spool" problem Pin
Bernhard Hiller17-Nov-11 1:00
Bernhard Hiller17-Nov-11 1:00 
AnswerRe: "Lazy Spool" problem Pin
R. Giskard Reventlov17-Nov-11 1:47
R. Giskard Reventlov17-Nov-11 1:47 
JokeRe: "Lazy Spool" problem Pin
Bernhard Hiller18-Nov-11 0:46
Bernhard Hiller18-Nov-11 0:46 
AnswerRe: "Lazy Spool" problem Pin
Jörgen Andersson17-Nov-11 3:45
professionalJörgen Andersson17-Nov-11 3:45 
GeneralRe: "Lazy Spool" problem Pin
Bernhard Hiller18-Nov-11 0:47
Bernhard Hiller18-Nov-11 0:47 
QuestionDatabase Mail 2008 problem Pin
Falconapollo16-Nov-11 22:49
Falconapollo16-Nov-11 22:49 
I have configured SQL Server 2008 Enterprise --Database Mail with the SQL below. But when I try to send mails with my hotmail e-mail account, I just get the error message(
SQL
select * from msdb.dbo.sysmail_event_log;
):
Quote:
The mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 24 (2011-11-17T17:20:53). Exception Message: Could not connect to mail server. (A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 74.125.53.109:25)

I have tried several email account, like hotmail(smtp.live.com), QQ(smtp.qq.com), gmail(smtp.gmail.com) and 163(smtp.163.com), but what I got was the same message as above.

Any help would be greatly appreciated!

-- ENABLE DATABASE MAIL FEATURE IN SYSTEM CONFIGURATION
	use master
	go
	sp_configure 'show advanced options',1
	go
	reconfigure with override
	go
	sp_configure 'Database Mail XPs',1
	go
	reconfigure
	go
	 
	-- DECLARE DATABASE MAIL ACCOUNT PARAMETERS
	Declare @qmail_account_name as varchar(64);
	Declare @qmail_account_description as varchar(64);
	Declare @qmail_account_email_address as varchar(64);
	Declare @qmail_account_display_name as varchar(64);
	Declare @qmail_account_username as varchar(64);
	Declare @qmail_account_password as varchar(64);
	Declare @qmail_account_mailserver_name as varchar(64);
	
	-- DECLARE PROFILE PARAMETERS
	declare @qmail_profile_profile_name as varchar(64);
	declare @qmail_profile_description as varchar(64);
	
	-- DECLARE PRINCIPLES
	declare @qprincipal_name as varchar(16);
	
	-- SET SMTP ACCOUNT DETAILS, USERNAME AND PASSWORD HERE
	set @qmail_account_mailserver_name = 'smtp.live.com'-- SMTP Server Name
	set @qmail_account_username='hellomoney'  -- SMTP User Name
	set @qmail_account_email_address = 'hellomoney@hotmail.com' -- Email Address
	set @qmail_account_password='123'  -- PASSWORD FOR SMTP User
	
	
	set @qmail_account_name = 'TestAdministrator'
	set @qmail_account_description = 'Mail account for administrative e-mail.'
	set @qmail_account_display_name = 'Test Automated Mailer'
	
	-- PROFILE PARAMETERS ASSIGNMENT
	set  @qmail_profile_profile_name = 'MyEmailServiceProfile'
	set  @qmail_profile_description = 'Profile used for database mail jobs'
	
	--PROFILE TYPE
	set @qprincipal_name= 'public'
	if ( @qmail_account_mailserver_name = '' or  @qmail_account_username=''  or  @qmail_account_email_address = ''  or @qmail_account_password='' )
	begin
	        Select 'Please enter SMTP details' as [Comments]
	end
	else
	Begin
	            if exists(select * from  msdb.dbo.sysmail_account where [name]=@qmail_account_name)
	            begin
	            exec msdb.dbo.sysmail_delete_account_sp @account_name = @qmail_account_name
	            end
	
	            EXECUTE msdb.dbo.sysmail_add_account_sp
	              @account_name = @qmail_account_name,
	                @description = @qmail_account_description,
	                @email_address = @qmail_account_email_address,
	                @display_name = @qmail_account_display_name,
	                @username=@qmail_account_username,
	                @password=@qmail_account_password,
	                @mailserver_name = @qmail_account_mailserver_name
	
	            if exists(select * from  msdb.dbo.sysmail_profile where [name]=@qmail_profile_profile_name)
	            begin
	            exec msdb.dbo.sysmail_delete_profile_sp @profile_name = @qmail_profile_profile_name
	            end
	
	            EXECUTE msdb.dbo.sysmail_add_profile_sp
	                   @profile_name = @qmail_profile_profile_name,
	                   @description = @qmail_profile_description
	
	            EXECUTE msdb.dbo.sysmail_add_profileaccount_sp
	                @profile_name = @qmail_profile_profile_name,
	                @account_name = @qmail_account_name,
	                @sequence_number = 1
	
	            EXECUTE msdb.dbo.sysmail_add_principalprofile_sp
	                @profile_name = @qmail_profile_profile_name,
	                @principal_name = @qprincipal_name,
	                @is_default = 1 ;
	end
SQL


AnswerRe: Database Mail 2008 problem Pin
Mycroft Holmes16-Nov-11 23:15
professionalMycroft Holmes16-Nov-11 23:15 
QuestionNeed help...asp.net count sql.. Pin
mat daus16-Nov-11 21:33
mat daus16-Nov-11 21:33 
AnswerRe: Need help...asp.net count sql.. Pin
Mycroft Holmes16-Nov-11 21:43
professionalMycroft Holmes16-Nov-11 21:43 
GeneralRe: Need help...asp.net count sql.. Pin
mat daus16-Nov-11 21:51
mat daus16-Nov-11 21:51 
GeneralRe: Need help...asp.net count sql.. Pin
Mycroft Holmes16-Nov-11 23:12
professionalMycroft Holmes16-Nov-11 23:12 
GeneralRe: Need help...asp.net count sql.. Pin
mat daus16-Nov-11 21:58
mat daus16-Nov-11 21:58 
QuestionError in sql command when using ado in VC++ and unicode Pin
mazen keeikati16-Nov-11 11:06
professionalmazen keeikati16-Nov-11 11:06 
QuestionError in sql command when using ado in VC++ and unicode Pin
mazen keeikati16-Nov-11 11:05
professionalmazen keeikati16-Nov-11 11:05 
AnswerRe: Error in sql command when using ado in VC++ and unicode Pin
Mycroft Holmes16-Nov-11 13:40
professionalMycroft Holmes16-Nov-11 13:40 
GeneralRe: Error in sql command when using ado in VC++ and unicode Pin
mazen keeikati17-Nov-11 9:20
professionalmazen keeikati17-Nov-11 9:20 
AnswerRe: Error in sql command when using ado in VC++ and unicode Pin
Luc Pattyn17-Nov-11 9:28
sitebuilderLuc Pattyn17-Nov-11 9:28 
QuestionTrying My First DataGridView Project Pin
Roger Wright15-Nov-11 20:26
professionalRoger Wright15-Nov-11 20:26 
AnswerRe: Trying My First DataGridView Project Pin
thatraja15-Nov-11 21:05
professionalthatraja15-Nov-11 21:05 
GeneralRe: Trying My First DataGridView Project Pin
Roger Wright16-Nov-11 5:09
professionalRoger Wright16-Nov-11 5:09 
AnswerRe: Trying My First DataGridView Project Pin
Wayne Gaylard16-Nov-11 17:55
professionalWayne Gaylard16-Nov-11 17:55 
GeneralRe: Trying My First DataGridView Project Pin
Roger Wright16-Nov-11 18:18
professionalRoger Wright16-Nov-11 18:18 
GeneralRe: Trying My First DataGridView Project Pin
Wayne Gaylard16-Nov-11 18:24
professionalWayne Gaylard16-Nov-11 18:24 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.