Liu Chunyu decrypts SQL Server database system Compilation

Source: Internet
Author: User
Tags sql 2008

Do you know how SQL Server is built out of such a huge enterprise-level database Server product?

Some related data:

The size of each build is about GB.

Every complete build takes dozens of high-end servers for 2.5 days.

Each Complete build consists of thousands of jobs and more than 10000 parameters.

We build around 20 builds every day, with 130 builds every week.

The build team at Microsoft's headquarters, Raymond and Beijing, can ensure that the build runs smoothly 24 hours a day.

Since last year, our build team has successfully completed thousands of builds on time.

Maybe you will ask: How is your build so big? Why does it take so long? Why are you doing so many builds every day?

Why is one of our builds so large? For example, if your 32-bit SQL Server DVD for Chinese retail development, including 4 GB of tools and help documents, You can estimate it as follows: First, add some internal build information and statistics, and the Symbol used for debug, multiply by 2 (retail, debug), and multiply by 3 (CPU type: x86, x64, and ia64 ), multiply by the number of all versions (Enterprise Edition, development edition, and Standard Edition), and then multiply by the number of supported languages. More than 1 TB, right? J fortunately, the setup team of SQL 2008 adopts the dedicated lidated setup mode. In this way, in a language pack, the installer can determine your CPU type and automatically install the corresponding version based on the product serial number you entered. Therefore, our build was compressed to 300 GB.

Why does it take so long for a build? Building such a huge enterprise-level database Server is an extremely complex process. Moreover, the SQL Server Build system is already one of the most efficient systems in Microsoft. She is a graphical user interface and highly automated. After 60 hours, most builds will be successfully completed automatically and relevant personnel will be notified of their build status and information. If the build fails, a detailed error message is provided for debugging. The SQL Server build system is not only so easy to use and efficient, but also can flexibly adapt to some special needs and build workflows. The SQL Server build system is driven by the Windows Workflow Foundation. Thousands of jobs are distributed to dozens of build machines in parallel or in serial mode. The build process includes:

Synchronize dozens of GB of source files and related files and resources to the build machine.

Static source code analysis

Compile and sign all executable and test files

Generate System Database

Optimization

Localization

Create and sign the installation file and installation package

Index Symbol and source files

So many builds every day reflect how we support the entire SQL Server engineering system and architecture:

First, we need to declare that we support multiple products at any time, such as the current SQL Server 2005 and the SQL Server 2008 to be released.

In the engineering system and architecture of SQL Server 2008, we create a separate branch for each feature to be added or enhanced. After this feature is developed and tested, the code is merged into the main line code of SQL Server. Therefore, based on the priority and size of features, SQL Server is divided into dozens of different teams, each of which includes architects, project managers, developers and testers, help and case document specialists, even scientists and researchers. Build is required for every branch for timely testing. Therefore, the number of builds we need each week -- 130. After the build is complete, the Test Execution team and its branch team perform an automatic Test to ensure that the quality of their Code complies with strict requirements and standards. Finally, after this feature is developed and tested, its code will be integrated into the main line code of SQL Server, then the other branch teams will re-acquire the main line code and integrate the current code of the Branch to ensure synchronization with the main line code.

So how can we ensure that the Code Quality of the main line always complies with strict requirements and standards? We will reveal another magical field in subsequent articles!

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.