Tag Archives: Hack

Issues upgrading an SSIS solution/package from Visual Studio 2012 to VS 2013

Microsoft SQL Server 2012 and 2014 has feature parity for SSIS and from a general/development/deployment point of view there is not a lot of exciting things to write about. A main difference is that for SQL Server 2012 the development environment is based on Visual Studio 2012 and for SQL Server 2014 the development environment is based on Visual Studio 2013.

Even though the feature set is the same the compatibility is limited, as described in this blog post from Microsoft: http://blogs.msdn.com/b/analysisservices/archive/2014/04/03/sql-server-data-tools-business-intelligence-for-visual-studio-2013-ssdt-bi.aspx meaning it is still important to use the right tool and right version for the right version of deployment server.

If you are looking for the SSIS BI tools for SQL Server 2012 they are available here: http://www.microsoft.com/en-us/download/details.aspx?id=36843, and for SQL Server 2014 they are available here: http://www.microsoft.com/en-au/download/details.aspx?id=42313. Remember that the plain SSDT SQL Server data tools are for development of database schemas etc. and not for BI work in SSRS/SSIS/SSAS. for BI work the similarly named SSDTBI tools needs to be installed.

It is possible to develop and run the SSIS packages in Visual Studio 2012 and target a SQL Server 2014 environment but for actual deployment to be able to run it scheduled using DTExec.exe or through the SSIS catalogue the project has to be in Visual Studio 2013/SQL Server 2014 format.

The upgrade process seems straightforward; just open the 2012 solution in Visual Studio 2013 and run though the upgrade wizard. However some times there are issues in the upgrade process. This blog post describes one such scenario where the upgrades failed and error messages indicates all sorts of issues.

It turns out that the code/xml parsing of the existing 2012 packages are making some interesting assumptions and that by simply moving the version tag to the top of the xml document the upgrade will work as expected.

Example walk-through:

1, open existing SSIS Visual Studio 2012 solution in Visual Studio 2013.

The open process will pick up the version difference and suggest an upgrade.

image

 

2, run through the upgrade process.

In this case the upgrades failed for all of the SSIS packages in the solution.

image

3, try to open a failed package and read through the error list.

Opening the package will give the following error:

image

 

The design view window shows the main error and there is a list of other errors in the error window/list

image

Main error:

Error    42    Error loading ‘packagename.dtsx’ : The package failed to load due to error 0xC0010014 “One or more error occurred. There should be more specific errors preceding this one that explains the details of the errors. This message is used as a return value from functions that encounter errors.”. This occurs when CPackage::LoadFromXML fails.  .    C:\path\packagename.dtsx    1    1

Some other errors in the list:

Error    41    Error loading packagename.dtsx: Failed to load task “DFT – name”, type “”. The contact information for this task is “Performs high-performance data extraction, transformation and loading;Microsoft Corporation; Microsoft SQL Server v10; (C) 2007 Microsoft Corporation; All Rights Reserved;http://www.microsoft.com/sql/support/default.asp;1″.      C:\path\packagename.dtsx    1    1

 

Error    33    Error loading packagename.dtsx: Element “Package\SCT – Placeholder.EventHandlers[OnPreExecute]\Pre-Initialise Event” does not exist in collection “Executables”.      C:\path\packagename.dtsx    1    1

 

Error    1    Error loading packagename.dtsx: Cannot create a task from XML for task “EST – Set VARIABLE”, type “Microsoft.SqlServer.Dts.Tasks.ExecuteSQLTask.ExecuteSQLTask, Microsoft.SqlServer.SQLTask, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91” due to error 0xC001F430 “An error occurred while accessing an internal object. This could indicate a custom extension built for Integration Services 2005 is being used.”.      C:\path\packagename.dtsx    1    1

 

 

4, Open the package using the code view to see the underlying xml document.

image

use the view menu or press F7 to open the Code XML view of the SSIS package.

 

5, Locate and move the version tag (PackageFormatVersion) to the top.

Place the <DTS:Property DTS:Name=”PackageFormatVersion”>6</DTS:Property> on the row after the <DTS:Executable…/> statement

search for the text and remove the existing line that in this case was towards the bottom of the file and place it on the 3rd line.

 

6, Save and reopen the design view and the package will work as expected.

Once the package is saved the upgrade engine will automatically and properly upgrade the package to the new version and the package will display the new xml structure in the xml view. (SQL Server 2014 and Visual Studio 2013 uses PackageFormatVersion 8 as version definition.

reopening the package in design view will now work as expected.

 

image

Workarounds for problems using Jetpack and https on Azure Websites

This entry is part 5 of 7 in the series Blog Meta

This is a follow up post on: Moving the blog to azure web sites: http://www.stefanjohansson.org/2013/05/moving-the-blog-to-azure-websites/

2013-07-09: Update 2 – As of Version 2.3.1 the Jetpack plugin and the WordPress cloud have  been updated to support more SSL scenarios. Jetpack should now work without issues and configuration changes. The post below is still valid for other connected systems that doesn’t like mismatched SSL certificates.

Introduction

One key feature missing from Azure Web Sites is the possibility to run your own SSL certificate for encrypted https traffic.

2013-06-03: Update 1 – https, SSL and certificates for custom domain names are now launched and available (for sites running in “reserved mode”) – read more here: http://www.windowsazure.com/en-us/develop/net/common-tasks/enable-ssl-web-site/ The information below still applies in case you don’t want to use a reserved mode site.

This pretty much disables it for any real business use whatsoever.

Every single professional I have spoken with regarding this have chosen alternate solutions for their projects and tests. As usual a key problem here is no official words on availability and firm delivery dates to relate to. Finding a blog post or discussion thread where someone says it might be available as a feature in the future just doesn’t enable project budgets to be spent on Azure Web Sites even for tests and explorations.

Continue reading

Unable to create folder in SharePoint 2013 library

1-aspx_debug_error

This error, “Sorry, something went wrong. The aspx_debug attribute on the page directive is not allowed in this page” occurs when trying to create a folder in some types of document libraries, such as the Report Document Library used for SQL Server Reporting Services report documents in SharePoint 2013.

The error comes from some bad /Upload.aspx files that are used by SharePoint 2013.

identifying the upload file for a Report Document Library gives us this standard file path:

C:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\TEMPLATE\FEATURES\ReportsAndDataListTemplates\ReportDocumentLibrary\Upload.aspx

The standard contents:

3-upload_aspxfile

By updating the contents with something that makes more sense we can get the folder creation feature to work again:

workingfilecontents

Do note that all page directives needs to go, and we need to update the UIVersion property from 15 to 4 otherwise we just get new exciting errors.

Continue reading

How to: move or remove the “Leave A Reply” link in the Twenty Twelve theme

This entry is part 4 of 7 in the series Blog Meta

This post describes how to move or remove the “Leave a reply” link that appears below the post heading in the Twenty Twelve theme for WordPress.

before

Link placement before edit…

The fastest and easiest way for a self hosted blog is to simply override the CSS styles that governs the link by editing the custom CSS that is part of WordPress:

wordpress_css

Link to Edit CSS in the WordPress admin site.

By adding the following CSS styles the link is moved:

#content .post {
    position: relative;
}

#content .comments-link {
    position: absolute;
    bottom: 1em;
}

#content .post {
    padding-bottom: 3em;
}

 

css

(The first two rules moves the link to the bottom, the last one adds some padding that I felt was needed)

The result is that the “Leave a reply” link is below the post, as seen below:

after

Link placement after edit…

If you rather not have the link at all, it is easily removed by adding the following CSS:

#content .comments-link {
    display: none;
}

 

cssnodisplay

Result after display:none;

nolink

The actual comments box is still visible and available in the post itself in case you still want to be able to get comments on posts.

How to: remove the WordPress link in the Twenty Twelve Infinite Footer

This entry is part 3 of 7 in the series Blog Meta

Updated Post:

(2013-02-23)

Ok, so the first try, described below, wasn’t really working out for me. The original files are updated too often during updates, meaning the link changes back all the time.

So, instead I use the CSS to override the original information.

Change the site CSS by going to the admin site, choose Appearance, choose Edit CSS.
the div holding the “Proudly powered by WordPress”-link and the “Theme: Twenty Twelve”-text uses the CSS-class “blog-credits”.
There are several approaches one might use to alter the appearance. I will use the quick and not so very sophisticated option of just removing the content. Since there is no information I need to replace the existing with, I’ll just use the display:none; CSS rule to remove it.

So, add the following code to the CSS Stylesheet Editor content and the information should stay hidden even after updates to the core files.

.blog-credits {
    display: none;
}

Original Post:

In the original plain Twenty Twelve theme for WordPress (currently in use on this site) there is an infinite scroll feature. This feature introduces a footer once it kicks in. That footer links back to WordPress. To change this footer credits information I did the following.

Please note that this will be overwritten when the theme updates. So this is a note to self once it updates and I wonder why…

Step 1, go to the WordPress dashboard.

Step 2, go to the Plugins editor

plugins_ss

Step 3, Choose the correct plugin to edit. The infinite scroll feature is in the Jetpack plugin.

edit_plugin_ss

Step 4, Choose the correct file to edit. The footer credits is defined in the “jetpack/modules/infinite-scroll/infinity.php”

choose_file_to_edit_ss

Step 5, change the credits lines to your liking. The definition of $credits is in the infinite blog footer function towards the end of the file.

rows_to_edit

A lingering question is if the infinite scroll is a good feature or if it should be removed and the blog front page changed back to the paging of old…