Which Edition of SQL Server is Best for Development Work?
Which Edition of SQL Server is Best for Development Work?
As a developer, I need a SQL Server database against which I can develop and test code. There are several options to choose from, and various issues that you might need to bear in mind. In this article we will look at the choices, and the decisions you need to make. The LocalDb edition of SQL Server was created to be the obvious edition for developers; Does that idea make practical sense and what alternative advantages come the other editions for developers?
Development work will usually require a number of server instances. Should these be shared on one server, or distributed on a number of servers or Virtual machines? Should all development servers be of the same edition? Is it wise to rely on an internet connection to base all your development servers in the cloud, or is there a place for the traditional ‘SQL Server on the laptop’.
Before SQL Server 2005, it wasn’t hard to choose the edition that you’d use to develop with. Other than the product itself, there was just a free developer edition. It then got more complicated, and continues to do so, with some interesting permutations coming for developers with the introduction of containers to windows 2016 and SQL Server 2016.What options are there that could be used for development work?
Currently there is:Express Edition Developer Edition Web Edition Standard Edition Enterprise Edition LocalDb Azure database + Amazon RDS Containerized version of any edition
There is also an edition called Compact Edition which has been deprecated but is still available. It has some similarities to SQL Server but has a very small footprint and runs in-process. Compact Edition runs a SQL dialect, but it isn’t an edition of SQL Server. It is really not an appropriate development instance for developing and testing code that will be deployed to SQL Server.What do developers want? Productivity I am most productive as a database developer when I have my own instance on my own machine that I can stop, start, drop and create at will. When the database or instance is on a shared server then I find that development is slower either other people change things that I am working on or do other things to interrupt, what should be, a fast develop, deploy and test cycle. Simplicity A developer should be free to spend their time writing, testing and debugging code and any time spent managing resources like SQL Server databases means that they have less time to do the things that are actually useful, and provide value to the business. Accuracy In an ideal world every developer would have a fast, local, exact replica of production with data that is as close as possible to production data. With this, they can test that their changes will behave the same way in production as they do in their development environment. There must be countless applications that work super-fast on a developer machine but slower when deployed in a 3-tier architecture with lots of latency and network calls between the services. It is also important to verify that the code you write for one database will actually run on another database. If you had SQL Server 2008 R2 in production, there would be no point developing with SQL 2016 using in-memory tables. How different are the editions?
When developing and testing a database application, it is often important to know that, when we are writing code and we can see how it acts in development, we will get a similar behaviour in production. The editions are defined by the features that are installed and enabled; the code in the core engine is the same whether you use one of the free editions or the enterprise edition. The problem comes when you use, say, an enterprise-only feature in development but have only a Standard-edition instance in Production. The full comparison of these editions is published by Microsoft here ‘ Features Supported by the Editions of SQL Server 2016’Does the choice affect the tools that are used?
All of the instances behave the same in terms of the core engine and language; if, therefore, you have a tool that can manage Enterprise edition then it can, in principle, also manage every other edition. Not all tools in the past kept to this principle: There was once a version of SQL Management studio for SQL Express that was restricted to not being able to manage the full edition’s features. Now SQL Server Management Studio is backwards-compatible to previous versions and sideways-compatible with all editions. It is currently available as a free download so you can manage any instance without requiring a full license.
The second limitation is that, in order to use LocalDb, you need to change the SQL client library and so older version of SQLOLEDB and .Net are unable to connect if you have an application that was written in .net that is earlier than version 4 then it may not connect.
What choice of editions do we have to develop on?LocalDb
Unless you have a specific requirement that LocalDb cannot meet, then it must be the first choice for developers. Lets look at what it is and then what benefits it offers.
LocalDb is a cut down version of SQL Server that was specifically designed to be light-weight and easy to start and stop quickly. This means a compromise so there are some restrictions for it, but it really is a great choice for most developers because you can quickly create, use and destroy instances that are specific to one particular user.
LocalDb has some additional benefits: It shares the same binaries for each instance so you do not have to use up lots of disk space for each instance that you need. This means that it is really simple to start one up if you find that you need a new instance in the heat of a development session.
Creating a new LocalDb is simple: You just type the following at the command shell:sqllocaldb create “instance name”
This will create a new instance that you can use called “instance name”, on my machine it takes about 4 seconds to create a new instance and then about another 2 seconds to start the instance. Installing a new instance of any of the other types of SQL Server is measured in minutes to hours.
If you have multiple versions of LocalDb installed, you can create any of those versions really easily, just by executing this code in a command shell:Sqllocaldb versions
You will get a list like:
Then if you need a 2012 instance you would type:sqllocaldb create “instance name” 11.3
You would then get a new SQL Server 2012 instance you could connect to.
Connecting to LocalDb is a little bit different than connecting to a standard instance: Instead of connecting to the machine name and either passing in a port or an instance name you pass in the word “(localdb)” and then the instance name so if the instance is called “test-instance” you would pass this as your server name:(localdb)\test-instance
To find out which instances you have you can use:sqllocaldb info
This will list the LocalDb instances, to examine one further pass in the instance name to the last command such as:sqllocaldb info “instance name”
The output will bethe name version which user it belongs to whether it was started or not the last start time If it is started, it also gives the path of the named pipe it is running on. If you have a client that does not understand the (localdb) servername then pe
本文数据库（mssql）相关术语:熊片数据库 mssql数据库 oracle数据库 pubmed数据库 access数据库 万方数据库
本文标题：Which Edition of SQL Server is Best for Development Work?