-1

Hello, I successfully created a query activity via SOAP API but upon running that query I receive an error, see below:

--- inner exception 1---

System.Data.SqlClient.SqlException:

Error[0]: -- Number: 15223 Class: 11 State: 11 Procedure: sp_rename Source: .Net SqlClient Data Provider Server: IND1P01C029I04.xt.local\I04,10001 Line: 81 Message: Error: The input parameter 'NewName' is not allowed to be null.

Error[1]: -- Number: 0 Class: 0 State: 1 Procedure: QueryActivityIndexer Source: .Net SqlClient Data Provider Server: IND1P01C029I04.xt.local\I04,10001 Line: 436 Message: No useful C-schema table information from the SQL query could be derived. Exiting

  • from .Net SqlClient Data Provider

My SOAP XML Code is below: Any ideas on what could be causing the error above?

<s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:u="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<s:Header>
  <a:Action s:mustUnderstand="1">Create</a:Action>
  <a:MessageID>urn:uuid:7e0cca04-57bd-4481-864c-6ea8039d2ea0</a:MessageID>
  <a:To s:mustUnderstand="1">{{soapEndPoint}}</a:To>
      <h:fueloauth xmlns="http://exacttarget.com"
             xmlns:h="http://exacttarget.com">{{accessToken}}</h:fueloauth>
  </s:Header>
<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<CreateRequest  xmlns="http://exacttarget.com/wsdl/partnerAPI">
  <Options>
 </Options>
<Objects xsi:type="QueryDefinition">
<PartnerKey xsi:nil="true">
</PartnerKey>
<ObjectID xsi:nil="true">
</ObjectID>
<CustomerKey>Testing_Counts</CustomerKey>
<Name>RP_API_Query</Name>
<Description>genertedbyAPI</Description>
<QueryText>Select count(SubscriberId) as Counts from [_Subscribers]</QueryText>
<TargetType>DE</TargetType>
<DataExtensionTarget>
 <PartnerKey xsi:nil="true">
 </PartnerKey>
 <ObjectID xsi:nil="true">
 </ObjectID>
 <CustomerKey>DE_Unique</CustomerKey>
 <Name>Solution_Data_DE_Count</Name>
</DataExtensionTarget>
<TargetUpdateType>Overwrite</TargetUpdateType>
</Objects>
</CreateRequest>
</s:Body>
</s:Envelope>

PerformRequest XML:

<s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" 
xmlns:a="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:u="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
  <s:Header>
  <a:Action s:mustUnderstand="1">Perform</a:Action>
  <a:MessageID>urn:uuid:7e0cca04-57bd-4481-864c-6ea8039d2ea0</a:MessageID>
  <a:To s:mustUnderstand="1">{{soapEndPoint}}</a:To>
      <h:fueloauth xmlns="http://exacttarget.com"
             xmlns:h="http://exacttarget.com">{{accessToken}}</h:fueloauth>
  </s:Header>
 <s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
 xmlns:xsd="http://www.w3.org/2001/XMLSchema">
 <PerformRequestMsg xmlns="http://exacttarget.com/wsdl/partnerAPI">
 <Options>
        <SendResponseTo>
           <ResponseType>email</ResponseType>
           <ResponseAddress>{{My email Address}}</ResponseAddress>
           <RespondWhen>Always</RespondWhen>
           <IncludeResults>true</IncludeResults>
           <IncludeObjects>true</IncludeObjects>
        </SendResponseTo>
   </Options>
<Action>Start</Action>
 <Definitions>
 <ns1:Definition xmlns:ns1="http://exacttarget.com/wsdl/partnerAPI" xsi:type="ns1:QueryDefinition">
<PartnerKey xsi:nil="true">
</PartnerKey>
 <ns1:ModifiedDate xsi:nil="true"/>
 <ns1:ObjectID>{{ObjectID}}</ns1:ObjectID> 
 </ns1:Definition>
 </Definitions>
</PerformRequestMsg>
</s:Body>
</s:Envelope>

1 Answer 1

0

So you mean you're able to Create a Query successfully but receiving an error while Performing (Start or Stop action) that Query ?

If yes, the SOAP Envelope you mentioned is for Creating a Query. Please show us your PerformRequest code.

Note that to perform a query you need ObjectID, which you can find in the returned response during the creation process or you can retrieve it with RetrieveRequest.

3
  • yes, you are correct - I am attempting to Perform the query using a PerformRequest. The XML has been added above and gives a 200 OK result, but the query ultimately fails in SFMC which is odd given it's a simple count query.
    – B.W
    Commented Jan 22, 2018 at 19:11
  • Okay, Error[0] says there is a field named "NewName" in your target DE which can't accept Null values. Please check the Nullable option in the DE or try to populate that field. Error[1] SQL query error, I didn't understand what exactly you're trying to do with this "Select count(SubscriberId) as Counts from [_Subscribers]". Commented Jan 22, 2018 at 20:39
  • Thanks, but I don't think that is the cause of the error though. There isn't a field in my DE with the name "NewName". I only have 1 field in my DE named "Count", which is a nullable field and integer(number) data type. And the query is straightforward - I'm attempting to count the number of subscriberids within the Subscribers data view.
    – B.W
    Commented Jan 23, 2018 at 14:54

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .