Skip to content

SQL Server 2016 causes 'System.Exception: Unsupported Server Version' #14

Description

@SirFrostingham
  1. Run gacutil.exe from local system:
E:\DB_scripts>gacutil /l Microsoft.SqlServer.Smo
Microsoft (R) .NET Global Assembly Cache Utility.  Version 4.0.30319.0
Copyright (c) Microsoft Corporation.  All rights reserved.

The Global Assembly Cache contains the following assemblies:
  Microsoft.SqlServer.Smo, Version=10.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL
  Microsoft.SqlServer.Smo, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL
  Microsoft.SqlServer.Smo, Version=12.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL
  Microsoft.SqlServer.Smo, Version=13.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL
  Microsoft.SqlServer.Smo, Version=14.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL

Number of items = 5
  1. Edit ScriptSqlConfig.exe.config -> uncomment out <runtime/> section

  2. Change all newVersion attributes from '10.0.0.0' to '14.0.0.0'

  3. Run tool pointed at local (also tested remote) SQL 2016 server:
    ScriptSqlConfig.exe /server localhost /dir e:\db_scripts\generated_db_scripts

Result:

Launching (2012.5)....
Directory: e:\db_scripts\generated_db_scripts
Server: localhost
SMO Version: 14.0.0.0
Scripting Instance information...

Unhandled Exception: System.Exception: Unsupported Server Version
   at ScriptSqlConfig.Program.GetTargetServerVersion(Server srv)
   at ScriptSqlConfig.Program.ScriptInstance(String server, String directory)
   at ScriptSqlConfig.Program.Main(String[] args)

Note: This example uses the latest release of the ScriptSqlConfig tool (https://github.com/billgraziano/ScriptSqlConfig/releases/tag/v2012.5).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions