Hello Everybody,
While running a job we are getting the following error:
Error executing extended stored procedure: Invalid Parameter [SQLSTATE
42000] (Error 22050). The step failed.
The job is executing the following sql statement:
DECLARE
@Prof varchar(100),
@Subj varchar(4000),
@Body varchar(4000),
@Rec varchar(4000),
@Q1 varchar(4000),
@Q2 varchar(4000),
@Q3 varchar(4000)
Set @Prof = ''Default''
Set @Subj = ''SQLServer Database_Alert - Alert Message '' + @@Servername
Set @Rec = 'Mail list'
Set @Body = '' SQLServer Database_Alert: One of the Log files on '' +
@@Servername + '' Host Name '' + Host_Name() + '' has above 85% Usage
on '' + CONVERT(CHAR(100), GetDate(), 100)
Set @Q1 = ''DBCC SQLPERF ( LOGSPACE )''
Set @Q2 = 200
Set @Q3 = ''|''
Exec msdb.dbo.SP_Send_Dbmail
@Profile_Name = @Prof,
@Recipients = @Rec,
@Subject = @Subj,
@Body = @Body,
@query = @Q1,
@query_result_width = @Q2,
@query_result_separator = @Q3;
Any suggestions on this.
Thanks
Soujanya
MS Sql Server LazyDBA home page