We've checked the KB files on this and also walked through all the steps
outlined in Q263556 and we're still gettting this problem.
We can send e-mail via Outlook 2000 so it appears not to be our Outlook /
Exchange configuration.
All the services that are suppose to be running for SQL mail are running.
Any assistance would be appreciated.
Thanks
David
Regards
Vishal Anand
Microsoft SQL Server Support
Of course, this posting wouldn't be complete without a nice, juicy
disclaimer from our lawyers: This posting is provided "AS IS" with no
warranties, and confers no rights. You assume all risk for your use. © 2001
Microsoft Corporation. All rights reserved.
--------------------
| From: "David Jung" <david...@mullinconsulting.com>
| Subject: SQL Mail can't find MAPI Profile
| Date: Thu, 1 Nov 2001 16:16:57 -0800
| Lines: 22
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
| Message-ID: <O0MP1OzYBHA.2052@tkmsftngp02>
| Newsgroups: microsoft.public.sqlserver.tools
| NNTP-Posting-Host: 63.150.114.2
| Path: cppssbbsa01.microsoft.com!tkmsftngp01!tkmsftngp02
| Xref: cppssbbsa01.microsoft.com microsoft.public.sqlserver.tools:8057
| X-Tomcat-NG: microsoft.public.sqlserver.tools
When we click the drop-down listbox in the SQL Mail config, there aren't any
profiles listed. Is this normal? Can this be any indication that something
else (like a service) is misconfigured preventing SQL from seeing the
profile?
Thanks
David
"Vishal Anand[MS]" <vishala...@microsoft.com> wrote in message
news:zbYRA28...@cppssbbsa01.microsoft.com...
Regards
Tony Bain
www.sqlserver.co.nz
"David Jung" <david...@mullinconsulting.com> wrote in message
news:efP90ZAZBHA.1220@tkmsftngp03...
1. Did you create the mail profiles while logged in as the same Windows user as your SQL Server
services are using?
2. Are SQL Server and Agent using the same Windows account?
--
Tibor Karaszi, SQL Server MVP
Archive at: http://groups.google.com/groups?oi=djq&as_ugroup=microsoft.public.sqlserver
"David Jung" <david...@mullinconsulting.com> wrote in message
news:O0MP1OzYBHA.2052@tkmsftngp02...
Any other suggestions would be greatly appreciated.
Thanks
David
"Tony Bain" <to...@sqlserver.co.nz> wrote in message
news:#z6jAGWZBHA.224@tkmsftngp07...
Hmm...I don't recall if I did or not. I'll try it again.
> 2. Are SQL Server and Agent using the same Windows account?
Yes...they are using the same Windows account.
Thanks
David
Matt
"David Jung" <david...@mullinconsulting.com> wrote in message
news:#yzVGBYaBHA.1908@tkmsftngp03...
--
Richard Waymire, MCT, MCSE, MCDBA
I've been "encouraged" to share this helpful information from our lawyers.
This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use. © 2001 Microsoft Corporation. All rights
reserved.
"Matt House" <mho...@lmi.org> wrote in message
news:#LP9y7VbBHA.1856@tkmsftngp05...
Article Q263556 contains a very detailed description of SQL Mail in SQL
Server version 6.5, 7.0 and 2000. In addition to the standard answers on
how to fix xp_sendmail problems, it includes a brief description of SQL
Mail's interaction with the Outlook Security Patch (version 9.0.0.4201). On
SQL 7.0, SQL Mail will not work on a machine that has the Outlook Security
Patch installed!
Check Q263297 for information on how to specify exception rules in Exchange
that will allow SQL Mail to run. I made the changes described and finally
was able to get xp_sendmail to work. It's unfortunate that so many people
have posted descriptions of the same or similar problems in SQL Mail 7.0,
and yet the answer was fairly well hidden.
Let me know if this works.
Matt
"Matt House" <mho...@lmi.org> wrote in message
news:#LP9y7VbBHA.1856@tkmsftngp05...
If you are still finding this to fail, can you run the following script and
post the output:
--
-- sqlmailtest.sql
-- performs basic tests to verify SQL Mail environment
--
-- !!!SQL Server 2000 and Windows NT only!!!
--
set nocount on
print 'Starting SQL Mail test'
print ''
print 'user is logged into SQL Server as ' + suser_sname()
Declare @regMapikey nvarchar(256)
Declare @DefMapiClient nvarchar(256)
set @regMapikey = N'SOFTWARE\Clients\Mail'
exec master.dbo.xp_regread N'HKEY_LOCAL_MACHINE',
@regMapikey,
N'',
@DefMapiClient OUTPUT,
N'no_output'
print 'Default mail client is ' + @DefMapiClient
go
-- =============================================
-- Temp table to store profiles
-- =============================================
if exists (select * from tempdb.dbo.sysobjects where id =
object_id(N'tempdb..#sqlmailtest'))
drop table #sqlmailtest
create table #sqlmailtest
(
[Profile Name] nvarchar(128) not null,
[Is default profile] int not null default -1
)
-- =============================================
-- Variables
-- =============================================
declare @rc int
declare @p1 nvarchar(128)
declare @p2 nvarchar(128)
declare @profile nvarchar(128)
declare @regkey nvarchar(256)
declare @accnt nvarchar(128)
-- =============================================
-- Check if running SQL Server 2000
-- =============================================
select substring(convert(nvarchar(20), serverproperty('ProductVersion') ),
1, 4)
-- =============================================
-- Check if running Windows NT or Windows 2000
-- =============================================
-- =============================================
-- Check if not running SQL as LocalSystem
-- =============================================
select @p1 = convert(nvarchar(128), serverproperty('MachineName')),
@p2 = convert(nvarchar(128), serverproperty('InstanceName'))
-- @rc 0 = LocalSystem, 1 = running under account
exec @rc = master.dbo.xp_MSLocalSystem @p1, @p2
if (@rc = 0)
begin
raiserror('SQL Mail not supported running SQL Server under
LocalSystem', 19, 1) with log, nowait
print ''
print 'SQL Server is running under the LocalSystem account'
print 'SQL Mail is not able to be used under this account'
print 'please change to a domain or machine account with a'
print 'MAPI profile attached.'
return
end
-- =============================================
-- Get account name running SQL Server
-- =============================================
if (@p2 is null)
select @regkey = N'SYSTEM\CurrentControlSet\Services\MSSQLServer'
else
select @regkey = N'SYSTEM\CurrentControlSet\Services\MSSQL$' + @p2
exec master.dbo.xp_regread N'HKEY_LOCAL_MACHINE',
@regkey,
N'ObjectName',
@accnt OUTPUT,
N'no_output'
print 'SQL Server is running under account ' + @accnt
-- =============================================
-- Check if MAPI32.DLL is present
-- =============================================
-- xp_fileexist '%WINDIR%\system32\mapi32.dll'
-- =============================================
-- Is there a default profile (test 1)
-- =============================================
insert into #sqlmailtest([Profile Name]) exec @rc =
master.dbo.xp_get_mapi_default_profile
if (@rc <> 0)
print 'Warning: No default MAPI profile present (test 1)'
truncate table #sqlmailtest
-- =============================================
-- Enumerate all existing MAPI profiles for this account
-- =============================================
insert into #sqlmailtest exec @rc = master.dbo.xp_get_mapi_profiles
if (@rc <> 0)
print 'Error: enumerating MAPI profiles'
-- =============================================
-- Are there any MAPI profiles
-- =============================================
if not exists (select * from #sqlmailtest)
begin
raiserror('Error: No MAPI profile(s) present', 19, 1) with log, nowait
return
end
-- =============================================
-- Is there a default profile in the list
-- =============================================
declare @defprof int
select @defprof = count(*) from #sqlmailtest where [Is default profile] = 1
if (@defprof = 0)
print 'Warning: No default MAPI profile present (test 2)'
-- =============================================
-- test each profile
-- =============================================
print ''
declare mapicursor cursor read_only for select [Profile Name] as profile
from #sqlmailtest
open mapicursor
fetch next from mapicursor into @profile
while (@@fetch_status <> -1)
begin
if (@@fetch_status <> -2)
begin
print ''
print 'Testing MAPI profile : ' + @profile
print ''
exec @rc = master.dbo.xp_test_mapi_profile @profile
if @rc = 0
print ' Testing MAPI profile : ' + @profile + ' succeeded'
else
print '*** Testing MAPI profile : ' + @profile + ' failed ***'
exec @rc = master.dbo.xp_startmail @profile
if @rc = 0
print ' Start mail using MAPI profile : ' + @profile + '
succeeded'
else
print '*** Start mail using MAPI profile : ' + @profile + '
failed ***'
exec @rc = master.dbo.xp_stopmail
if @rc = 0
print ' Stop mail using MAPI profile : ' + @profile + '
succeeded'
else
print '*** Stop mail using MAPI profile : ' + @profile + '
failed ***'
end
fetch next from mapicursor into @profile
end
close mapicursor
deallocate mapicursor
if exists (select * from tempdb.dbo.sysobjects where id =
object_id(N'tempdb..#sqlmailtest'))
drop table #sqlmailtest
print ''
print 'Finished SQL Mail test'
-- End of test script
Sincerely,
Charles Allard
Microsoft SQL Support
========================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
Recent viruses on the Internet underscore the threat to all computer users
and highlight challenges facing the entire industry in providing security
that everyone needs to conduct business. I encourage you to sign up to
receive automatic notification of Microsoft Security Bulletins by visiting
http://www.microsoft.com/technet/treeview/default.asp?url=/technet/security/
bulletin/notify.asp. For more information on security, our Strategic
Technology Protection Program and to order your FREE Security Tool Kit,
please visit http://www.microsoft.com/security. We will be happy to answer
any questions or provide assistance with your security needs.