Unable to script out ExternalDataSource of type BLOB_STORAGE.
It appears SSMS v17.7 does not know how to script out the external data source. I am getting this error when attempting to script out an existing data source.
TITLE: Microsoft SQL Server Management Studio
Unexpected value for enumeration type 5. (Microsoft.SqlServer.Smo)
Attempting to look at Properties in the right click context menu also produces an error
TITLE: Microsoft SQL Server Management Studio
Cannot show requested dialog.
ADDITIONAL INFORMATION:
Invalid DataSourceType (SqlManagerUI)
Here is the version information:
Microsoft SQL Server Management Studio 14.0.17254.0
Microsoft Analysis Services Client Tools 14.0.1016.251
Microsoft Data Access Components (MDAC) 10.0.16299.15
Microsoft MSXML 3.0 6.0
Microsoft Internet Explorer 9.11.16299.0
Microsoft .NET Framework 4.0.30319.42000
Operating System 6.3.16299

5 comments
-
Brandon commented
What a pain, this is affecting us also!
===================================
Unexpected value for enumeration type 5. (Microsoft.SqlServer.Smo)
------------------------------
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=14.0.17285.0+((SSMS_Rel_17_4).180821-0238)&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.WrongPropertyValueExceptionText&LinkId=20476------------------------------
Program Location:at Microsoft.SqlServer.Management.Smo.ExternalDataSource.ScriptCreate(StringCollection createQuery, ScriptingPreferences sp)
at Microsoft.SqlServer.Management.Smo.SqlSmoObject.ScriptCreateInternal(StringCollection query, ScriptingPreferences sp, Boolean skipPropagateScript)
at Microsoft.SqlServer.Management.Smo.ScriptMaker.ScriptCreateObject(Urn urn, ScriptingPreferences sp, ObjectScriptingType& scriptType)
at Microsoft.SqlServer.Management.Smo.ScriptMaker.ScriptCreate(Urn urn, ScriptingPreferences sp, ObjectScriptingType& scriptType)
at Microsoft.SqlServer.Management.Smo.ScriptMaker.ScriptCreateObjects(IEnumerable`1 urns)
at Microsoft.SqlServer.Management.Smo.ScriptMaker.ScriptUrns(List`1 orderedUrns)
at Microsoft.SqlServer.Management.Smo.ScriptMaker.DiscoverOrderScript(IEnumerable`1 urns)
at Microsoft.SqlServer.Management.Smo.ScriptMaker.ScriptWorker(List`1 urns, ISmoScriptWriter writer)
at Microsoft.SqlServer.Management.Smo.ScriptMaker.Script(Urn[] urns, ISmoScriptWriter writer)
at Microsoft.SqlServer.Management.Smo.ScriptMaker.Script(Urn[] urns)
at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.ScriptGenerator.ScriptCreate(SqlTextWriter sqlwriter, Server server, Urn[] urns, ScriptingOptions options)
at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.ScriptNodeActionContext.Script(SqlTextWriter writer)
at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.SqlScriptMenu.OnScriptItemClick(Object sender, EventArgs e) -
Jason Miner commented
This is still an issue as of 7/18/2019 in SSMS version 18.1
-
Ferruccio Guicciardi commented
I got same error. It doesn't make sense when command syntax is already confirmed by Microsoft on 02/28/2018
https://docs.microsoft.com/en-us/sql/t-sql/statements/create-database-scoped-credential-transact-sql?view=sql-server-2017
I asked today on a support ticket if this has to do to fact that I am using 'Free Trial' Azure subscription instead of 'Pay-As-You-Go' subscription. I will reply later with my findings. -
Jeff B. commented
SSMS v17.9.1 has the same behavior.
-
Anonymous commented
Same issue with SSMS v18.0 preview 4
Unexpected value for enumeration type 5. (Microsoft.SqlServer.Smo)