Now I can begin experimenting how PSP optimization affects my queries. WHERE name = 'PARAMETER_SENSITIVE_PLAN_OPTIMIZATION' To verify that setting the compatibility level to 160 enabled PSP optimization, I can run the following query. SET QUERY_STORE (QUERY_CAPTURE_MODE = auto) Next, I set the compatibility level of the BaseballData database to 160 and enable Query Store using the following t-sql commands. See Getting Started with SQL Server in a Docker Container – The SERO Group for how to restore a backup to your container. So, I restored a copy of the BaseballData database that I sometimes use for testing and demos. Now that you have a working SQL Server 2022 instance, you can begin exploring its new features.įor example, I’d like to better understand the new Parameter Sensitivity Plan (PSP) optimization enhancements. SELECT host_platform,įROM sys.dm_os_host_info Exploring SQL Server 2022’s new features You can use the following query to review information about the host operating system. SERVERPROPERTY('ProductLevel') AS ProductLevel SERVERPROPERTY('ProductVersion') AS ProductVersion, SELECT SERVERPROPERTY('Edition') AS SQLEdition, For example, running the following query in Azure Data Studio will return the SQL Server Edition, Version, and Product Level. Using Azure Data Studio or SQL Server Management Studio, you can connect to your new SQL Server 2022 instance and query as normal from your host operating system. You can also see your containers in the Docker Desktop as shown below. You can see that this Docker environment has two SQL Server 2019 containers, sql2019 and sql2019a, along with our newly created container, sql2022ctp1. You can use the following command to list all containers in your Docker environment. I’m naming this one sql2022ctp1.Īnd finally, the -d parameter is the name of the container image your want to run. Set the name for your container using the –name parameter. In this example, I’m mapping the default host environment port of 1433 to the container port of 1433. The -p parameter allows you to map a TCP port on the host environment to a port in the container. You’ll want to replace iO1$6sJ&64YRCJAx in the example above with a complex password of your choosing. SA_PASSWORD parameter is where you set the sa password for this instance. The ACCEPT_EULA parameter indicates that you agree to Microsoft’s End User Licensing Agreement. Once the pull has completed, you can create the container from the image using the following command. docker pull /mssql/server:2022-latest Starting the SQL Server 2022 container Once you have Docker Desktop in place, you can pull (download) the SQL Server 2022 image using the following command in the Windows command prompt. Pulling the SQL Server 2022 container image If you don’t already have the Docker Desktop installed, do that first. In Getting Started with SQL Server in a Docker Container – The SERO Group, I walk through the process of configuring Docker Desktop for a Windows 10 client. There are versions for most every desktop platform, including Windows, Mac, and Linux. To use SQL Server in a Docker container, you’ll need the Docker Desktop. But those won’t leave remnants of SQL Server in your registry or file system. And nothing to remove later, except, of course, the container and image file. There’s nothing to install directly on your host machine. Containers are lightweight, standalone, and have everything required to run SQL Server. Now, how can you explore SQL Server 2022’s new features? Test Driving SQL Server 2022Ĭontainers are a great way to explore new versions of a product like SQL Server without having to actually install bits on your computer that you’ll later want to remove. You can learn more about SQL Server 2022 on the What’s new in SQL Server 2022 – SQL Server | Microsoft Docs site. Ledger to help assure data hasn’t been tampered with.Parameter Sensitive Plan (PSP) optimization.Query Store enhancements, including being available on secondary replicas.Enhancements to Availability Groups and Distributed Availability Groups.Here are a few of the SQL Server 2022’s new features we are excited about. SQL Server 2022 is packed with some long awaited niceties, improvements, and enhancements. There’s a lot of hype surrounding the next version of SQL Server.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |