SSIS TargetServerVersion causes null rows in script component - ssis

When I set the TargetServerVersion = SqlServer2012 in my SSIS project, my script component throws a null object exception.
I am importing about 140,000 records from a CSV file. To confirm I do get records, I removed my script component step and ran the flow with no issues.
I then added back in the Script Component (which has worked fine with this very data file) and I get the null exception.
When I debug the script and check the value of the Row property it says the following:
?Row
{Input0Buffer}
Buffer: {Microsoft.SqlServer.Dts.Pipeline.PipelineBuffer}
BufferColumnIndexes: {int[2]}
MembershipPlanName: 'Row.MembershipPlanName' threw an exception of type 'System.NullReferenceException'
MembershipPlanName_IsNull: 'Row.MembershipPlanName_IsNull' threw an exception of type 'System.NullReferenceException'
The script then fails when the rest of the lines try to reference Row. When I change the TargetServerVersion back to 2016 or 2014, the package works fine.
During debegging I also looked at BufferWrapper.cs and there seems to be some data in there
?Buffer
{Microsoft.SqlServer.Dts.Pipeline.PipelineBuffer}
ColumnCount: 2
ColumnInfo: 0x0000000000000000
CurrentRow: 0
EndOfRowset: false
Mode: Input
RowCount: 9936
RowSize: 260145280
RowStarts: 0x000000000f82b700

Out of frustration I installed SSDT for VS2012. For some reason, that made everything work fine in VS2015. Not sure why it worked, but posting this if anyone has a similar issue.

Related

SSIS Issue Pulling Data From Snowflake - [CData Snowflake Source] Error: Get data error: Received metadata with an incompatible version number

I'm trying to run a simple data flow task in SSIS pulling data from Snowflake to SQL Server using a component from CDATA called Snowflake Source.
Connection works and I can also see a preview of the data but when actually running the package I get the following error message:
[CData Snowflake Source [2]] Error: System.Exception: Get data error: Received metadata with an incompatible version number
at CData.SSIS.Snowflake.SSISSourceComponent.PrimeOutput(Int32 outputs, Int32[] outputIDs, PipelineBuffer[] buffers)
at Microsoft.SqlServer.Dts.Pipeline.ManagedComponentHost.HostPrimeOutput(IDTSManagedComponentWrapper100 wrapper, Int32 outputs, Int32[] outputIDs, IDTSBuffer100[] buffers, IntPtr ppBufferWirePacket)
Has anyone experienced this before or know what to do in order to fix it?
Hi I faced this error many time , when i use some custom script component or third party component.
Issue : We do remove or delete some component but some of the reference is not removed from package (it is very tough to debug )
Create fresh package it will work .

SSRS Migration from 2008R2 to 2017 Error RSPortal

I was migrating our reporting services from the version 2008R2 to the version 2017 restoring the db and all seems to work fine unless for some report for which I cannot open the subscriptions page.
For those report every time I enter in the report subscriptions page from the web view I get this error
"Something went wrong. Please try again later. "
If I go in the log from the RSPortal File I see this error:
ERROR: OData exception occurred: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.FormatException: The string was not recognized as a valid DateTime. There is an unknown word starting at index 18.
at System.DateTimeParse.Parse(String s, DateTimeFormatInfo dtfi, DateTimeStyles styles)
at Microsoft.ReportingServices.Portal.Services.ODataExtensions.ParameterValueExtensions.FormatAsISO8601Date(String date, String culture)
at Microsoft.ReportingServices.Portal.Services.ODataExtensions.ParameterValueExtensions.ToWebApiReportParameterValue(ParameterValue parameterValue, ReportParameterType reportParameterType, String culture)
at Microsoft.ReportingServices.Portal.Services.ODataExtensions.SubscriptionExtensions.ToReportPameterList(SubscriptionImpl librarySubscription, Dictionary`2 parameterTypes, String culture)
at Microsoft.ReportingServices.Portal.Services.ODataExtensions.SubscriptionExtensions.ToWebApiModel(SubscriptionImpl librarySubscription, Dictionary`2 parameterTypes, SubscriptionProperties properties)
at System.Linq.Enumerable.WhereSelectArrayIterator`2.MoveNext()
Does anyone have a suggestion on how to solve it? I thought was something related to the CultureInfo value but I am not sure.
Thanks
Probably could be helpful for someone in the future so I will indicate the steps I took to solve this issue:
This issue was due to a data type mismatching on one parameter for a few subscriptions.
Seems that the error handling has changed in the time with Microsoft in fact, after I found the subscriptions that were having problems I tried to open them in the old environment and I have got this error:
“The Value provided for the report parameter “YourDate’ is not valid for it is type (rsReportParameterTypeMismatch)”
What I did so was to delete these subscriptions with the error in the new Reporting Server environment and finally the web view worked fine

SSIS Kingswaysoft error for JSON source

I am using JSON Source component in a package, it is working fine on my local machine but when I deploy in server am receiving the following error.
System.ArgumentException: Value does not fall within the expected range.
at Microsoft.SqlServer.Dts.Pipeline.Wrapper.IDTSBufferManager100.FindColumnByLineageID(Int32 hBufferType, Int32 nLineageID)
at KingswaySoft.IntegrationToolkit.ProductivityPack.JsonSourceComponent.yhs.cgd(IDTSOutputColumn100 kbk, IDTSExternalMetadataColumn100 kbl)
at System.Linq.Enumerable.d__614.MoveNext()
at System.Linq.Buffer1..ctor(IEnumerable1 source)
at System.Linq.Enumerable.ToArray[TSource](IEnumerable1 source)
at KingswaySoft.IntegrationToolkit.ProductivityPack.JsonSourceComponent.bdc()
at KingswaySoft.IntegrationToolkit.ProductivityPack.JsonSourceComponent.PreExecute()
at Microsoft.SqlServer.Dts.Pipeline.ManagedComponentHost.HostPreExecute(IDTSManagedComponentWrapper100 wrapper)
For the error “Value does not fall within the expected range”, it seems to be an issue caused by the SSIS optimization design, it happens when you don’t have all the output attached to a destination component.
In this case, either of the following two options can solve the issue properly:
Set the RunInOptimizedMode property to False in the Properties window
at Data Flow Level (see figure 1). This setting can be found after
you click the blank area on your data flow designer.
Alternatively, you can try to direct other outputs of the JSON Source component to an SSIS Destination component which can take care of this situation as well.
Can you please give it a try and see if it helps?
[Figure 1]

Oracle Stored Procs with SSRS 2012

I've been trying to figure this out for the last day or so and after numerous attempts, I'm still struggling to find a solution. Essentially I have an Oracle Datasource setup in SSRS, where using the current "providers" available for Oracle are the following under OLE DB:
Or flat out using the "Oracle" connection type:
The issue I'm facing is when attempting to call an Oracle Stored Procedure. The only provider that seems to work is "Microsoft OLE DB Provider for Oracle" (Provider=MSDAORA;Data Source=DBNAME), where when selecting that Datasource, I can select my PROC from the drop-down (see below) and hit "refresh fields", and everything works, no problem. I don't even have to specify any parameters as it recognized them automatically and adds them. The problem is that the MSDORA is being deprecated (from what I've read), and several attempts to install ODAC (32 and 64 bit) on the server have proven unsuccessful seeing as the reporting service on the server doesn't seem to recognize the provider (tested using a UDL file).
So, figured I'd resort to using the "Oracle" provider / connection method, but despite my attempts with or without passing the parameters, I keep getting errors. Either this if I don't pass any parameters:
ORA-06550: line 1, column 7:
PLS-00306: wrong number or types of arguments in call to 'SSRSTEST'
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
Or this error if I do add the parameter value at the end:
ORA-00911: invalid character
ORA-06512: at "SYS.DBMS_UTILITY", line 156
ORA-06512: at line 1
It's safe to assume that the data source provider is in part the source of my problem, but surely there must be a way to call an Oracle Proc via SSRS using something other than MSDORA, or at least I hope there is. I've tried installing both 32 and 64 bit versions of the Oracle client (11 and 12c), registering the dlls manually (regsvr32) but I still can't seem to resolve this. Any help would be greatly appreciated.

Core Data Migration - "Can't add source store" error

In my iPhone app I'm using Core Data and I've made changes to my data model that cannot be automatically migrated over (i.e. added new relationships). I added the data model version (Design -> Data Model -> Add Model Version) and applied my new data model changes to the new version 2. I then created a mapping object model and set the Source and Destination models to their correct data models (old and new respectively).
When I run the app and call the persistentStoreCoordinator, my app barfs with the following:
2010-02-27 02:40:30.922 XXXX[73578:20b] Unresolved error Error Domain=NSCocoaErrorDomain Code=134110 UserInfo=0xfc2240 "Operation could not be completed. (Cocoa error 134110.)", {
NSUnderlyingError = Error Domain=NSCocoaErrorDomain Code=134130 UserInfo=0xfbb3a0 "Operation could not be completed. (Cocoa error 134130.)";
reason = "Can't add source store";
}
FWIW (not much i think) I've also made the usual code changes in persistentStoreCoordinator to use the NSMigratePersistentStoresAutomaticallyOption and NSInferMappingModelAutomaticallyOption (for future data model changes that can be automatically migrated). More relevantly, my managedObjectModel is created by calling initWithContentsOfURL where the file/resource type is "momd".
I've tried updating both the source and destination model in the mapping model (Design -> Mapping Model -> Update XXX Model) as well as deleted the mapping model and recreated it. I've cleaned and re-built but all to no avail. I still get the above error message.
Any pointers/thoughts on how I can further debug or resolve this problem please? I haven't posted any code snippets because this feels much more like a build environment issue (and my code is very standard - just the usual core data code to handle migrations using a mapping model but I'm happy to show the code if it helps).
Appreciate any help.
Thanks
Ok, this is now fixed.
I (a) deleted and then recreated my managed object model classes, (b) deleted and then recreated the mapping model and then finally I (c) deleted the iphone project under the users/xxx/Library/Application Support/iPhone Simulator/User/Applications.
Given I previously tried and failed with doing just (a) and (b), I suspect it was (c) which fixed the problem.