THE SQL Server Blog Spot on the Web

Welcome to - The SQL Server blog spot on the web Sign in | |
in Search

Sergio Govoni

A place where share my experience on SQL Server and related technologies

  • 24 Hours of PASS (April 2018): Recordings now available!

    The Sessions of the event 24 Hours of PASS "Cross-Platform SQL Server Management" edition (held this April on 25 and 26) were recorded and now they are available for online streaming!

    If you have missed one session or the entire event, you can view or review your preferred talk or topic. Each video is available on the detail page of the related session, sign in is mandatory. Aren't you a SQL PASS member, yet? Don't worry you can sign it up here for free!

    A big "THANK YOU" to the Sponsors (Microsoft, Quest, IDERA, SentryOne e Redgate) who made possible the organization of this event, free for participants!


  • SQL Server 2016 Service Pack 2 (SP2) has been released!

    The Service Pack 2 of SQL Server 2016 has been released!

    From the SQL Server Release Services, this service pack contains:

    • Performance and scale improvements
    • Supportability and diagnostics enhancements
    • New improvements based on Connect feedback items
    • Some improvements originally introduced in SQL Server 2014 SP2 and SQL Server 2012 SP4
    • All the fixes up to SQL Server 2016 SP1 CU8

    All the details are listed in this article.

    You can download the SP2 of SQL Server 2016 here:

    The Service Pack 2 installation is recommended, but installing this service pack may require rebooting the instance!

  • PASS Marathon GDPR Edition: Recordings now available!

    You have certainly already heard about the new European Regulation 679/2016, better known as GDPR, on the protection of personal data.
    GDPR is the acronym of General Data Protection Regulation, companies and professionals are required, by May 25 (2018) to comply with the new rules on personal data protection.

    "The aim of the GDPR is to protect all EU citizens from privacy and data breaches in an increasingly data-driven world that is vastly different from the time in which the 1995 directive was established. Although the key principles of data privacy still hold true to the previous directive, many changes have been proposed to the regulatory policies; the key points of the GDPR as well as information on the impacts it will have on business can be found below" - 

    Were you unable to attend the PASS Marathon in partnership with Redgate to understand what the GDPR entails? Don't worry, the sessions of the event PASS Marathon GDPR Edition (held the last March 2018 on 13th) were recorded and now they are available for online streaming!

    If you have missed one session or the entire event, you can view or review your preferred talk.
    Each video is available on the schedule page of the event.
    Enjoy the videos! 
  • Developing product recommendations on WideWorldImporters using SQL Graph

    SQL Server has always provided tools to manage hierarchies and relationships, facilitating query execution on hierarchical data, but sometimes relationships can become complex. Think about many-to-many relationships, relational databases don't have a native solution for many-to-many associations. A common approach to realize many-to-many associations is to introduce a table that holds such relationships.

    SQL Server 2017, thanks to the Graph Database, can express certain kinds of queries more easily than a relational database by transforming complex relationships into graphs.

    The graphs theory is not new in the computer world, the first commercial proposals are dating in the year of 2000 by Neo4J, OrientDB, Oracle Spatial, Graph, etc. Recently, thanks to some of the world's largest internet companies and to the new data processing and analysis requirements, this new class of Object-Oriented Database Management Systems (ODBMS) is receiving a strong impulse.

    Today we need to navigate through segments of data quickly and describe how each piece of data is connected to each other by an interconnected logic. A Graph Database is a collection of Nodes and Edges where each node represents an entity and each edge represents a relationship between two nodes with a direction (for example from Node A to Node B).

    A few days ago, Microsoft has merged the pull request I have done on the repository Microsoft/sql-server-samples on GitHub. "This repository contains code samples that demonstrate how to use Microsoft's SQL products including SQL Server, Azure SQL Database, and Azure SQL Data Warehouse. Each sample includes a README file that explains how to run and use the sample".

    My sample explains what Graph Database is and which scenarios it solves easily, they are available here.

    As you can see, the publishment consists of three demos. In the first one, I shown how to create graph objects such as Nodes and Edges. The second demo allows you to do a first look to the T-SQL MATCH clause used to perform some query on Nodes and Edges created in the first demo. In the last demo I shown how to build a recommendation system for sales offers that is able to determine the recommended products based on the product a customer is purchasing.

    Have you heard about the Graph Database and want to know more? These examples are a good place to start!

    Enjoy the SQL Graph! 

  • SQL Server Cumulative Updates (January 2018)

    Microsoft has released the following Cumulative Updates for SQL Server:

    Cumulative Update 3 for SQL Server 2017 RTM

    Cumulative Update 7 for SQL Server 2016 SP1

    Cumulative Update 10 for SQL Server 2014 SP2


  • SQL Saturday Pordenone is back! Discover the 2018 edition!

    Another SQL Saturday has been scheduled in Pordenone (Italy), it will be the SQL Saturday #707, as last year it will be an international event with international speakers and several sessions in English language!
    SQL Saturday Pordenone 2018 will be on February, Saturday 17 at Consorzio Universitario di Pordenone, Via Prasecco 3/a, Pordenone (Italy).
    The agenda of the day is divided in four track that will deliver a total of 24 hours of free training on SQL Server, Business Intelligence, Microsoft Azure and Data Science! You will learn more about topics that you use every day rather than learn something about technologies that you don't use yet.
    Thanks to our Sponsors the event will be free of charge for you, but the registration is mandatory.
    If you are around Pordenone at the end of February, or if you want to come in Italy for a weekend of training on Microsoft Data Platform with friends, #sqlfamily and good food :) you are welcome!
    Registration is available here and the official Twitter hashtag is #sqlsat707.
    See you in Pordenone!
  • Azure Data Lake Store library for Delphi

    From Microsoft-Docs on GitHub: Azure Data Lake Store is an enterprise-wide hyper-scale repository for big data analytic workloads. Azure Data Lake enables you to capture data of any size, type, and ingestion speed in one single place for operational and exploratory analytics.

    Because I'm a Delphi developer, Microsoft Data Platform MVP since 2010 and because (in my opinion) there are poor documentation about the integration between the Delphi programming language and Microsoft Azure services, I decided to do something for help Delphi developers to use Microsoft Services and Products. I developed a REST sample library to connect and manage files into an instance of Azure Data Lake Store.

    The sample library is intended for Delphi developers those want to build applications and services that are able to connect to Azure Data Lake Store. At the moment the libraty shows how to:

    • Retrieve an access token using REST Client components
    • Retrieve folders list
    • Upload files to a specific folder

    The first version of my ADLSLibrary4Delphi, with source code, is available on my GitHub repository named azure-data-lake-store-for-delphi.

    If you want to contribute in the project, you are welcome!


  • SQL Server 2016 Cumulative Updates (November 2017)

    Microsoft has released the following Cumulative Updates for SQL Server 2016 (RTM and SP1).

    Cumulative Update 9 for SQL Server 2016 RTM

    Cumulative Update 6 for SQL Server 2016 SP1

  • SQL Server 2012 Service Pack 4

    The Service Pack 4 of SQL Server 2012 has been released!

    This service pack contains:

    • More than 20 improvements around performance and scalability
    • All fixes released up to and including the Cumulative Update 10 for SQL Server 2012 SP3

    The most important features are listed in this article:

    You can download the SP4 of SQL Server 2012 here:

    The Service Pack 4 installation is recommended, but installing this service pack may require rebooting the instance!

  • SQL Saturday Parma is back! #sqlsat675

    Another SQL Saturday has been scheduled in Parma (Italy), it's the SQL Saturday #675 and this year it will be more international than the previous editions because there will be six sessions completely in English (= 1 "virtual" track in English).
    SQL Saturday Parma 2017 will be on November, Saturday 18, 2017 at Università degli Studi di Parma, Dipartimento di Ingegneria dell'Informazione.

    The agenda of the day is divided in four tracks (one more than the previous edition) that will deliver a total of 24 hours of free training on SQL Server, Data Science and Cloud Application! You will learn more about topics that you use every day rather than learn something about technologies that you don't use yet, choosing between these paths:
    • Cloud Application Development & Deployment
    • Data Science
    • Database Administration
    • Development
    Thanks to our Sponsors the event will be free of charge, but the registration is mandatory!
    If you are around Parma in the middle of November, or if you want to come in Italy for a day of training on Microsoft Data Platform with good foods and friends, you are welcome!
    The registration is open, register now here, let know us that you will be at the event, the official twitter hashtag is #sqlsat675 and our official twitter account is @SqlsaturdayP.

    Greetings from Italy, see you soon in Parma!
  • PASS Summit is back! Discover the edition 2017!

    The PASS Summit is back! The most important event around the world on Microsoft Data Platform will be held again in Seattle (WA) from October 31 to November 3, 2017 and it will be preceded from two "pre-conference" at October 30th and 31th.

    Every year more and more IT Professionals, Technicians, Analysts and Data Scientists consider this event as an unique opportunity to connect other people that have the same passion you have, to share the experiences and problems you face for your job and to learn more and more about the Microsoft Data Platform.. so the keywords are Connect, Share and Learn!

    Do not forget that you will also have the opportunity to meet people that work in the SQL Server development Team. Just a few days ago, while I was playing with SQL Graph, one of the new features of SQL Server 2017, I did not explain a behavior of a MATCH query. MATCH clause is the new clause for traverse a graph in a SQL Graph Database. Chatting with Shreya Verma (Program Manager at Microsoft SQL Server, with particular focus on Query Processing) and Arvind Shyamsundar (Principal Program Manager at Microsoft), they clarified my doubts, and at the end, this sentence came out:

    "Yes Sergio! Shreya and I will be at PASS Summit 2017, so definitely we will meet!"

    What other event gives you the opportunity to discuss about these topics with people from SQL Server Team? There are not any others! Are you thinking that people from SQL Server Team are too busy for a talk with you? Nobody of these names walks away if you try to meet and talk them, especially in front of a beer in one of Seattle's pubs!

    SQL Server 2017 (today the in RC2 version) is coming and this conference is a great opportunity both to explore the new features of SQL 2017 and to study the features already released in previous versions of SQL Server.

    If you are undecided about the quality of the contents provided at the PASS Summit, you can watch the sessions of the previous Summit on PASS TV:

    Are you a beginner or a first timer at PASS Summit? Do not worry there are many sessions of level 100 and 200, and you can count on the "First Timers Guidebook" that it will arrive soon!

    What kind of sessions can you expect to see at the PASS Summit 2017? Find it out by the recording sessions of the last 24 Hours of PASS named Summit Preview, each video is available on detail page of the related session.

    You can find all information you need on PASS Summit 2017 website and for your convenience, here some useful links:

    Discount code for UGISS members

    If you have not already done, sign up for free and join to the Italian SQL Server User Group. UGISS, as an official PASS Local Group, allows you to have a special discount for $150 off on the registration fee. To obtain the discount, specify the following code in the registration page (section "Agenda"):


    See you in Seattle!

  • SQL Server 2016 Cumulative Updates (August 2017)

    Microsoft has released the following Cumulative Updates for SQL Server 2016 (RTM and SP1).
    Cumulative Update 7 for SQL Server 2016 RTM

    Cumulative Update 4 for SQL Server 2016 SP1
  • 24 Hours of PASS (July 2017): Recordings now available!

    The sessions of the event 24 Hours of PASS "Summit Preview" edition (held the last July 2017 on 19 and 20) were recorded and now they are available for online streaming!
    If you have missed one session or the entire event, you can view or review your preferred talk or topic. Each video is available on the detail page of the related session.
    A big THANK YOU to the Sponsors (Quest, Melissa Global Intelligence and Nutanix) who made possible the organization of this event, at no cost for participants!
    Sessions recorded in this edition of 24 Hours of PASS allow you to taste the main topics of the upcoming PASS Summit 2017 that will be held in Seattle (WA) from October 31 to November 03, 2017!
  • 24 Hours of PASS (July 2017) - Summit Preview

    Which topics can you expect to see at the PASS Summit 2017 ? Find it out from July 19 to 20, 2017 at the 24 Hours of PASS Summit Preview edition.

    Register now at this link, thanks to the Sponsors, the 24 Hours of PASS is presented at no cost for you!

    This edition of 24 Hours of PASS wants to be a sneak taste of what you can expect from the next PASS Summit that will be in Seattle (WA) from October 31 to November 03, 2017.

    No matter from what part of the world you will follow the event, the important thing is to know that they will be 24 hours of continuous training on Microsoft Data Platform... direct on your desk!


  • How to calculate barcode check-digit using T-SQL language


    In order to scale, it's imperative that companies stay ahead of competition. So how can they identify, store, manage and deliver goods to customers efficiently? The answer is: Barcode! A barcode is the graphical representation of a sequence of numbers and other symbols. The representation is made by lines (bars) and spaces. A barcode typically consists of five parts – and one of these is the check character, also known as the check digit. Handwriting this is a hard work, and is also susceptible to legibility problems. Barcoding dramatically reduces human error, recognition errors and transcription errors.

    This article explores the algorithm needed to calculate the check-digit of an UCC/EAN barcode. It compares two possible implementations of the algorithm to calculate the check character for an EAN13 barcode using T-SQL language for SQL Server.

    UCC/EAN standard coding

    The UCC/EAN standard coding requires that every (well-formed) code ends with a check-digit that will be used by barcode readers to interpret the code properly. The check-digit is a number between zero and nine and it is calculated according to the other digits in the code.

    The calculation algorithm requires that every digit in the code is enumerated from right to left as shown in the following picture.

    Picture 1 – Digit position table (source GS1

    After you have enumerated each digit of the given code, you need to do the following steps to determine the check character:

    1. Add up the digits in the even positions
    2. Multiply the result of the previous step by three
    3. Add up the digits in the odd positions
    4. Add up the results obtained in steps two and three
    5. Subtract the upper multiple of 10 from the result obtained in step four. For example, if the result of step four is 47, subtract 50 from 47, so the result is 3.

    If the result of the four step is a multiple of ten, the check-digit will be equal to zero. Otherwise the check-digit will be the result of the fifth step.

    Let's implement the algorithm using T-SQL language

    Suppose that your boss asked you to implement a T-SQL object, in an SQL Server database, that it is able to calculate the check-digit for a given EAN13 code. How can you translate the standard algorithm to T-SQL code? ..continue reading full article here.


    A big "Thank you" to Mia Chang for reviewing this article. 

More Posts Next page »

This Blog


Privacy Statement