If you wish to run SQLDOM as a job on the server, there is different behavior than running on SSMS that must be compensated for. The default setting will truncate the results from the HTTP GET (and POST, I presume) at 512 characters.
To compensate, add the following statement at the beginning of your batch:
SET TEXTSIZE 2147483647;
Last edit: Russell Shilling 2014-12-31
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I am having this issue where only 512 bytes are being returned when I run the SQLDOM executing a Stored Procedure on SQL Agent. I have added the set TEXTSIZE before and I still am getting 512 bytes? It does not matter which website I retrieve the data from.
The Bytes returned are always 512......Do you have any idea what I am doing wrong? When I execute the SP from MMS it returns the correct results, SQL Agent is it always 512. I am running SQL 2016
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
If you wish to run SQLDOM as a job on the server, there is different behavior than running on SSMS that must be compensated for. The default setting will truncate the results from the HTTP GET (and POST, I presume) at 512 characters.
To compensate, add the following statement at the beginning of your batch:
Last edit: Russell Shilling 2014-12-31
Russel;
I am having this issue where only 512 bytes are being returned when I run the SQLDOM executing a Stored Procedure on SQL Agent. I have added the set TEXTSIZE before and I still am getting 512 bytes? It does not matter which website I retrieve the data from.
SET TEXTSIZE 10000
DECLARE @HTML varchar(MAX)
EXEC master.[sdom].[sputilGetHTTP]
<html id="atomic" lang="en-US" class="atomic my3columns l-out Pos-r https fp fp-v2 rc1 fp-default mini-uh-on viewer-right two-col ntk-wide ltr desktop Desktop bktCG004,fpdmcntrl,FP131,SR014"> <head>--@URL = 'http://quotes.freerealtime.com/dl/frt/M?IM=stats&exch=O&stat=3',
--@URL = 'http://www.finviz.com/',
@URL = 'http://www.yahoo.com/',
@ResponseText = @HTML OUTPUT,
@SuppressResultset = 0
The Bytes returned are always 512......Do you have any idea what I am doing wrong? When I execute the SP from MMS it returns the correct results, SQL Agent is it always 512. I am running SQL 2016