Hola buenas estoy realizando un envio de correo desde una sintaxis, pero he notado si el archivo sobrepasa los 8MB no me manda ningun mensaje de error y tampoco no se envia el correo, como podria configurar para que pueda ocupar mas de 8MB "Maximum File Size (Bytes)" esa es la sintaxis que utilizo y en el log de correo solo tengo esto
declare @cmd varchar(8000),@name varchar(100)
select @name='MONITOR_EFECTIVIDADES_'+convert(varchar(8),getdate()-1,112)
set @cmd='del "G:\Spooler\DesarrolloClientes\'+@name+'.csv"'
EXEC xp_cmdshell @cmd
set @cmd='bcp "select ''COD_TERRITORIO'',''TERRITORIO'',''COD_CORREDOR'',''CORREDOR'',''COD_UNID'',''UNIDAD'',''PRODUCTO'',''COD_SECT'',''SECTORISTA'',''CTA_CLIENTE'',''NOMBRE_CLIENTE'',''OPERACION'',''FEC_DESEMB'',''MONTO_DESEM'',''COD_MONEDA'',''SALDO_CAPITAL_MN'',''TRAMO'',''DIA_ATRAZO'',''HINDZCUO'',''HINDUCUO'',''REG_GESTION'',''NUM_REGISTRO'',''FECHA_GEST'',''HFCRES'',''HFCCOM'',''HFCRSPB'',''PROBAB_RECUP'',''ESTRAT_COBR'',''NIVEL_SOB'',''NIVEL_RIESGO_H'',''HFCMPP'',''HFCFVPP'',''HFGPR'',''HFDGPR'',''FEC_VENCI'',''ESTADO'',''SALDO_INI'',''FEC_MORA'',''MINORISTA'',''REFINANCIADO'',''REPROGRAMADO'',''EXCEPCIONES'',''NUM_CONDO'',''GRUPO'',''TOTAL_CUOTAS'',''CUOTA_PAGADAS'', ''%AVA_CRONOG'',''FEC_VENC_ULT_PAGO'',''PROVINCIA'',''DISTRITO'',''HFCFGEST_RECU'',''HFCRES_RECU'',''HFCCOM_RECU'',''HFCRSPB_RECU'',''HCLFSBS'' '
set @cmd+=' UNION ALL select cast(RCODTER as varchar) ,cast(RDESTER as varchar) ,cast(RCODCOR as varchar) ,cast(RDESCOR as varchar) ,cast(RCODUNI as varchar),cast(RDESUNI as varchar) ,cast(RDESPROD as varchar) ,cast(HCODSEC as varchar) ,cast(HDCODSEC as varchar),cast(HCTACLI as varchar) ,cast(HDESCLI as varchar) ,cast(HCODOPE as varchar) ,cast(HFECDES as varchar) ,cast(HMONDES as varchar),cast(HCODMON as varchar) ,cast(HSALCAPMN as varchar) ,cast(HTRAM as varchar) ,cast(HDIAATR as varchar) ,cast(HINDZCUO as varchar),cast(HINDUCUO as varchar) ,cast(HREGG as varchar) ,cast(HREGN as varchar) ,cast(HFCFGEST as varchar) ,cast(HFCRES as varchar),replace(replace(replace(replace(HFCCOM,char(9),'' ''),char(10),'' ''),char(13),'' ''),''-'','' ''),cast(HFCRSPB as varchar) ,cast(HPROBR as varchar) ,cast(HESTC as varchar) ,cast(HNIVSOB as varchar),cast(NIVEL_RIESGO_H as varchar),cast(HFCMPP as varchar) ,cast(HFCFVPP as varchar) ,cast(HFGPR as varchar) ,cast(HFDGPR as varchar) ,cast(HFTVEN as varchar),cast(HESTACT as varchar) ,cast(HSALINIMN as varchar),cast(HFECMOR as varchar),cast(MINORISTA as varchar),CAST(HINDCART AS VARCHAR),CAST(HINDREPR AS VARCHAR),CAST(HINDEXCP AS VARCHAR),CAST(HNUMCOND AS VARCHAR),CAST(HDESGRUP AS VARCHAR),CAST(HTOTCUO AS VARCHAR),CAST(HCUOPAG AS VARCHAR),CAST(AV_CRO AS VARCHAR) ,CAST(HFECUCC AS VARCHAR),CAST(HPROVINCIA AS VARCHAR),CAST(HDISTRITO AS VARCHAR),cast(HFCFGEST_RECU as VARCHAR),CAST(HFCRES_RECU AS VARCHAR),CAST(HFCCOM_RECU AS VARCHAR),CAST(HFCRSPB_RECU AS VARCHAR),CAST(HCLFSBS AS VARCHAR) from storage.[com_act].WCED002__"'
set @cmd+=' queryout "G:\Spooler\DesarrolloClientes\'+@name+'.csv" -b"1000" -c -t\t -T -r"\n" -S NUM_SERV -U master -P CLAVE -C1252'
--print @cmd
EXEC xp_cmdshell @cmd
set @cmd='7z a -tzip "G:\Spooler\DesarrolloClientes\'+@name+'.csv.zip" ""G:\Spooler\DesarrolloClientes\'+@name+'.csv"';
EXEC xp_cmdshell @cmd
set @cmd='del "G:\Spooler\DesarrolloClientes\'+@name+'.csv"'
EXEC xp_cmdshell @cmd
declare @subj varchar(max),@HTML varchar(max),@recip varchar(100),@attach varchar(max)
select @subj='Monitor de Efectividades '+cast(cast(getdate()-1 as date) as varchar(10))+''
select @HTML=N'
<p>Buenos días.</p></br>
<p>Se remite el monitor de efectividades.</p>
<p>Un cordial saludo,</p></br>
<p>MIS</p>
'
select @attach='G:\Spooler\DesarrolloClientes\MONITOR_EFECTIVIDADES_'+convert(varchar(8),getdate()-1,112)+'.csv.zip'
EXEC msdb.dbo.sp_send_dbmail
@recipients='[email protected]',
@subject = @subj,
@body = @HTML,
@body_format = 'HTML',
@profile_name = 'Google Mail - MIS',
@file_attachments = @attach;