Sql server evaluation period has expired 2017 как исправить

title description ms.date ms.custom ms.prod

Evaluation period has expired when you use SSMS

This article provides a resolution for the problem that occurs when you use Microsoft SQL Server tools such as SQL Server Management Studio (SSMS) or SQL Profiler.

10/22/2020

sap:Database Engine

sql

Evaluation period has expired error message when working with SQL server

This article helps you resolve the problem that occurs when you use Microsoft SQL Server tools such as SQL Server Management Studio (SSMS) or SQL Profiler.

Original product version:   SQL Server
Original KB number:   971268

Symptoms

You may encounter the following error message when using SQL Server tools such as SQL Server Management Studio (SSMS) or SQL Profiler:

Evaluation period has expired. For information on how to upgrade your evaluation software please go to https://www.microsoft.com/sql/howtobuy

Additionally you may see the following error message when you try to connect to an expired installation of SQL Server instance:

A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 – Could not open a connection to SQL Server)

[!NOTE]
The connectivity error message is a generic message, and it is not always tied to an expired installation of a SQL Server instance.

Cause

The problem usually occurs when you are running an evaluation instance of SQL Server and the evaluation time period has expired.

[!NOTE]
In the case of SQL Server 2008, you may see this error message even after upgrading to a licensed version because of a known bug.

Resolution

  • Case 1 – You have an expired version of SQL server evaluation edition

    [!NOTE]
    This also applies to scenarios wherein only tools are installed from an evaluation version.

    To upgrade the Evaluation Edition to a retail edition, you can consult the following topics in Books Online:

    • Upgrade to a Different Edition of SQL Server 2012 (Setup)

    • Supported version & edition upgrades (SQL Server 2016)

      [!NOTE]
      In either of these topics, you can select the version picker tool at the top to pick a topic that is relevant to your environment. For SQL Server 2008 you can also refer to the KB article: Upgrade to a Different Edition of SQL Server (Setup). For SQL Server 2005, check the following KB article Upgrade to a Different Edition of SQL Server (Setup)

  • Case 2 – Moving from an enterprise evaluation edition to an express edition

    In some cases, you may decide to move from an Enterprise evaluation edition to an Express edition. Since there is no upgrade path available, you can consult the following article on moving your user databases from the evaluation edition to express edition.

    • Scenario 1 – You are still able to start your SQL Server evaluation version

      Consult the following topic in SQL Server Books Online on how to move user databases: Database Detach and Attach (SQL Server)

    [!NOTE]
    The maximum relational database size for SQL Express editions is 10 gigabytes (GB).

    • Scenario 2 – You cannot start an expired edition of your Enterprise evaluation edition because the evaluation period has expired

      If the database size is less than 10 gigabytes (GB), you can follow these steps:

      1. Install an express edition of the product.

      2. Locate the data files (mdf and ldf) files for your database.

      3. Attach these files to the SQL express edition.

        [!NOTE]
        Before you attach the data files to SQL Express edition, if these files are currently located in the default data directory for the old instance, you may want to move the database files from their current location to either the new data directory for the new installation or to another location on the server.

  • Case 3 – You are running into this issue in SQL Server 2008 environments even after upgrading to a licensed version of SQL Server

    In this case, you have the following options.

    [!NOTE]
    You will also notice this issue on systems where you had originally installed the evaluation edition of the shared tools and later upgrade to a licensed version.

    • Option 1

      Apply Service Pack 1 for SQL Server 2008 before upgrading the evaluation edition to a licensed edition.

      [!NOTE]
      If you had already performed the edition upgrade before applying Service Pack 1 for SQL server 2008, you will be required to go through all the steps mentioned in the Option 2 section to resolve the problem. The service pack will only prevent issues that involve future edition upgrades.

    • Option 2

      Use the following procedure to fix the issue:

      [!IMPORTANT]
      This section, method, or task contains steps that tell you how to modify the registry. However, serious problems might occur if you modify the registry incorrectly. Therefore, make sure that you follow these steps carefully. For added protection, back up the registry before you modify it. Then, you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, see the following article: How to back up and restore the registry in Windows.

      1. Click Start, click Run, type Regedt32, and then click OK.

      2. Locate and then click the following key in the Registry Editor:

        HKEY_LOCAL_MACHINESOFTWAREMicrosoftMicrosoft SQL Server100ConfigurationState

      3. In the right pane of the Registry Editor, select CommonFiles DWord value.

      4. On the Edit menu, click Modify.

      5. Type 3, and then click OK.

      6. Quit Registry Editor.

      7. Rerun the Upgrade to a Different Edition of SQL Server (Setup) procedure to complete the upgrade of all the components to a licensed edition.

Check whether SSMS will expire

  1. Start SQL Server Management Studio.
  2. Select the Help menu and then the About… submenu from the list. You will run into the problem discussed in the article if the component Microsoft SQL Server Management Studio has expires in ‘x’ days next to it.

Applies to

  • SQL Server 2008 Developer
  • SQL Server 2008 Enterprise
  • SQL Server 2008 Standard
  • SQL Server 2008 Web
  • SQL Server 2008 Workgroup
  • SQL Server 2008 R2 Developer
  • SQL Server 2008 R2 Enterprise
  • SQL Server 2008 R2 Express with Advanced Services
  • SQL Server 2008 R2 Standard
  • SQL Server 2008 R2 Standard Edition for Small Business
  • SQL Server 2012 Developer
  • SQL Server 2012 Enterprise
  • SQL Server 2012 Express
  • SQL Server 2012 Standard
  • SQL Server 2012 Web
  • SQL Server 2012 Enterprise Core
  • SQL Server 2014 Developer
  • SQL Server 2014 Enterprise
  • SQL Server 2014 Enterprise Core
  • SQL Server 2014 Express
  • SQL Server 2014 Standard

Restart SQL service after trial period – and continue using it

The problem usually occurs when you are running an evaluation instance
of SQL Server and the evaluation time period has expired. I will show you a workaround, that enables you to continue using SQL even though it has expired.

Evaluation period has expired, SQL Management Studio dialog.

SQL Server Error 17051" when trying to start the SQL Server ...

When trying to start service after the period is expired, Error 17051

You have encountered, like i, the expiration of an SQL instance.You might not have an SQL license in hand at this moment, but have the need to use the SQL or SQL Management Studio. At least to extract your data for possible new installations.

Before i continue, i should mention, that SQL studio management now have become free. You don’t actually need to worry about the expired license for SSMS. You can download it free of charge from Microsoft. Link is here: https://docs.microsoft.com/en-us/sql/ssms/download-sql-server-management-studio-ssms

SQL services look at system time when determine if the license is still within evaluation period. So by changing the time back within the evaluation period, you will be able to start the service. When you are done, set the time back to normal. 🙂

In other words, you are extending SQL trial period.



Notes. Some of you have reported it not to work from SQL2016 and upwards. If you got it to work with SQL2016 or above. Please comment.
The following has been confirmed by users:

  •  SQL Server 2016 WS 2016
  •  SQL Server 2017 WS 2019
  •  SQL Server 2019 (note: adjust time to max 180 days)

How To:

Open services. You can see the service is not running and time is well beyond expiration in this example:

If the service is started, it will prompt for error 17051, which is expiration error.

Now if i turn system time back within the expiration date, i will be able to start the service without error, and start SQL management studio.

Remember to turn the time back to original date or your inserted dates will be wrong.

Heres a powershell script to automate the task. Edit as you feel.

The script gets current date, substract 360 (this can be changed to match the 180 evaluation period). Starts all services with SQL in the name, wait for them to start, then set the time back to normal.

$currentDate = Get-Date // Get current date

$pastTime = $currentDate.AddDays(-360) // Substract 1 year

set-date $pastTime // set current time to the past

Start-Service -Name "*sql*" -ErrorAction SilentlyContinue // Try to start the service

$areServicesStopped = $true // Check for service

while($areServicesStopped){ // Loop trying to get service up

$serviceStatus = get-service -Name "*sql*" | select status

if ($serviceStatus -notlike "Stopped") {

$areServicesStopped = $false

}

Start-Sleep -Seconds 1

}

$currentDate = $pastTime.AddDays(360) // Set date time to current date

set-date $currentDate

Notes:

This method works with SQL versions uptill publish date of this post (18/09/2017). If it has worked for you, feel free to comment which version worked for you (in case MS creates a fix).

  • Remove From My Forums
  • Вопрос

  • Very bad day, I encountered in the installation of sql server ubuntu “The evaluation period has expired” error, who can tell me how to solve. Who else can tell me how to change the name of the instance, the default name too remembered, can you
    install multiple instances?

Ответы

  • Hi sql server on mac,

    >>I encountered in the installation of sql server ubuntu “The evaluation period has expired” error.

    If we meet the error message “The evaluation period has expired”, we may have used a expired installation media, in some previous version of SQL Server 2017 on Linux,  it provides an evaluation with a 180 day period. How did you install
    SQL Server on Ubuntu? Which edition did you select when you install it?

    Please refer to this document to install it: Quickstart:
    Install SQL Server and create a database on Ubuntu, please check if you are using the true package: 

    sudo add-apt-repository “$(wget -qO- https://packages.microsoft.com/config/ubuntu/16.04/mssql-server-2017.list)”

    >>Who else can tell me how to change the name of the instance, the default name too remembered, can you install multiple instances?

    As mentioned by Olaf, SQL Server on Linux did not have a concept of named instance (as you said “change the name of the instance”), SQL Server on Linux only supports one instance one host, we can use docker to install multiple instances on it.

    Best Regards,

    Teige


    MSDN Community Support
    Please remember to click “Mark as Answer” the responses that resolved your issue, and to click “Unmark as Answer” if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to
    MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Помечено в качестве ответа

      27 февраля 2018 г. 12:28

Если вы установили ознакомительную (пробную) версию Microsoft SQL Server, имейте в виду что срок работы такого экземпляра MSSQL ограничен 180 днями, после чего SQL Server прекращает работу. Вы должны прекратить использование СУБД или обновить свою Evaluation редакцию SQL Server до полноценной. Часто бывает, что после окончания тестирования ознакомительной версии SQL Server, принимается решение перевести систему в промышленную эксплуатацию, для чего нужно перейти на полную редакцию SQL Server, а полностью переустанавливать MSSQL не хочется.

Узнать дату истечения срока действия ознакомительной версии SQL Server можно с помощью:

  • Microsoft SQL Server Management Studio (Help -> About)
  • С помощью следующего SQL запроса:
    SELECT
    create_date AS 'SQL Server Install Date',
    DATEADD(DD, 180, create_date) AS 'SQL Server Expiry Date'
    FROM sys.server_principals
    WHERE name = 'NT AUTHORITYSYSTEM'
  • по значению Start Time в файле журнала установки SQL Server
    summaryLog.txt
    (C:Program FilesMicrosoft SQL ServerXXXSetup BootstrapLOGSummary.txt).

После истечения ознакомительного периода SQL Server не останавливает базу автоматически. Однако, если вы перезапустите службу SQL Server или перезагрузите хост, служба SQL Server (mssql) не запустится с ошибкой:

Windows could not start the SQL Server (MSSQL17) on Local Computer. For more information, review the System Event Log. If this is a non-Microsoft service, contact the service vendor, and refer to service-specific error code 17051.

Windows could not start the SQL Server ошибка 17051

В журнале событий Event Viewer -> Application при этом должны присутствовать ошибки:

EventID: 17051, Source: MSSQLSERVER
SQL Server evaluation period has been expired.

ошибка SQL Server evaluation period has been expired.

В файле
%sqlserverinstallpath%logERRORLOG
должны быть ошибки вида.

2021-07-25 11:21:02.22 Server      Error: 17051, Severity: 16, State: 1.
2021-07-25 11:21:02.22 Server      SQL Server evaluation period has expired.

Также при запуске SQL Server Management Studio (SSMS) или SQL Profiler можно увидеть ошибку:

Evaluation period has expired. For information on how to upgrade your evaluation software please go to https://www.microsoft.com/sql/howtobuy

SQL Server Management Studio - Evaluation period has expired

А при подключении к инстансу SQL Server с истекшим тестовым периодом:

A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)

Обновление ознакомительной версии SQL Server до полноценной

Чтобы перенести ваш экземпляр MS SQL с Evaluation редакции на полноценную коммерческую версию, вам нужен ключ продукта. Запустите мастер установки SQL Server Installation с установочного диска или через SQL Server Installation Center (Microsoft SQL Server 2019 -> Configuration Tools):

  1. Перейдите в раздел Maintenance и выберите Edition Upgrade; обновление редакции SQL Server
  2. На следующем шаге нужно указать ваш ключ продукта (Enter the product key); указать клю продукта SQL Server
  3. Затем подтвердите EULA;
  4. Мастер должен обнаружить, что на этом компьютере установлена Evaluation редакция SQL Server; обновление evaluation редакции SQL Server 2019
  5. Нажмите кнопку Upgrade и дождитесь обновления версии MSSQL;
  6. После заверения обновления запустите службы MSSQL вручную или перезагрузите хост.

Вы можете обновить редакцию SQL Server 2019 (15.x) Evaluation Enterprise до следующих версий:

  • SQL Server 2019 (15.x) Enterprise (Server+CAL or Core License)
  • SQL Server 2019 (15.x) Standard
  • SQL Server 2019 (15.x) Developer
  • SQL Server 2019 (15.x) Web

Вы можете обновить таким образом только стендалон инстансы MS SQL Server. Обновление редакции не поддерживается для кластерных сценариев Windows Failover Cluster, в том числе при использовании групп доступности Always On.

Если при обновлении редакции появится ошибка Engine_SqlEngineHealthCheck, выполните обновление версии SQL Server из командной строки (пути могут отличаться):

Cd "C:Program FilesMicrosoft SQL ServerxxSetup BootstrapSQLServer2019"
setup.exe /q /ACTION=editionupgrade /InstanceName=MSSQLSERVER /PID=<ProductKey> /SkipRules= Engine_SqlEngineHealthCheck

где
<ProductKey>
— ваш ключ 25 символьный ключ продукта

Если у вас нет собственного ключа установки, и вы используете ваш инстанс MSSQL только для разработки и тестирования, вы можете обновить Evaluation версию до бесплатной Developer Edition. Для этого скачайте установочный образ SQL Server Developer Edition (https://www.microsoft.com/en-us/sql-server/sql-server-downloads). Запустите обновление редакции аналогичным образом и в качестве целевой редакции выберите Free Developer.

обновление evaluation редакции sql server до developer edition

Данная инструкция по обновлению редакции с Evaluation до более высокой актуальна для всех поддерживаемых версий Microsoft SQL Server (2019, ,2017,2016,2014 и 2012)

Обновление до корпоративной Enterprise версии SQL Server (Volume License)

Если вы хотите обновить используемую версию SQL Server по программе корпоративного лицензирования Microsoft, вы будете удивлены, что в центре корпоративного лицензирования Microsoft Volume Licensing Service Center (MS VLSC) отсутствуют ключи для MS SQL Server.

sql server VLSC ключ для enterprise agreement - This product does not require a product key

Дело в том, что ключ интегрирован непосредственно в дистрибутив. Самое интересное, что поддержка VLSC рекомендует удалить установленный SQL Server и переустановить его с помощью скачанного c VLSC iso-файла с дистрибутивом SQL.

К счастью, есть возможность получить правильный ключ непосредственно из дистрибутива:

  1. Скачайте ISO файл с дистрибутивом SQL из своего кабинета Microsoft Volume Licensing Service Center (https://www.microsoft.com/Licensing/servicecenter/); скачать корпоративную версию sql server из личного кадинета microsoft
  2. Смонтируйте скачанный ISO файл на любом другом сервере (на котором SQL Server не установлен);
  3. Запустите файл Setup.exe с установочного диска SQL Server;
  4. Выберите Installation -> New installation or add features to an existing installation; Мастер установки sql server
  5. Далее следуете инструкциям мастера и вуаля!! На экране установки будет показан используемый корпоративный ключ для MS SQL Server; Получить корпоративный vlsc ключ для активации sql server standart
  6. Перепишите ключ и отмените установку SQL сервера;
  7. Обновите версию SQL сервера по инструкции из первой части статьи (используя полученный ключ).

Продление ознакомительного периода использования SQL Server

Microsoft не поддерживает продление ознакомительного использования MS SQL Server после 180 дней. Однако в тестовой среде, если вам нужно, чтобы SQL Server с истекшей лицензией поработал еще немного, вы можете просто на сервере перевести часы назад на 180 дней и перезапустить службы SQL Server (MSSQL Server, SQL Server Agent, SQL Server Browser, SQL Server Reporting Service).
После перезапуска служб можно выставить на сервере нормальное время. Службы SQL Server будут работать до следующей перезагрузки сервера или перезапуска служб.

Вы также можете конвертировать ознакомительную редакцию Windows Server в полноценную Standard/Enterprise согласно данной инструкции.

It is important to understand that the Instructions for RedHat 7.3 and 7.4 apply to the applicable versions of CentOS. Since you didn’t specify which version of CentOS you are using, I can only assume, you are using one based on RHEL 7.3 or RHEL 7.4. If that is not the case then your OS doesn’t support MSSQL.

Can anyone help me? Why I am getting this error I am unable to proceed
with the setup.

I suspect by following unofficial instructions you have by accident installed the CTP or RC SQL Server 2017 package. Microsoft typically limits preview builds to a specific timeframe. Before you run any of the commands below, you will want to remove what you have installed, using the appropriate commands.

In order to solve that problem you need to run the following command:

sudo rm -rf /etc/yum.repos.d/mssql-server.repo

After that command is successful you need to run the following command:

sudo curl -o /etc/yum.repos.d/mssql-server.repo
https://packages.microsoft.com/config/rhel/7/mssql-server-2017.repo

In Microsoft own documentation on how to change the repository source for SQL Server 2017 they indicated the following.

At this point, if you choose to perform a full installation using the quickstart tutorials, remember that you have just configured the target repository. Do not repeat that step in the tutorials. This is especially true if you configure the GDR repository because the quickstart tutorials use the CU repository.

Change repositories from the preview repository to the GA repository

Once you have updated the repository you need to run the following command:

sudo yum install -y mssql-server

You then need to run the following command:

sudo /opt/mssql/bin/mssql-conf setup

You can then proceed with the configuration as outlined by Microsoft.

If you are trying SQL Server 2017 in this tutorial, the following
editions are freely licensed: Evaluation, Developer, and Express.

Install SQL Server and create a database on Red Hat

The end of the repository URL confirms the repository type:

  • mssql-server: preview repository.

  • mssql-server-2017: CU repository.

  • mssql-server-2017-gdr: GDR repository.

There are two main types of repositories for each distribution:

  • Cumulative Updates (CU): The Cumulative Update (CU) repository contains packages for the base SQL Server release and any bug fixes or
    improvements since that release. Cumulative updates are specific to a
    release version, such as SQL Server 2017. They are released on a
    regular cadence.

  • GDR: The GDR repository contains packages for the base SQL Server release and only critical fixes and security updates since that
    release. These updates are also added to the next CU release.

Installation guidance for SQL Server on Linux

Добавить комментарий