What are the challenges you face when working across database platforms? Take the survey
Options

Warning 150: MAILTO Error: SMTP Host not defined

SurinderSurinder Posts: 44 Bronze 2
edited October 9, 2008 4:10AM in SQL Backup Previous Versions
Hi,

Getting the warning above on one of our servers. The SMTP has been declared in the GUI, and the entries are in the registry on the server.

Sending a test message via the GUI works fine, but non of the alerts work from the server

Surinder..
Shin..

Comments

  • Options
    peteypetey Posts: 2,358 New member
    The SMTP settings are specific to each SQL Server instance. Could you please check the registry, in the following location:

    HKLM\Software\Red Gate\SQL Backup\BackupSettingsGlobal\<instance name>

    and see if there is a value for SMTPHost?
    Peter Yeoh
    SQL Backup Consultant Developer
    Associate, Yohz Software
    Beyond compression - SQL Backup goodies under the hood, updated for version 8
  • Options
    SurinderSurinder Posts: 44 Bronze 2
    The value is there. and compared to the other servers all the other values seem correct.

    Could it be a permissions problem on the key? what should the security be?
    Shin..
  • Options
    peteypetey Posts: 2,358 New member
    The SQL Backup Agent service startup account needs to have read permissions to that value.
    Peter Yeoh
    SQL Backup Consultant Developer
    Associate, Yohz Software
    Beyond compression - SQL Backup goodies under the hood, updated for version 8
  • Options
    SurinderSurinder Posts: 44 Bronze 2
    In that case the permissions seem fine. All other settings are being picked up from there, ie. backup location etc. Just not the SMTP host.
    Shin..
  • Options
    peteypetey Posts: 2,358 New member
    Could you please run the following on the instance where you are receiving the warning:
    DECLARE @settings varchar&#40;1024&#41;
    EXEC master..sqbutility 1008, @settings OUTPUT
    SELECT @settings
    
    Is the SMTPHost value returned?
    Peter Yeoh
    SQL Backup Consultant Developer
    Associate, Yohz Software
    Beyond compression - SQL Backup goodies under the hood, updated for version 8
  • Options
    SurinderSurinder Posts: 44 Bronze 2
    No, and looking at the other values that have come back, its not getting any of the settings.

    i.e. The SMTPSender, BAckup location is not right as well

    SMTPHost= SMTPPort=25 SMTPUserName= SMTPPassword= SMTPSender=SQLBackup@EVSQL BackupFolder=C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Backup BackupFileName= LogDeleteOptions=0 LogDeleteHours=2160 LogDelete=0 LogFolder=C:\Documents and Settings\All Users\Application Data\Red Gate\SQL Backup\Log\(LOCAL)\ MSDBDeleteHours=2160 MSDBDelete=0 MaxDataBlock=0 MaxTransferSize=0 VDITimeout=30 SkipChecks=1

    Just checked the settings via the GUI, and it has also gone back to default settings. But the settings in the registry are still correct.
    Shin..
  • Options
    peteypetey Posts: 2,358 New member
    What is the location in the registry that you are seeing the values? Is this server running a 64-bit Windows?

    Thanks.
    Peter Yeoh
    SQL Backup Consultant Developer
    Associate, Yohz Software
    Beyond compression - SQL Backup goodies under the hood, updated for version 8
  • Options
    SurinderSurinder Posts: 44 Bronze 2
    Extract of the registry

    Windows Registry Editor Version 5.00

    [HKEY_LOCAL_MACHINE\SOFTWARE\Red Gate\SQL Backup\BackupSettingsGlobal]

    [HKEY_LOCAL_MACHINE\SOFTWARE\Red Gate\SQL Backup\BackupSettingsGlobal\(LOCAL)]
    "DataPath"="C:\\Documents and Settings\\All Users\\Application Data\\Red Gate\\SQL Backup\\Data\\(local)"
    "ServiceLogin"=""
    "CopiedVersion4Settings"=dword:00000001
    "BackupFolder"="\\\\vipsii\\SQLServerBackups\\<SERVER>\\<DATABASE>\\"
    "BackupFileName"="<TYPE>_<SERVER>_<DATABASE>_<DATETIME yyyymmdd_hhnn>"
    "LogFolder"="C:\\Documents and Settings\\All Users\\Application Data\\Red Gate\\SQL Backup\\Log\\(LOCAL)\\"
    "LogDelete"=dword:00000000
    "LogDeleteHours"=dword:00000870
    "LogDeleteOptions"=dword:00000000
    "MSDBDelete"=dword:00000000
    "MSDBDeleteHours"=dword:00000870
    "SMTPHost"="Mail"
    "SMTPPort"=dword:00000019
    "SMTPUserName"=""
    "SMTPPassword"=""
    "SMTPSender"="SQL-RG@EVSql"


    The server is "Windows 2003 R2 Enterprise x32"
    Shin..
  • Options
    peteypetey Posts: 2,358 New member
    Could you please run the following:
    EXEC master..sqbutility 1040, 'SMTPHost', 'RGTEST.COM'
    
    and check if the value for SMTPHost in the registry is changed? Thanks.
    Peter Yeoh
    SQL Backup Consultant Developer
    Associate, Yohz Software
    Beyond compression - SQL Backup goodies under the hood, updated for version 8
  • Options
    SurinderSurinder Posts: 44 Bronze 2
    Nope, the value doesnt change
    Shin..
  • Options
    SurinderSurinder Posts: 44 Bronze 2
    I have granted the RG Backup service "Full Access" to this registry location. Now the SP does change the value as expected

    Just done a test run and the alerts are coming through now as expected.

    Thanks,
    Surinder..
    Shin..
Sign In or Register to comment.