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

MAILTO via stored procedure

UlfiusUlfius Posts: 15
edited July 5, 2005 12:09PM in SQL Backup Previous Versions
Using this command via QA, I'm receiving error 150: SMTP host name not defined. The same command via sqlbackupc and the SMTP test in the GUI work fine.

master..sqlbackup '-SQL "BACKUP DATABASE [ISI] TO DISK = [d:\sql_data\MSSQL\BACKUP\<AUTO>] WITH LOGTO = [d:\sql_data\MSSQL\BACKUP\Logs\], MAILTO = ''<my email>''" -E'

Comments

  • Options
    peteypetey Posts: 2,358 New member
    The SMTPHost setting is stored in the registry key HKEY_LOCAL_MACHINE\SOFTWARE\Red Gate\SQLBackup\BackupSettingsGlobal\SMTPHost. Pls check if the SQL Server service startup account has rights to the entire HKEY_LOCAL_MACHINE\SOFTWARE\Red Gate\SQLBackup node.
    Peter Yeoh
    SQL Backup Consultant Developer
    Associate, Yohz Software
    Beyond compression - SQL Backup goodies under the hood, updated for version 8
  • Options
    This fixed the problem. I believe since my SQL Server service account is a domain account and not a local account, it could not read the key.
Sign In or Register to comment.