Microsoft SQL Server Data Tools – Business Intelligence for Visual Studio 2013

Click here for the download link for Microsoft SQL Server Data Tools – Business Intelligence for Visual Studio 2013  – this installs Microsoft SQL Server Data Tools Business Intelligence project templates for Analysis Services, Integration Services, and Reporting Services that support Visual Studio 2013, SSIS 2012/2014 etc.

Unable to start execution of step 1 (reason: JobOwner domain\domainuser

On a server running SQL 2014 SSIS with SSISDB configured, one of the SQL Agent jobs configured to run using a proxy account kept failing with the error below.

Message

Unable to start execution of step 1 (reason: JobOwner domain\domainuser

doesn‘t have permissions to use proxy 1 for subsystem SSIS). The step failed.

Solution that worked for me in my situation. 

Query your proxys and see if that proxy is disabled. If so, enable it.

SELECT * FROM msdb.dbo.sysproxies

USE msdb ;

GO

EXEC dbo.sp_update_proxy

@proxy_name = ‘MyProxyUSerUser’,

@enabled = 1;

GO

 

Resolving SQL Server Agent Job Issue – System.InvalidOperationException: Unable to generate a temporary class (result=1)

Below is the final error message l kept getting when setting up a SQL Server Agent Job which ran an SSIS package. The SSIS package is designed to create a folder in a network share as well as copy some files into that folder.

 

Message
Microsoft (R) SQL Server Execute Package Utility
Version 10.50.4000.0 for 64-bit
Copyright (C) Microsoft Corporation 2010. All rights reserved.

Started:  11:03:22 AM
Error: 2014-10-07 11:03:23.35
Code: 0x00000001
Source: Create Reports
Description: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. —> System.InvalidOperationException: Unable to generate a temporary class (result=1).
error CS2001: Source file ‘C:WindowsTEMPp6e47evu.0.cs’ could not be found
error CS2008: No inputs specified

at System.Xml.Serialization.Compiler.Compile(Assembly parent, String ns, XmlSerializerCompilerParameters xmlParameters, Evidence evidence)
at System.Xml.Serialization.TempAssembly.GenerateAssembly(XmlMapping[] xmlMappings, Type[] types, String defaultNamespace, Evidence evidence, XmlSerializerCompilerParameters parameters, Assembly assembly, Hashtable assemblies)
at System.Xml.Serialization.TempAssembly..ctor(XmlMapping[] xmlMappings, Type[] types, String defaultNamespace, String location, Evidence evidence)
at System.Xml.Serialization.XmlSerializer.GetSerializersFromCache(XmlMapping[] mappings, Type type)
at System.Xml.Serialization.XmlSerializer.FromMappings(XmlMapping[] mappings, Type type)
at System.Web.Services.Protocols.SoapClientType..ctor(Type type)
at System.Web.Services.Protocols.SoapHttpClientProtocol..ctor()
at ReportExecutionService..ctor()
at ST_960eb2bb9aa341f4a31d1409aa0aadbb.csproj.ScriptMain.Main()
— End of inner exception stack trace —
at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams)
at Microsoft.SqlServer.Dts.Tasks.ScriptTask.VSTATaskScriptingEngine.ExecuteScript()
End Error
DTExec: The package execution returned DTSER_FAILURE (1).
Started:  11:03:22 AM
Finished: 11:03:23 AM
Elapsed:  0.546 seconds

 

Resolution:

  • Create a credential on the security level of the sql server instance
  • USE [master]

    GO

    CREATE CREDENTIAL [CredOne] WITH IDENTITY = N’DomainCredOneUser’, SECRET = N’Password’

    GO

  • Create a proxy on the job module of the sql server instance
  • USE [msdb]

    GO

    EXEC msdb.dbo.sp_add_proxy @proxy_name=N’CredOne’,@credential_name=N’CredOne’,

    @enabled=1,

    @description=N’My description’

    GO

    EXEC msdb.dbo.sp_grant_proxy_to_subsystem @proxy_name=N’CredOne’, @subsystem_id=2

    GO

    EXEC msdb.dbo.sp_grant_proxy_to_subsystem @proxy_name=N’CredOne’, @subsystem_id=3

    GO

    EXEC msdb.dbo.sp_grant_proxy_to_subsystem @proxy_name=N’CredOne’, @subsystem_id=10

    GO

    EXEC msdb.dbo.sp_grant_proxy_to_subsystem @proxy_name=N’CredOne’, @subsystem_id=9

    GO

    EXEC msdb.dbo.sp_grant_proxy_to_subsystem @proxy_name=N’CredOne’, @subsystem_id=11

    GO

    EXEC msdb.dbo.sp_grant_proxy_to_subsystem @proxy_name=N’CredOne’, @subsystem_id=12

    GO

  • Ensure the network share folder has full control permission given to the user domainuser
  • Ensure modify permission is given to that same domain account to the folder c:windowstemp on the server box
  • The SQL Job should now run without issues

 

SSIS 2008 R2 to SSIS 2014

Notes:

After performing an in-place upgrade on a SQL 2008 R2 server to SQL 2014, l had access issue to SSIS 2014.

I also noticed [rom SSCM SQL Server Configuration Mananger] that SSIS 2008 R2 ie SSIS version 10.0 was still running, using the NT Autohoritynetworkservice account while SSIS 2014 ie version 12.0 was also running – but using the nt servicemsdtsserver120 local account.

From a remote SSMS 2008 R2 window, l could access the target SSIS instance and it shows up with version 10.50.4000 [the number for SSIS 2008 R2]

From the local upgraded server’s SSMS 2014 , connecting to the target SSIS 2014 shows a connection with version number 12.0.2000

Steps taken to resolve the initial access issue.

 

ssis_12_issue

Corporations Data Extract Download into Microsoft SQL Server

In this post l will be detailing the steps l used to ETL – Extract Transform and Load into a Microsoft SQL Server 2012 database from Washington State Corporations Data download. This showcases SQL Server inbuilt SSIS [SQL Server Integration Services] Data import and export wizard. We will be working with the text (tab limited) and not the XML version first.

1)

First download the text form data file from this link, click here.

Unzip the file as shown below.

p1

2)

Create a database bucket and re-size to accomodate a large data import and reasonable file growth by value instead of percentage which is less efficient.

create database CorporationsDataWA;

USE [master]
GO
ALTER DATABASE [CorporationsDataWA]
MODIFY FILE ( NAME = N’CorporationsDataWA’, SIZE = 512000KB , FILEGROWTH = 102400KB )
GO
ALTER DATABASE [CorporationsDataWA]
MODIFY FILE ( NAME = N’CorporationsDataWA_log’, SIZE = 102400KB , FILEGROWTH = 102400KB )
GO

p2

p3

 

3)

Below show step by step screenshots of the ETL process. I also chose to save the SQL server generated workflow process for this ETL as a separate SSIS package for later review, and execution.

Notice the ETL error message generated. The default column width of 50 characters for the business name and address fields was not enough to handle the input data without truncation, l tried 1100 and finally settled for 200 characters for each of these name, address fields. And that worked. With a clear data dictionary one might have known beforehand the maximum characters for those data fields in the text limited input data file.

Arrows indicate important entry fields or steps. Click on images for a larger version.

3-29-2014 11-40-55 AM 3-29-2014 11-41-35 AM 3-29-2014 11-44-03 AM 3-29-2014 11-44-18 AM 3-29-2014 11-48-37 AM 3-29-2014 11-49-00 AM 3-29-2014 11-49-37 AM 3-29-2014 11-49-54 AM 3-29-2014 11-50-27 AM 3-29-2014 11-52-48 AM 3-29-2014 11-53-01 AM 3-29-2014 11-53-32 AM 3-29-2014 11-56-06 AM 3-29-2014 11-56-34 AM 3-29-2014 11-56-50 AM 3-29-2014 11-57-14 AM 3-29-2014 11-58-17 AM 3-29-2014 11-59-01 AM 3-29-2014 11-59-12 AM 3-29-2014 11-59-45 AM 3-29-2014 12-00-54 PM

 

B)

Importing Governing People (same process as above)

3-29-2014 12-35-53 PM 3-29-2014 12-36-30 PM 3-29-2014 12-36-42 PM 3-29-2014 12-36-52 PM 3-29-2014 12-37-03 PM 3-29-2014 12-37-59 PM 3-29-2014 12-38-14 PM 3-29-2014 12-38-32 PM 3-29-2014 12-38-54 PM 3-29-2014 12-39-20 PM 3-29-2014 12-39-32 PM 3-29-2014 12-40-03 PM 3-29-2014 12-40-48 PM 3-29-2014 12-41-03 PM

 

Below are screenshots showing one of the SSIS packages, with content(s) settings.

3-29-2014 1-39-29 PM 3-29-2014 1-43-33 PM 3-29-2014 1-44-15 PM 3-29-2014 1-45-04 PM 3-29-2014 1-45-21 PM 3-29-2014 1-45-47 PM 3-29-2014 1-46-16 PM

Microsoft SSIS 2012 Data Import – WA State Corporation Data

Below are screenshots of SSIS – Microsoft SQL Server Integration Services 2012 importing data from Washington State Secretary of State Corporations public data file. Click here for the source link.

8-1-2013 11-59-08 PM 8-1-2013 11-58-58 PM 8-1-2013 11-58-40 PM 8-2-2013 12-02-16 AM 8-2-2013 12-01-27 AM 8-1-2013 11-59-41 PM 8-2-2013 12-00-00 AM

 

Below is the target table creation T-SQL code

USE [CorpWA]
GO

/****** Object: Table [dbo].[Corporations] Script Date: 8/2/2013 12:16:57 AM ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

SET ANSI_PADDING ON
GO

CREATE TABLE [dbo].[Corporations](
[UBI] [varchar](50) NULL,
[BusinessName] [varchar](50) NULL,
[Category] [varchar](50) NULL,
[StateOfIncorporation] [varchar](50) NULL,
[DateOfIncorporation] [varchar](50) NULL,
[ExpirationDate] [varchar](50) NULL,
[Duration] [varchar](50) NULL,
[DissolutionDate] [varchar](50) NULL,
[RecordStatus] [varchar](50) NULL,
[Type] [varchar](50) NULL,
[RegisteredAgentName] [varchar](50) NULL,
[RegisteredAgentAddress] [varchar](50) NULL,
[RegisteredAgentCity] [varchar](50) NULL,
[RegisteredAgentState] [varchar](50) NULL,
[RegisteredAgentZip] [varchar](50) NULL,
[AlternateAddress] [varchar](50) NULL,
[AlternateCity] [varchar](50) NULL,
[AlternateState] [varchar](50) NULL,
[AlternateZip] [varchar](50) NULL
) ON [PRIMARY]

GO

SET ANSI_PADDING OFF
GO

 

 

USE [CorpWA]
GO

/****** Object: Table [dbo].[GoverningPersons] Script Date: 8/2/2013 12:20:44 AM ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

SET ANSI_PADDING ON
GO

CREATE TABLE [dbo].[GoverningPersons](
[UBI] [varchar](50) NULL,
[Title] [varchar](100) NULL,
[FirstName] [varchar](100) NULL,
[MiddleName] [varchar](100) NULL,
[LastName] [varchar](100) NULL,
[Address] [varchar](100) NULL,
[City] [varchar](50) NULL,
[State] [varchar](50) NULL,
[Zip] [varchar](50) NULL
) ON [PRIMARY]

GO

SET ANSI_PADDING OFF
GO

Results – Table Report

8-2-2013 12-21-48 AM