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>