Stop Azure Data Factory SSIS Integration Runtime

This short post shows you how to stop the Azure Data Factory SSIS Integration Runtime. Why you need to do that? It will be very costly if you let it running. When you go into Azure Data Factory. Click on Author & Monitor.

Click on the monitor at the left bother.

You will see the Integration Runtime is Running or Stopped. But if it is running you cannot stop it here.

You need to select the Manage then choose Integration runtimes .

Then you can choose either Start or Stop.

Posted in .Net, Cloud, Community, Computers and Internet, Data Platform | Tagged , | Leave a comment

CTO July 2020 articles and resources

These are the good reads found in this month.

SECRET WEAPON IN YOUR ENTREPRENEURIAL SUCCESS: SOLUTION ARCHITECT

In a nutshell, you could summarize the roles of a solution architect as follows:

  • Analyzing the tech space for appropriate solutions.
  • Harmonizing tech with enterprise solutions.
  • Overseeing project management.
  • Analyzing documentation demands
  • Controlling solutions development
  • Developing structures for cooperation

http://thestartupmag.com/secret-weapon-entrepreneurial-success-solution-architect/

The Changing Role of the EA in an Increasingly Agile World

To be successful, you focus on three key areas:

  1. Know the code
  2. Make the architecture visible to everyone
  3. Build bridges between teams

https://www.architectureandgovernance.com/elevating-ea/the-changing-role-of-the-ea-in-an-increasingly-agile-world/

4 tips for getting the business to stop hating IT


https://www.cio.com/article/3545389/4-tips-for-getting-the-business-to-stop-hating-it.html

Basing Enterprise Architecture on Business Strategy: 4 Lessons for Architects

  • Is there a well-articulated and agreed Business Strategy?
  • Does this Business Strategy provide clear direction?
  • Is the Business Strategy robust and have the flexibility to respond to rapid change?
  • Business strategy creates legacy ICT

https://eapj.org/basing-enterprise-architecture-on-business-strategy-4-lessons-for-architects/

IT Director Requirements, Skills, & Salaries

https://www.bmc.com/blogs/it-director-role-and-responsibilities-what-does-a-director-of-technology-do/

Resources

The best antivirus protection of 2020 for Windows 10

https://www.cnet.com/news/the-best-antivirus-protection-of-2020-for-windows-10/

Maximise your Power BI, Tableau and Qlik investments

https://clouddamcdnprodep.azureedge.net/gdc/gdcippaZS/original?ocid=mkto_eml_em559489a1la1&mkt_tok=eyJpIjoiWXpJM1pESmtObUptWWpRNCIsInQiOiJFemhnaG1PbHVTZHhKRmtqRjIxZSsxcnZqWWxBMVE1TjdLV3NLQVlBK1p0ZTJmZUFINmVucHRDN3M1WER5TVA0ZkRpNVlWZ3VieWdBMVFRckM5Q0trWnlnWGR5MGUyM2Y5Y2dnQnpcL1wvUWgwM010VkI0V2JmRzA2cFNLUkV6TjRMZGRrTFZkSXR0cDBvcFpLMXBucWFhZz09In0%3D

This is likely the contribution of Blazor. I believe they can climb back to no.1 if they come back with something like WebForm (What You See Is What You Get) web design.

https://visualstudiomagazine.com/articles/2020/06/02/tiobe-june-2020.aspx

Posted in .Net, Cloud, Community, Computers and Internet, News and politics, Operating System, Servers | Tagged , , | Leave a comment

Azure SQL Server database to Json

This blog post shows you how to retrieve the data from SQL Azure database using Entity Framework and serialize it to Json string. The pre-requisite for this article; 1. You need to know Entity Framework, 2. You have an Azure Subscription (you can do it using on-promise SQL Server). This article has 2 parts. Part 1 is to get the data from SQL Azure using Entity Framework and the other part is to serialize the data into json format.

Get the data from SQL Azure using Entity Framework

1. Create a Console Application using .NET Framework. Right click the project and choose Add, select New Item…


2. Select Data. Select ADO.NET Entity Data Model. Type a Name or use the default name Model1. Click Add.


3. Choose EF Designer from database. Click Next >.


4. Click New Connection…


5. Enter you SQL Azure database server, type in the credential then click OK. When back to previous screen choose Yes, include the sensitive data in connection string. Click Next >.


6. I choose Customers table. This Customers table structure is the same as the Noorthwind database, , Customers table. Click Next >.


You should be able to see something like the picture below.


Serialize the data into json format

The follow code and to get a record from SQL Azure database through entity framework and serialize the data into json format. You have to have using System.Web.Script.Serialization;.

using System;

using System.Linq;

using System.Web.Script.Serialization;

namespace ConAppJson

{

    class Program

    {

        static void Main(string[] args)

        {

            string json = “”;

            SSISDBEntities context = new SSISDBEntities();

// Get data from Azure

            var result = from r in context.Customers where (r.CustomerID == “ALFKI”) select r;

            foreach(Customer customer in result)

            {

// Serialize to json format

                json = new JavaScriptSerializer().Serialize(customer);

                json = “[“ + json + “]”;

                Console.WriteLine(json);

            }

        }

    }

}

You will see the result as below.

Source code download: https://github.com/chanmmn/JsonSerialization-

Posted in .Net, Cloud, Community, Computers and Internet, Data Platform | Tagged , | Leave a comment

Deploy SSIS package to SSIS IR using Visual Studio

This blog post shows you to deploy SSIS project to SSIS IR in Azure. The pre-requisite of this post; 1. You need to know SSIS. 2. You have Windows Azure subscription. (They are few points missed in this document https://docs.microsoft.com/en-us/azure/data-factory/tutorial-deploy-ssis-packages-azure.)

I have created a package to move data from SQL Azure to Azure Blob Storage.


Make sure you have created a folder in the SSIS IR (Integration Runtime) database under the Integration Services Catalogs.


Right click the SSIS project then choose Deploy.


Click Next.


Choose SSIS in Azure Data Factory. Click Next.


Enter the SQL Azure database that created by SSIS IR. Click Connect. Select the project folder that you have created. Click Next.


Click Next.


Click Deploy.


You see Failed. That is because the SSIS IR is stopped.


Make sure the SSIS IR is running in Azure Data Factory.


Redeploy again, it will see it Passed.


You can now Execute… the SSIS package in Azure Data Factory.


Click OK to Execute.

Posted in .Net, Cloud, Community, Computers and Internet, Data Platform | Tagged | Leave a comment

Clean all bin obj folder in all folders Visual Studio

This short post shows you how to clean all bin obj folder in all folders. This will clean up all the builds in all the development folder. You need to run the following PowerShell command with administrator right.

gci -inc bin,obj -rec | rm -rec -force


Reference: https://sachabarbs.wordpress.com/2014/10/24/powershell-to-clean-visual-studio-binobj-folders/

Posted in .Net, Cloud, Community, Computers and Internet | Tagged , | Leave a comment

Declare a Enum with bitwise operator

This post shows a good practise to declare a Enumerator, Enum. You can see the practical use of bitwise operator in the example. Instead of

ReadWrite = 3

You can do

ReadWrite = Read | Write

like the example below (Brad, 2008).

public enum FileAccess

{

    Read = 1,

    Write = 2,

    ReadWrite = Read | Write

}

static void Main(string[] args)

{

    FileAccess fileAccess = new FileAccess();

    fileAccess = FileAccess.ReadWrite;

    if (fileAccess == (FileAccess)3)

    {

        Console.WriteLine(“ReadWrite”);

    }

}

You can do the same validation using a Programmer calculator.


Reference:

Brad Abrams. (2008). Framework Design Guidelines 2nd Edition. Addison-Wesley Professional.

Posted in .Net, Cloud, Community, Computers and Internet | Tagged | Leave a comment

VC++ CLR connect to SQL Azure Database

This post shows you how to connect to SQL Azure database using VC++ CLR. In previous post https://chanmingman.wordpress.com/2012/01/06/vc-clr-ms-sql-server-access/, the code connect to on-premise database. Here we connect it to SQL Azure database. What you need to do is to get the connection string from Azure Portal.


#include “pch.h”

using namespace System;

#using <mscorlib.dll>

using namespace System::Collections;

#using “System.dll”

#using “System.Data.dll”

#using “System.Transactions.dll”

#using “System.EnterpriseServices.dll”

#using “System.Xml.dll”

using namespace System::ComponentModel;

using namespace System::Data;

using namespace System::Data::SqlClient;

int main(array<System::String ^> ^args)

{

    // Connect to the SQL Database and issue a SELECT command all in one statement

    String ^query = “SELECT * FROM Categories”;

    // build connect string with the userid and password

    String ^connectString = String::Format(“Server=tcp:sqlAzure.database.windows.net,1433;Initial Catalog=SSISDB;Persist Security Info=False;User ID=username;Password=password;MultipleActiveResultSets=False;Encrypt=True;TrustServerCertificate=False;Connection Timeout=30;”);

    SqlConnection^ sqlconn = gcnew
SqlConnection(connectString);

    sqlconn->Open();

    SqlCommand ^sqlCommand = gcnew
SqlCommand(query, sqlconn);

    // Create a SqlDataReader to enumerate the result of executing the command against the database.

    SqlDataReader ^dataReader = sqlCommand->ExecuteReader();

    // Find number of columns in result

    int numCols = dataReader->FieldCount;

    // Display number of columns returned from query

    Console::Write(“No.of columns : “);

    Console::WriteLine(numCols);

    // Display the data, separated by tabs

    while (dataReader->Read())

    {

        for (int c = 0; c < numCols – 1; c++)

        {

            Console::Write(dataReader[c]);

            Console::Write(“\t”);

        }

        Console::WriteLine(“”);

    }

    return 0;

}

The result as below.

Posted in .Net, Cloud, Community, CTO, Data Platform | Tagged , | Leave a comment

Update Microsoft Edge in Windows 10 1803

This post shows you how to update Microsoft Edge if you are still having older Windows 10 like 1803. There are many reasons people try not to update Windows 10 to newer version. The key reason is still software compatibilities. What if you don’t want to update Windows 10 but you want to update Microsoft Edge?

You can go to Microsoft Edge download page then download the latest Microsoft Edge and install it. It will replace your current Edge version like what I have below.

You might ask why do you want to update your Edge? Because some of the buttons in Azure portal has no effect when I click on them.

Posted in .Net, Cloud, Community, Computers and Internet | Tagged , | Leave a comment

Publish ASP.NET Webform to Azure App Service

This post shows you how to publish an ASP.NET Webform app to Azure App Services. Pre-requisite of this article is you need to know how to create an ASP.NET Webform application.

1. Create an ASP.NET Application using the default ASP.NET Webform template.

2. Right click the ASP.NET Webform project and choose Publish.


3. Select Azure.


4. Select Azure App Service (Windows).


5. Create a new Azure App Service… if you do not have an existing Azure App Service.


6. Click Create once you are happy with the setting. Click Finish.


7. You will then see the page like the one below. Just click Publish.


8. Browse the Site URL you can then see you application running without configuring an virtual machine but you need to watch for database connection.

Posted in .Net, Cloud, Community, Computers and Internet | Tagged , | Leave a comment

A ‘R’ script error occurred during execution of ‘sp_execute_external_script’ with HRESULT 0x80004004. SQL Server

This post shows you one of the possibilities to fix the above error when you are running R script. Back then I have tested the script runs in SQL Server 2017 when I have posted this https://chanmingman.wordpress.com/2019/03/17/machine-learning-service-in-sql-server-2017/. Somehow I bumped into the error below when I run the script few days ago in SQL Server 2019. The error may not tell the right cause of this.

Msg 39004, Level 16, State 20, Line 5

A ‘R’ script error occurred during execution of ‘sp_execute_external_script’ with HRESULT 0x80004004.

Msg 39019, Level 16, State 2, Line 5

An external script error occurred:

Error in source(revoScriptConnection, encoding = “UTF-8”) :

revoScriptConnection:1:9: unexpected symbol

1: a <- 1 b

^

Error in execution. Check the output for more information.

Error in eval(ei, envir) :

Error in execution. Check the output for more information.

Calls: runScriptFile -> source -> withVisible -> eval -> eval -> .Call

Execution halted

You need to separate each of the R command in different line like below then the script can still run.

EXECUTE

sp_execute_external_script
@language =

N’R’, @script =

N’ a <- 1;

b <- 2;

c <- a/b;

d <- a*b;

print(c, d);’

Posted in .Net, Cloud, Community, Computers and Internet, Data Platform | Tagged , , , | Leave a comment