Showing posts with label SSIS. Show all posts
Showing posts with label SSIS. Show all posts

Friday, January 19, 2018

SSDT Error Message: Unable To Cast COM Object of Type 'X' To Interface Type 'Y'

Just a short blog post today explaining a problem (and solution) I ran into when working at a client a while ago. Hopefully it is helpful for anyone.

Problem

I got this error message at a client when I tried to open an SSIS solution in SSDT:

Unable to cast COM object of type 'System.__ComObject' to interface type 'Microsoft.SqlServer.Dts.Pipeline.Wrapper.IDTSObject100'

According to this source the reason could be a badly applied Service Pack or CU for example, but I’m not entirely sure about that in my case.

Solution

The solution for this is to reregister the dll that is referred to, in this case: dts.dll.
Before starting, make sure you close any open Visual Studio instance.
In a Command Prompt go to the following path (be sure to start the Command Prompt as Administrator):

C:\Program Files\Microsoft SQL Server\120\DTS\Binn\

where 120 is you SQL Server version number.
Reregister the dts.dll by executing the command:

regsvr32 dts.dll

image

If all goes well you should see the following message pop up:

image

I found info here.


Happy coding :)

@NickyvV

Friday, April 21, 2017

SSDT Error Message: Unable To Cast COM Object of Type…

Just a short blog post today explaining a problem (and solution) I ran into when working at a client recently. Hopefully it is helpful for anyone out there.

Problem

I recently got this error message at a client when trying to open an SSIS solution in SSDT.

Unable to cast COM object of type 'System.__ComObject' to interface type 'Microsoft.SqlServer.Dts.Pipeline.Wrapper.IDTSObject100'

The reason could be a badly applied Service Pack or CU for example, but I’m not entirely sure about that (source).

Solution

Before starting, make sure you close any open Visual Studio instance.
In a Command Prompt go to the following path (be sure to start the Command Prompt as Administrator):

C:\Program Files\Microsoft SQL Server\120\DTS\Binn\

where 120 is you SQL Server version number.
Reregister the dts.dll by executing the command:

regsvr32 dts.dll

image

If all goes well you should see the following message pop up:

image

I found info here.

Happy coding :)

Thursday, June 30, 2016

SSIS: The Buffer Manager Failed a Memory Allocation Call

I recently made the switch to Pulse (you can read about it here), so I am working with lots of new clients lately. One of those clients was having issues with refreshing their data warehouse and SSAS cubes. The process usually takes around 30 minutes to complete, but the last week it would easily take between 5 and 12 hours. Not really the way you want it to go, right?

Problem
One of the packages in SSIS was taking ages to process so I used sp_WhoIsActive by Adam Machanic (b | t) and came to the conclusion the process had a wait type of PREEMPTIVE_OS_WAITFORSINGLEOBJECT, which can be found in sys.dm_os_wait_stats.

Jonathan Kehayias (b | t) mentions on MSDN:
MSDN

For a thorough understanding of (Non-)Preemptive waits in SQL Server, Pinal Dave (b | t) has written an excellent blog post here. A little excerpt:
PREEMPTIVE: Simply put, this wait means non-cooperative. While SQL Server is executing a task, the OS interrupts it. This leads to SQL Server to involuntarily give up the execution for other higher priority tasks. This is not good for SQL Server as it is a particular external process which makes SQL Server to yield. This kind of wait can reduce the performance drastically and needs to be investigated properly.
You see the word drastically there? That's kinda what happened :)

Continuing with my investigation, I executed the source query from the package manually in SSMS and it took around 20 seconds. Executing the package in SSDT succeeded but resulted in the following two informational messages:
The buffer manager has allocated # bytes even though the memory pressure has been detected and repeated attempts to swap buffers have failed.
The buffer manager failed a memory allocation call for 65536 bytes, but was unable to swap out any buffers to relieve memory pressure. # buffers were considered and # were locked. Either not enough memory is available to the pipeline because not enough are installed, other processes were using it, or too many buffers are locked.
As the second message states there is not enough memory available, Well there should be, because I remembered there recently had been a memory increase from 16 to 32 GB on the server. But about that RAM, it is shared across the server... and between different applications... That started me thinking about the max server memory for SQL Server and the memory left for the rest of the server (OS, SSRS and SSIS!), because they're all running on the same server.

Solution
The maximum server memory can be set by editing the Server Properties (in SSMS):

or by using plain T-SQL. The beneath example sets the maximum memory to 4 GB:

sp_configure 'show advanced options', 1;
GO
RECONFIGURE;
GO
sp_configure 'max server memory', 4096;
GO
RECONFIGURE;
GO
When the memory increased to 32 GB recently, the max server memory was also set from 13 to 26 GB, so the memory available to processes other then SQL Server didn't increase much. I changed the memory limit back to 20 GB to release an extra 6 GB to the rest of the apps running on the server. This way the (DTExec-)process for SSIS had enough memory to perform the tasks in-memory and the nightly process was running as normal again.

HTH

Thursday, January 21, 2016

SSIS: An Item With The Same Key Has Already Been Added

Problem
Recently I was working on a new project and was trying to deploy my SSIS project with several packages to the catalog for the first time. I received the error when trying to build the project:
2016-006

Explanation
This occurs when e.g. you copied a (package) connection manager to another package and later promoted one of the 2 to a project connection.
Let’s say you have package A and B, both with the same package connection manager ConMgr. When you promote ConMgrof package A it will become (project)ConMgr, but in package B it will still be ConMgr, the package connection, and the new project connection will not be shown.


Solution
(I found my solution @ SO.) By deleting the package connection ConMgr (in package B) the project connection will become visible in the package and (in my project) succesfully replaced the connections in all data flows. It could be that you have to go through all components that referenced the old package connection to redirect them to the (project)ConMgr instead.

Hope that helps!

Featured Post

Power Apps or Translytical Task Flows?

I think I have gotten this question at least five or six times in the last few months, and with Translytical Task Flows reaching GA in the M...