This project is read-only.

SSIS 2012 raw filw viewer version

Aug 12, 2013 at 8:20 PM
HI, would it be possible to create a 2012 version of this viewer?

Thanks!
Aug 12, 2013 at 9:12 PM
Thanks for your interest! Have you tried opening a 2012 RAW file? I don't have a copy of SQL Server 2012 - though I might be able to get my hands on a copy. I think 2012 and 2008 R2 are fairly compatible (unlike 2005 & 2008) and it might just be a matter of updating some DLL references.

If you're up for it I could try to help you compile it?

Anyway, let me know if you can or can't open a 2012 RAW file and we'll go from there.
Oct 11, 2013 at 7:10 PM
Hi strigona, I am able to run this application on a computer that has SQL Server 2008 installed but not on a computer that has SQL 2012 installed. I've downloaded the source code and tried to compile it but run into an error. Would you be willing to help me get this working for SQL 2012?
Oct 11, 2013 at 7:14 PM
Yes of course. Can you tell me what the error is?
Oct 11, 2013 at 7:22 PM
Edited Oct 11, 2013 at 10:01 PM
Thanks for your help! The error is: Interop type 'Microsoft.SqlServer.Dts.Runtime.Wrapper.PackageClass' cannot be embedded. Use the applicable interface instead. I am using Visual Studio 2012 and I had to reference the 2012 version of the DtsClient, DtsPipelineWrap, and DtsRuntimeWrap dlls, and change the target framework for the project to .NET Framework 4 to get this far. But the above error has me stuck.
Oct 11, 2013 at 7:46 PM
Edited Oct 11, 2013 at 8:01 PM
Take a look at this and see if that helps.
Oct 11, 2013 at 8:16 PM

Ok, that worked to get the application built and running. But I now get an error if I try to view a raw file:

Error opening file. Selected file may be wrong type or corrupted.

I get the same error whether the raw file was generated using and SSIS package running in SQL 2008 BIDS or a raw file generated using an SSIS package running in SSDT 2012.

Thanks!

Oct 11, 2013 at 9:34 PM
That's odd.. however I've recently been having problems with a RAW file where I'll get that error message but if I tried opening it a few more times it'll eventually open. You could try that out, though I wouldn't hold your breath.

Would you be able either tell me if on your 2008 box you're able to open up 2012 RAW files or upload a 2012 RAW file so I can test on my machine?

I'll do a little poking around and see if I can find a reason it might not be working for you. Let me know if you make any progress.
Oct 11, 2013 at 9:58 PM

Ok, I tried opening it several times and always get the same error. I also tried opening a file generated by 2012 on the 2008 box and get the same error. I’m new to CodePlex and haven’t yet figured out how to upload a file but I’ll try attaching it to this email. And if that doesn’t work I’ll keep looking for the way to upload a file.

Oct 11, 2013 at 10:42 PM
Not a big deal, that was just something I was curious about. If it didn't work for you then I doubt it'll work for me. I think there is some new metadata in the 2012 SSIS RAW files (column sort I think). That could explain why new files don't work on old the 2008 R2 viewer. Hopefully the 2012+ viewer is backward compatible.

Anyway, back to getting it work in 2012. In Main.cs, around line 311 change the following code:
            catch (Exception)
            {
                MessageBox.Show("Error opening file. Selected file may be wrong type or corrupted.");
                CloseFile();
            }
to
            catch (Exception e)
            {
                MessageBox.Show(e.ToString());
                CloseFile();
            }
That should display the error the program is running into.
Oct 14, 2013 at 4:59 PM

Ok, here is the error:

System.Runtime.InteropServices.COMException (0xC0014006): Cannot create a task from XML for task "", type "" due to error 0x80070057 "The parameter is incorrect.".

at Microsoft.SqlServer.Dts.Runtime.Wrapper.IDTSExecutables100.Add(String bstrMoniker)

at RAW_File_Viewer.clsDataFlow.CreateSourceComponent(String strRAWFilePath) in c:\Users\DerekNorton\Desktop\SSIS Raw File Viewer\RAW File Viewer\DataFlow.cs:line 112

at RAW_File_Viewer.frmMain.OpenFile(String strRawFileName) in c:\Users\DerekNorton\Desktop\SSIS Raw File Viewer\RAW File Viewer\Main.cs:line 270

Oct 14, 2013 at 6:01 PM
Perfect, now we're onto something. Try changing DataFlow.cs line 39
        private const string _strDataFlowTaskMoniker = "SSIS.Pipeline.2";
to
        private const string _strDataFlowTaskMoniker = "STOCK:PipelineTask";
Hopefully that's that only change we need to make.
Oct 14, 2013 at 6:07 PM

Ok, now I get a new error:

System.Runtime.InteropServices.COMException (0xC0048021): Exception from HRESULT: 0xC0048021

at Microsoft.SqlServer.Dts.Pipeline.Wrapper.CManagedComponentWrapperClass.ProvideComponentProperties()

at RAW_File_Viewer.clsDataFlow.CreateSourceComponent(String strRAWFilePath) in c:\Users\DerekNorton\Desktop\SSIS Raw File Viewer\RAW File Viewer\DataFlow.cs:line 122

at RAW_File_Viewer.frmMain.OpenFile(String strRawFileName) in c:\Users\DerekNorton\Desktop\SSIS Raw File Viewer\RAW File Viewer\Main.cs:line 270

--

Derek Norton » Enterprise Applications • 801.590.7504

Oct 14, 2013 at 7:03 PM
From what I can tell, it doesn't like "DTSAdapter.RawSource.2" which I know was introduced in SSIS 2008 (it was formerly "DTSAdapter.RawSource.1"). I haven't been able to find any information about it changing for 2012.

One thing we could check is if the RawSource adapter is available on your system (I don't know why it wouldn't be...). Look at your registry and see if HKEY_LOCAL_MACHINE\SOFTWARE\Classes\DTSAdapter.RawSource.2 exists, if it does, what are the key/values within it.
Oct 14, 2013 at 7:10 PM

Well, there is no DTSAdapter.RawSource.2, but there is a DTSAdapter.RawSource.3. I tried changing the line

private const string _strSourceDFComponentID = "DTSAdapter.RawSource.2";

to

private const string _strSourceDFComponentID = "DTSAdapter.RawSource.3";

But then get the error:

System.Runtime.InteropServices.COMException (0xC0048021): Exception from HRESULT: 0xC0048021

at Microsoft.SqlServer.Dts.Pipeline.Wrapper.CManagedComponentWrapperClass.ProvideComponentProperties()

at RAW_File_Viewer.clsDataFlow.CreateDestinationReaderComponent() in c:\Users\DerekNorton\Desktop\SSIS Raw File Viewer\RAW File Viewer\DataFlow.cs:line 177

at RAW_File_Viewer.frmMain.OpenFile(String strRawFileName) in c:\Users\DerekNorton\Desktop\SSIS Raw File Viewer\RAW File Viewer\Main.cs:line 273

--

Derek Norton » Enterprise Applications • 801.590.7504

Oct 14, 2013 at 7:41 PM
Wow, I'm thoroughly surprised by that! I searched on Google for "DTSAdapter.RawSource.3" and there were no results so that's why I did think there were any more changes...

Since I'm not aware of a registry value to look for for the other data flow task, I'm going to ask you to create a new project (name doesn't matter), for the project type select: Visual C# > Windows > Console Application. Once it's created and open, right click on References > Add Reference (in the Solution Explorer), when the window pops up (could take a couple minutes) under the .NET tab, scroll down and select "Microsoft.SQLServer.ManagedDTS". Then open up Program.cs and paste the following:
using System;
using Microsoft.SqlServer.Dts.Runtime;

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            Application app = new Application();
            PipelineComponentInfos pcis = app.PipelineComponentInfos;
            foreach (PipelineComponentInfo x in pcis)
                Console.WriteLine(x.CreationName);
        }
    }
}
When you run that, paste the output here. A couple notes, if you run the program from VS, the console will probably disappear before you can copy the text, if you open up a command prompt and navigate to the build folder for the project and launch the program then the output won't disappear. Additionally, some lines are too long for the console and will wrap around, you can try fixing them or not, I can figure out where the new lines are supposed to be pretty easily.

Let me know if you have any problems with that.
Oct 14, 2013 at 8:22 PM

Ok, here is the output:

DTSAdapter.RawDestination.3

DTSTransform.PctSampling.3

DTSTransform.TermExtraction.3

AttunitySSISODBCDst.2

DataCollectorTransform.TxTopQueries.2

DTSTransform.MergeJoin.3

DTSAdapter.OLEDBSource.3

DTSAdapter.ExcelDestination.3

DTSTransform.SCD.3

DTSTransform.RowSampling.3

MSMDPP.PXPipelineProcessDimension.3

DTSTransform.Merge.3

MSMDPP.PXPipelineProcessDM.3

DTSAdapter.RawSource.3

DTSTransform.DerivedColumn.3

DTSAdapter.OLEDBDestination.3

DTSTransform.Lineage.3

DTSTransform.Sort.3

DTSTransform.Aggregate.3

DTSTransform.DataConvert.3

DTSTransform.Lookup.3

DTSTransform.ConditionalSplit.3

DataCollectorTransform.TxPerfCounters.2

DTSTransform.GroupDups.3

DTSAdapter.ExcelSource.3

DTSAdapter.FlatFileDestination.3

TxFileInserter.Inserter.3

DTSTransform.OLEDBCommand.3

AttunitySSISODBCSrc.2

TxFileExtractor.Extractor.3

DTSTransform.TermLookup.3

DTSTransform.Pivot.3

DTSTransform.UnionAll.3

DTSTransform.UnPivot.3

DTSTransform.Cache.2

DTSAdapter.RecordsetDestination.3

DTSTransform.CharacterMap.3

MSMDPP.PXPipelineDMQuery.3

DTSTransform.CopyMap.3

DTSAdapter.FlatFileSource.3

MSMDPP.PXPipelineProcessPartition.3

DTSTransform.RowCount.3

DTSTransform.BestMatch.3

DTSTransform.Multicast.3

DTSTransform.BalancedDataDistributor.2

DTSAdapter.SQLServerDestination.3

Attunity.SqlServer.CDCSplit.CdcSplitterComponent, Attunity.SqlServer.CDCSplit, V

ersion=1.0.0.0, Culture=neutral, PublicKeyToken=aa342389a732e31c

Attunity.SqlServer.CDCSrc.CdcSourceComponent, Attunity.SqlServer.CDCSrc, Version

=1.0.0.0, Culture=neutral, PublicKeyToken=aa342389a732e31c

KingswaySoft.IntegrationToolkit.DynamicsCrm.CrmOptionSetMappingComponent, Kingsw

aySoft.IntegrationToolkit.DynamicsCrm, Version=1.0.2012.0, Culture=neutral, Publ

icKeyToken=705df8e0751bcea7

KingswaySoft.IntegrationToolkit.DynamicsCrm.CrmDestinationComponent, KingswaySof

t.IntegrationToolkit.DynamicsCrm, Version=1.0.2012.0, Culture=neutral, PublicKey

Token=705df8e0751bcea7

KingswaySoft.IntegrationToolkit.DynamicsCrm.CrmSourceComponent, KingswaySoft.Int

egrationToolkit.DynamicsCrm, Version=1.0.2012.0, Culture=neutral, PublicKeyToken

=705df8e0751bcea7

Microsoft.SqlServer.Dts.Pipeline.ADONETDestination, Microsoft.SqlServer.ADONETDe

st, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91

Microsoft.SqlServer.Dts.Pipeline.DataReaderSourceAdapter, Microsoft.SqlServer.AD

ONETSrc, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91

Microsoft.SqlServer.Dts.Pipeline.DataReaderDestinationAdapter, Microsoft.SqlServ

er.DataReaderDest, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd808

0cc91

Microsoft.SqlServer.Dts.Pipeline.SqlCEDestinationAdapter, Microsoft.SqlServer.Sq

lCEDest, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91

Microsoft.SqlServer.Dts.Pipeline.ScriptComponentHost, Microsoft.SqlServer.TxScri

pt, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91

Microsoft.SqlServer.Dts.Pipeline.XmlSourceAdapter, Microsoft.SqlServer.XmlSrc, V

ersion=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91

Microsoft.Ssdqs.Component.DataCorrection.Logic.DataCorrectionComponent, Microsof

t.Ssdqs.Component.DataCorrection, Version=11.0.0.0, Culture=neutral, PublicKeyTo

ken=89845dcd8080cc91

--

Derek Norton » Enterprise Applications • 801.590.7504

Oct 14, 2013 at 8:35 PM
Perfect! You've got 2 changes to make (though I don't think the 2nd line is important).

DataFlow.cs Line 44
        private const string _strDestinationDFReaderComponentID = "Microsoft.SqlServer.Dts.Pipeline.DataReaderDestinationAdapter, Microsoft.SqlServer.DataReaderDest, Version=10.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91";
To
        private const string _strDestinationDFReaderComponentID = "Microsoft.SqlServer.Dts.Pipeline.DataReaderDestinationAdapter, Microsoft.SqlServer.DataReaderDest, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91";
DataFlow.cs Line 171
            _property.Value = "Microsoft.SqlServer.Dts.Pipeline.DataReaderDestinationAdapter, Microsoft.SqlServer.DataReaderDest, Version=10.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91";
To
            _property.Value = "Microsoft.SqlServer.Dts.Pipeline.DataReaderDestinationAdapter, Microsoft.SqlServer.DataReaderDest, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91";
I think it's a matter of changing the version from 10 to 11. That's the last data flow task so my fingers are crossed that we're good to go.
Oct 14, 2013 at 8:43 PM

That did it! It’s working great now. Thanks!!

Oct 14, 2013 at 10:06 PM
Great! I'll create a branch with the changes later for anyone else looking for a 2012 viewer. I'm a little disappointed that the 2008 R2 -> 2012 changes weren't well documented - oh well.
Oct 15, 2013 at 6:44 PM
Out of curiosity, could you tell me if the 2012 version will open 2008 RAW files?
Oct 15, 2013 at 9:01 PM

So, I can take a file created by SSIS 2008, move it to my 2012 system and it opens fine. I tried running the 2012 Raw File viewer on my 2008 machine but it fails with an error of:

An unhandled win32 exception occurred in RAW File Viewer.exe [3284].

I’m guessing it’s because the 2012 version referenced the newer SSIS dlls and those aren’t on the SQL 2008 box.

Oct 15, 2013 at 9:50 PM
Good to know - thanks!
May 9, 2014 at 8:01 PM
Howdy- Tried downloading, compile and running on my Win 7 dev PC and after compiling to 32 bit I try to open a SSIS 2012 RAW and get:
System.Exception was caught
HResult=-2146233088
Message=The package failed to execute.
Source=Microsoft.SqlServer.Dts.DtsClient
StackTrace:
   at Microsoft.SqlServer.Dts.DtsClient.DtsCommand.ExecuteReaderInThread()
   at Microsoft.SqlServer.Dts.DtsClient.DtsCommand.ExecuteReader(CommandBehavior behavior)
   at RAW_File_Viewer.frmMain.GetGridViewData(String strPath) in c:\Users\brownp\Documents\Visual Studio 2012\Projects\SSIS 2012 RAW File Viewer\RAW File Viewer\Main.cs:line 351
   at RAW_File_Viewer.frmMain.OpenFile(String strRawFileName) in c:\Users\brownp\Documents\Visual Studio 2012\Projects\SSIS 2012 RAW File Viewer\RAW File Viewer\Main.cs:line 288
InnerException:


It must be something missing in my environment since it works if it program installed on a SQL 2012 server and trying to open the same file. Maybe I'm misunderstanding and it can only run on a computer that has SSIS installed ?
thanks !
May 9, 2014 at 8:25 PM
Unfortunately the RAW File Viewer relies on certain DLL's being available on the system. I'm not very familiar with packaging DLL's and I couldn't find and good info as to whether it's even allowed. As of now, RAW File Viewer can only be run on machines with SQL Server installed - not ideal, I know.
Jun 25, 2015 at 5:20 PM
In case you haven't noticed, there is now a SSIS 2014 build available.
Jun 9, 2016 at 6:57 PM
I added a 2016 build.