Skip to content
This repository has been archived by the owner on May 7, 2024. It is now read-only.

Fail to script Azure SQL Data Warehouse #245

Open
everton-o opened this issue Aug 7, 2020 · 1 comment
Open

Fail to script Azure SQL Data Warehouse #245

everton-o opened this issue Aug 7, 2020 · 1 comment

Comments

@everton-o
Copy link

Hi, I'm trying to script out the schema of an Azure Synapse database (former Azure Data Warehouse) and I'm getting the following error:

Scripting request: da489750-14a5-471b-a166-71f09a4db30d encountered error: An error occurred while scripting the objects. Error details: Microsoft.SqlServer.Management.SqlScriptPublish.SqlScriptPublishException: An error occurred while scripting the objects. ---> Microsoft.SqlServer.Management.Sdk.Sfc.InvalidVersionEnumeratorException: This object is not supported on Datawarehouse databases. at Microsoft.SqlServer.Management.Smo.XmlReadDoc.LoadInternal() at Microsoft.SqlServer.Management.Smo.SqlObject.LoadInitDataFromAssemblyInternal(Assembly assemblyObject, String file, ServerVersion ver, String alias, StringCollection requestedFields, Boolean store, StringCollection roAfterCreation, DatabaseEngineType databaseEngineType, DatabaseEngineEdition databaseEngineEdition, Stream configXml) at Microsoft.SqlServer.Management.Smo.SqlObject.LoadInitData(String file, ServerVersion ver, DatabaseEngineType databaseEngineType, DatabaseEngineEdition databaseEngineEdition) at Microsoft.SqlServer.Management.Sdk.Sfc.ObjectCache.LoadElement(ObjectLoadInfo oli, ServerVersion ver, DatabaseEngineType databaseEngineType, DatabaseEngineEdition databaseEngineEdition) at Microsoft.SqlServer.Management.Sdk.Sfc.ObjectCache.GetElement(ObjectLoadInfo oli, ServerVersion ver, DatabaseEngineType databaseEngineType, DatabaseEngineEdition databaseEngineEdition) at Microsoft.SqlServer.Management.Sdk.Sfc.ObjectCache.GetAllElements(Urn urn, ServerVersion ver, DatabaseEngineType databaseEngineType, DatabaseEngineEdition databaseEngineEdition, Object ci) at Microsoft.SqlServer.Management.Sdk.Sfc.Environment.GetObjectsFromCache(Urn urn, Object ci) at Microsoft.SqlServer.Management.Sdk.Sfc.Environment.GetData(Request req, Object ci) at Microsoft.SqlServer.Management.Sdk.Sfc.Enumerator.GetData(Object connectionInfo, Request request) at Microsoft.SqlServer.Management.Smo.ExecutionManager.GetEnumeratorDataReader(Request req) at Microsoft.SqlServer.Management.Smo.SqlSmoObject.InitChildLevel(Urn levelFilter, ScriptingPreferences sp, Boolean forScripting, IEnumerable1 extraFields)
at Microsoft.SqlServer.Management.Smo.SmoCollectionBase.InitializeChildCollection(Boolean refresh, ScriptingPreferences sp, String filterQuery, IEnumerable1 extraFields) at Microsoft.SqlServer.Management.Smo.SmoCollectionBase.GetEnumerator(ScriptingPreferences sp) at Microsoft.SqlServer.Management.Smo.SmoDependencyDiscoverer.GetScriptableChildren(List1 propInfoList, PropagateAction propagateAction)
at Microsoft.SqlServer.Management.Smo.SmoDependencyDiscoverer.SfcChildrenDiscovery(HashSet1 discoveredUrns) at Microsoft.SqlServer.Management.Smo.SmoDependencyDiscoverer.Discover(IEnumerable1 urns)
at Microsoft.SqlServer.Management.Smo.ScriptMaker.Discover(IEnumerable1 urns) at Microsoft.SqlServer.Management.Smo.ScriptMaker.DiscoverOrderScript(IEnumerable1 urns)
at Microsoft.SqlServer.Management.Smo.ScriptMaker.ScriptWorker(List1 urns, ISmoScriptWriter writer) at Microsoft.SqlServer.Management.SqlScriptPublish.SqlScriptGenerator.DoScript(ScriptOutputOptions outputOptions) --- End of inner exception stack trace --- at Microsoft.SqlServer.Management.SqlScriptPublish.SqlScriptGenerator.DoScript(ScriptOutputOptions outputOptions) at Microsoft.SqlTools.ServiceLayer.Scripting.ScriptingScriptOperation.Execute() in D:\repos\sqltoolsservice\src\Microsoft.SqlTools.ServiceLayer\Scripting\ScriptingScriptOperation.cs:line 64

mssql-scripter -S myinstance -d mydb -U myuser -P mypwd --target-server-version "AzureDW" > ./myData2.sql

@barscm
Copy link

barscm commented Oct 15, 2020

Duplicate of issue #194 , I get the same even when using --unsupported-statements -r and this also does not work with a rollback to 1.0.0a20 as suggested in #157

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants