Thursday, August 28, 2014

Test LightSwitch OData services with Fiddler v 2.4.x

Make a visual Studio 2013 Lightswitch app based on the Northwind SQL database.

Application name: NorthwindLS

Data Source: NorthwindData

The Lightswitch app is published to an IIS server ‘myhost’

Normally the media format of the OData will be ‘atom’.

To show result in JSON format with Fiddler

Start Fiddler v 2.4.x

In the composer tab next to the GET command, enter the URL of the Odata service published by the Lightswitch app: http://myhost/NorthwindLS/NorthwindData.svc

In the textbox under the GET command, there are 2 lines of text that are sent to the server

User-Agent: Fiddler
Host: myhost

Add a 3rd line: Accept: application/json;odata=verbose

image

click the Execute button to execute the Get command. The response will be in JSON format.

Friday, August 22, 2014

Environment variable in SSIS not being recognized

Article about Environment variable in SSIS not being recognized by James Serra

If the SSIS package is being scheduled to run in a SQL server job then the SQL server agent service needs to be restarted to recognize the environment variable change.

Thursday, August 14, 2014

Change from Package connections to Project connections while upgrading packages to SSIS 2012

Migration of SSIS 2008 project to SSIS 2012. All packages have package connections, that need to be replaced by project connections to simplify maintenance. Problem is to go into the design of each and every package and replace every single use in source or destination or in SQL tasks.

Do not change the packages yet with package connections.

Make a backup of each package file!!!

Create all the new project Connections.

Create a new package where you will use all the Project connections, just for reference. A dataflow with source for each connection will suffice. We’ll need this.

Save the package and close it. right-click on it and select <> view code

In the XML code you will find the <connections>

<connections>
  <connection
    refId="Package\Data Flow Task\OLE DB Source.Connections[OleDbConnection]"
    connectionManagerID="{8EFE3DB7-FEF4-4921-8B90-B8A3D730A546}:external"
    connectionManagerRefId="Project.ConnectionManagers[AdventureWorksDW2012]"
    description="The OLE DB runtime connection used to access the database."
    name="OleDbConnection" />
</connections>

Inside a <connection> we find the project connectionManagerID and the connectionManagerRefId


For each Package with package connections, use the editor to find each source or destination that uses the package connection



<connections>
  <connection
    refId="Package\Data Flow Task\OLE DB Source.Connections[OleDbConnection]"
    connectionManagerID="Package.ConnectionManagers[AdventureWorks]"
    connectionManagerRefId="Package.ConnectionManagers[AdventureWorks]"
    description="The OLE DB runtime connection used to access the database."
    name="OleDbConnection" />
</connections>

Replace the connectionManagerID and the connectionManagerRefId by the project connectionManagerID and the connectionManagerRefId.