Page 1 of 1

Remotely execute SSIS pkg with VBScript pass var

Posted: Thu Jan 07, 2010 5:47 pm
by ismailc
Good day, How can I remotely execute SSIS package passing variables defined in the package with VBScript. The SSIS package & my site are two different servers. So i need to remotely execute SSIS package on the SQL server together with passing variables Please provide some code. Regards

Remotely execute SSIS pkg with VBScript pass var

Posted: Thu Jan 07, 2010 11:11 pm
by jvierra
http://msdn.microsoft.com/en-us/library/ms162810.aspx




Use the command line utilites for sqlserver. No need to write a script. SSIS is designed foe simplcity.


Remotely execute SSIS pkg with VBScript pass var

Posted: Sun Jan 10, 2010 2:54 am
by ismailc
Hi, Help please, Winning but not there yet.

I managed to update the list with javascript (i know javascript)I have 2 issues not being the javascript.

1. I only seem to update the list when filtering on ID, I don't have the id & only know the Title in my 3rd party app. I tried removing ID & filter on Title but no luck

2. Some authentication issue, it asks me to login on all my internal web apps everytime.

Code: Select all

function SaveListItem()
{
    var soapRequest = '<?xml version="1.0" encoding="utf-8"?>' +
    '<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">' +
    ' <soap12:Body>'+
    ' <UpdateListItems xmlns="<a href="" target="_blank">'">http://schemas.microsoft.com/sharepoint/soap/">'</A>+
    ' <listName>Vendor Request</listName>'+
    ' <updates>'+
    '<Batch OnError="Continue">'+
    ' <Method ID="1" Cmd="Update">'+
    ' <Field Name="ID">772</Field>'+
    ' <Field Name="FSObjType">1</Field>'+
    ' <Field Name="BaseName">70002</Field>'+
    ' <Field Name="Title">70002</Field>'+
    ' <Field Name="Vendor0">TestData9</Field>'+
    ' </Method>'+
    '</Batch>'+
    ' </updates>'+
    ' </UpdateListItems>'+
    ' </soap12:Body>'+
    '</soap12:Envelope>';
    xmlHttp=new XMLHttpRequest();
    xmlHttp.open('post', 'http://srv08-za143/workspace/departments/masterfiles/_vti_bin/Lists.asmx', true);
    xmlHttp.setRequestHeader('Content-Type','application/soap+xml; charset=utf-8');
    xmlHttp.send(soapRequest);
}

Please Assist! - nearly there

ismailc2010-01-10 11:09:54

Remotely execute SSIS pkg with VBScript pass var

Posted: Sun Jan 10, 2010 7:21 am
by jvierra
Set the xmlHTTP to use credentials.

Remotely execute SSIS pkg with VBScript pass var

Posted: Sun Jan 10, 2010 8:56 am
by jvierra

Code: Select all

 
function SaveListItem( service, xmlSoapRequest){
    var xmlhttp = new ActiveXObject ("Microsoft.XMLHTTP"); 
    xmlhttp.
    xmlhttp.Open("POST", service, false,null,null); // or user password
    // should use try/catch here
    xmlhttp.Send(xmlSoapRequest); 
    return xmlhttp.responseXML;    
}
var soapRequest =  
    "<?xml version='1.0' encoding='utf-8'?>"
    + "<soap12:Envelope xmlns:xsi=]http://www.w3.org/2001/XMLSchema-instance] xmlns:xsd=]http://www.w3.org/2001/XMLSchema] xmlns:soap12=]']>http://www.w3.org/2003/05/soap-envelope]>"
    + "     <soap12:Body>"
    + "         <UpdateListItems xmlns='http://schemas.microsoft.com/sharepoint/soap/'>"
    + "             <listName>Vendor Request</listName>"
    + "             <updates>"
    + "                 <Batch OnError='Continue'>"
    + "                     <Method ID='1' Cmd='Update'>"
    + "                         <Field Name='ID'>772</Field>"
    + "                         <Field Name='FSObjType'>1</Field>"
    + "                         <Field Name='BaseName'>70002</Field>"
    + "                         <Field Name='Title'>70002</Field>"
    + "                         <Field Name='Vendor0'>TestData9</Field>"
    + "                     </Method>"
    + "                 </Batch>"
    + "             </updates>"
    + "         </UpdateListItems>"
    + "     </soap12:Body>"
    + "</soap12:Envelope>";
WScript.Echo( soapRequest);
SaveListItem( "http://srv08-za143/workspace/departments/masterfiles/_vti_bin/Lists.asmx",soapRequest);

Remember that command line jscript is not esxactly the same a JavaScript in a browser and it is not at all like Java.


jvierra2010-01-10 16:59:42