SSIS :- Exception – Microsoft.SqlServer.Dts.Pipeline.ComponentVersionMismatchException

Background

Deployed a new SSIS package.

It is time to test it out.

But, really having problems.

Error

Error Text


OriginalReference Transformation:Error: The component metadata for "OriginalReference Error Dump Generator"
could not be upgraded to the newer version of the component. The PerformUpgrade method failed.

OriginalReference Transformation:Error:
Microsoft.SqlServer.Dts.Pipeline.ComponentVersionMismatchException: The version of OriginalReference Error
Dump Generator is not compatible with this version of the DataFlow. [[The version or pipeline version or both for the
specified component is higher than the current version.

Microsoft.SqlServer.Dts.Pipeline.ManagedComponentHost.HostCheckAndPerformUpgrade
(IDTSManagedComponentWrapper100 wrapper, Int32 lPipelineVersion)<span id="mce_SELREST_start" style="overflow:hidden;line-height:0;">&#65279;</span>

Error Image

dataOrPipelineVersionIsGreater.01.20190823.0656AM.png

Troubleshooting

Googled for help.

Landed @

Title :- Deploying single SSIS package to SQL 2016 from SSDT 17.0-17.4
Description :- Deploying a single SSIS package with VB script task, targeted for SQL 2016 from SSDT 17.0-17.4 causes the script tasks to not execute but the package deploys and executes reporting success. .
Link :- Link

Contributor

Danni juhl

Danni juhl commented · January 19, 2018

I’ve previously seen issues with installations where both SQL 2016 SSMS and 17+ SSMS are installed, where doubleclicking an *.ispac opens it by default with the 140 Deployment Wizard, and thus failing on script components.

Based on this, I believe the issue being in the DeploymentWizard shipped with 17+, which isn’t backwards compatible with SQL 2016.

Remediation

My issue is that I have a few versions of SQL Server Management Studio ( SSMS ) installed on the machine.

The SQL Server instance I targeted, version number is 2014.

But, the client I am using is running 2017.

To remediate :-

  1. Launch SQL Server Management Studio ( SSMS ) that matches your server version
    • In our case our server is v2014, launched SSMS v2014
  2. Overwrite previously deployed package with same one
    • The only difference is that we are using matching version number

 

Dedicated

Dedicating to my tokayo, Danni Juhl.

 

Community

No doubt, I was down on myself on this one.

But, then the community came through.

Here is to the Microsoft Community.

I only write for one thing.  The community.

Perl :- Temporary Files

Background

In the middle of troubleshooting a fading Perl Script.

Error

Thankfully, I have an error message it reads.

Error Text

error.removingbinfile.01.20190807.1145AM.png

Error Image


Error removing C:/Users/dadeniji/AppData/Local/Temp/tmp_myAppZay.bin

Trouble Shooting

Code Review

I reviewed the code and here is what it looks like.

Snippet


my $file;
$file = tempfile
         (
            'tmp_therapy_XXXX'
            , SUFFIX => '.bin'
            , DIR => $TMP_DIR
            , UNLINK => 1
         );

Explanation

  1. Read up more and determined that the UNLINK says
    • Upon app completion , do clean up
    • Remove all temporary files

Sample Code

Code Snippet


#!/usr/bin/perl
use strict;
use warnings;
use File::Temp qw(tempfile);
use File::Basename;

my $username;
my $format;
my $learning;
my $fileTemp;
my $ts;

my $moduleName;
my @suffixlist;
my $moduleMajor;
my $fileNameTempFilePrefix;

# dadeniji remove tempfile or not
my $tempFileUnlink;

$tempFileUnlink=1;
$tempFileUnlink=0;

#get module name
$moduleName = basename($0);
$moduleMajor = basename($moduleName, @suffixlist);

$username =  $ENV{'USERNAME'}; 

$learning = "Who is learning Perl Today ? $username\n"; 

print $learning; 

$fileNameTempFilePrefix = "$moduleMajor" . "XXXXX";

# remove the file when the reference goes away with the UNLINK option
$fileTemp = new File::Temp
	(
		  $fileNameTempFilePrefix
		, SUFFIX => '.tmp'
		, UNLINK => $tempFileUnlink
	);

# print filename
print "temp filename: $fileTemp\n";

# write into $file
print $fileTemp "Module name is $moduleName\n";

# write into $file
print $fileTemp $learning;

Output

fs.sample.01.20190807.1212PM.PNG

Explanation

The little application I placed together works.

 

Trouble Shooting More

SysInternals

Process Monitor

Launched SysInternals’ process Monitor.

Filtered on my designated temp folder.

Tracked the error down to a sharing violation.

Source Code Control

GitHub

DanielAdeniji\perlSample
Link

 

Dedicated

Dedicating to Larry Wall.

PostgreSQL :- Datatype – bpchar

Background

I went back and started reviewing the script uses for creating the customer table in the Northwind database.

northwind

pthom

We are using the script furnished by pthom.

It is published via GitHub and availed here.

Here is the portion that creates the customer table

--
-- Name: customers; Type: TABLE; Schema: public; Owner: -; Tablespace:
--
CREATE TABLE customers (
    customer_id bpchar NOT NULL,
    company_name character varying(40) NOT NULL,
    contact_name character varying(30),
    contact_title character varying(30),
    address character varying(60),
    city character varying(15),
    region character varying(15),
    postal_code character varying(10),
    country character varying(15),
    phone character varying(24),
    fax character varying(24)
);

What is bpchar?

The customer_id column is defined as bpchar not null.

I am thinking what is bpchar?

Google end up defining bpchar as

Effectively in bpchar b stands for blank and p stands for padded and bpchar is same as char(n) or character(n) , a blank padded to n length string…

So it appears to be fixed length character data type.

Varchar

BTW, in PostgreSQL varchar is defined using this template

column-name character varying(length) nullability

And, so company name will be :-

company_name character varying(40) NOT NULL

bpchar (Length Defined)

If you find that you will like your character columns length rigidly defined, then issue something such as

column-name char(length) nullability

And, so company name will be :-

customer_id char(5) NOT NULL

Metadata

Column

information_schema.columns

Let us use the information_schema.columns view to better understand how column definition is exposed.

SQL


 select
	     tblISC.table_catalog as "catalog"

       , tblISC.table_schema  as "schema"

       , tblISC.table_name    as "table"

       , tblISC.column_name   as "column"

       , tblISC.ordinal_position as "postion"

       , tblISC.data_type        as "dataType"

       , tblISC.udt_name         as "userdefinedName"

       , tblISC.character_maximum_length as "maxLength"

       , case

             when tblISC.character_maximum_length is null then 'Null'
             else cast(tblISC.character_maximum_length as varchar(30))
         end as "maxLengthInterpreted"

       , tblISC.character_octet_length as "octetLength"

       , tblISC.character_octet_length
       		/ nullif
       		   (
       	            tblISC.character_maximum_length
       	          , 0
               ) as "bytesPerCharacter"

from   information_schema.columns tblISC

where  tblISC.table_schema = 'public'

and    tblISC.table_name in ( 'customers')

Output

Image – bpchar

northwind.customer.bpchar.01.20190728.1231PM

Image – char(n)

northwind.customer.char.lengthSpecfied.02.20190728.1233PM

XPath code Generator – Web Tools

Background

Wanted to quickly review freely available online tools for generating Xpath from XML documents.

Sample XML Documents

Will use these XML documents as samples :-

  1. Microsoft
    • Docs. / NET / C# Guide / Programming guide / Programming concepts / LINQ
      • Sample XML File: Customers and Orders in a Namespace
        Link

 

Tools

  1. Xmltoolbox
    • XPath Generator
  2. Qutoric
  3. XPather.com

 

In depth

Xmltoolbox

XPath Generator

Author

Xmltoolbox is authored by Ole Bille.

Usage

Outline
  1. Launch web browser
  2. And, go here ( http://xmltoolbox.appspot.com/xpath_generator.html )
  3. Paste the XML text into the canvas
  4. In the loaded canvas, click on the elements you want evaluated
  5. Please review and capture the generated Xpath results

 

Screenshots

xpathgenerator.20181217.0344AM

qutoric

PathEnq

Usage

Outline
  1. Launch web browser
  2. And, go here ( http://www.qutoric.com/xslt/analyser/xpathtool.html )
  3. Invoke the Choose File button at the bottom of the screen
  4. Select the file to be evaluated
  5. In the loaded canvas, click on the elements you want evaluated

 

Screen Shots

xmlSource.20181217.0319AM

xmlSource.20181217.0322AM

 

XPather.com

Author’s Guideline

  1. This web app enables you to query XML/HTML documents with your browser in real time. It can generate queries for you too!
    • You can enter your xpath query in the top-left panel and it will be instantly executed against this document.
    • To generate an xpath query for a specific element, please hold CTRL and hover over it. An xpath is generated.

Usage

To generate an XPath, please paste the XML into the canvas.

Once the XML is available and accessible, please move your cursor to the screen area, hold down the Ctrl button while hovering or selecting the XML tag or body.

Samples

Sample #1

xpather.com.20181217.0308AM

Deficiency

  1. Supports Element, but not attribute

 

 

 

 

 

Visual Studio – Error – “Could not load file or assembly ‘netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51’ or one of its dependencies.”

Background

Upon preparing Visual Studio to be able to develop mobile applications courtesy of Xamarin, ran into a blocking issue right away.

Set the Stage

Setting the stage for our error is easy  and it goes :-

  1. Launch Visual Studio
  2. Elected to design new Project
  3. Chose Project based on Mobile / Xamarin
  4. The system prepares the baseline project
  5. Attempted to build the project

Error

Error Image

CouldNotloadfileorassemblynetstandard.20181207.0340AM.PNG

Error Text


Could not load file or assembly 'netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies.

Troubleshooting

Microsoft .Net Version

Review the version of Microsoft .Net that is installed.

Windows Explorer

Launched Windows Explorer and entered %windir%\Windows\Microsoft.NET\Framework64 as targeted folder.

Image

WindowsExplorer.20181207.0401AM

Explanation

We have a Version 4 version of Microsoft .Net installed; The baseline version # is v4.0.30319.

Please keep in mind that patches to this baseline might be installed, as well.

 

Registered Files

Registered File – netstandard.dll

Accessed %windir%\Windows\Microsoft.NET\Framework64  to determine if the referenced Assembly, netstandard.dll is present.

Confirmed it is not.

Remediation

Microsoft .Net Version

Goal

Installing .net framework 4.7.1 and above will help!

Artifacts

Availability

Please access https://dotnet.microsoft.com/download ( Link ) and see if there are newer versions of .Net than the one you have installed.

As of this morning, 2018-12-07, here is what is available.

Image

DotNetArtifacts.20181207.0826AM

Explanation

The latest .Net Framework, not the .Net Core, is 4.7.2.

 

Product :- v4.7.2

Image

DotNetArtifacts.4.7.2.20181207.0832AM.PNG

Explanation
  1. .Net Framework 4.7.2
    • Products
      • Build apps – Dev pack
      • Run apps – Runtime

We chose the Developer pack ( offline installer ).

Installer

Install

Images
License Terms

licenseTerms.20181207.0417AM.PNG

Setup Successful

setupSuccessfully.20181207.0426.PNG

 

Restarted Machine

Restarted Machine

Validation

Assemblies

Assembly – netstandard.dll

Windows Explorer

Accessed Windows Explorer and targeted C:\Windows\Microsoft.NET\Framework64\v4.0.30319

Steps

Took the following steps :-

  1. Folder View
    • Columns
      • Added Date Created
    • Sort/Order
      • Ordering by Date Created
Image

WindowsExplorer.20181207.0843AM.PNG

Explanation
  1. netstandard.dll now included

 

Visual Studio

Project Build

Launched Visual Studio, loaded our mobile project, and it compiled successful with a couple of non-blocking warnings.

Image

newProject.errorList.noerrors.20181207.0516AM.PNG

Explanation

  1. As we do not have a Mac attached expected this warning.

 

Referenced Work

  1. xamarin
    • xamarin/Xamarin.Forms
      • Xamarin.Forms.Build.Tasks.GetTasksAbi build error #2667
        Link
    • forums.xamarin.com
  2. David Kean
    • Twitter ( @davkean )
      • Folks this is a bug in the Xamarin task – it’s making the assumption netstandard is in the GAC.
        Link

Microsoft – Access Database Viewer

Background

Have a database that I need to review.

Unfortunately it is a Microsoft Access Database and I do not have Access installed.

And, so googled for opportunities.

Sample Databases

You likely want to try things out against sample databases before hand.

Here are some sample databases that are available online.

  • Microsoft Office Access 2010
    • Links
      • Download Sample Databases
        Link

 

Tools

Here are some sample databases that are available online.

  • Online
    • Maklabu GmbH
      • MDB Opener
  • Desktop
    • Alex Nolan
      • MDB Viewer Plus