Create SQL scripts from an Azure SQL database

When I tried to create scripts in SQL Server Management Studio 2012 from my Azure database. I got the following error:

Microsoft.SqlServer.Management.SqlScriptPublish.SqlScriptPublishException: An error occurred while creating the scripts. ---> Microsoft.SqlServer.Management.Sdk.Sfc.EnumeratorException: Failed to retrieve data for this request. ---> Microsoft.SqlServer.Management.Sdk.Sfc.InvalidVersionEnumeratorException: Operation is not supported on version 11.0 of SqlAzureDatabase. at Microsoft.SqlServer.Management.Smo.XmlReadDoc.LoadFile (build a, String strFile) at Microsoft.SqlServer.Management.Smo.SqlObject.LoadInitData (String, ServerVersion ver, DatabaseEngineType databaseEngineType) with Microsoft.SqlServer. Sfc.ObjectCache.LoadElement (ObjectLoadInfo oli, ServerVersion ver, DatabaseEngineType databaseEngineType) with Microsoft.SqlServer.Management.Sdk.Sfc.ObjectCache.GetElement (ObjectLoadInfo oli, ServerVersion ver, DatabaseEngineTypeerferver.Database ObjectCache.GetAllElements (Urn urn, ServerVersion ver, DatabaseEngineType databaseEngineType, Object ci) in Microsoft.SqlServer.Management.Sdk.Sfc.Environment.GetObjectsFromCache (Urn urn, Object ci) in Microsoft.SqlSerd.c. GetData (Request req, Object ci) in Microsoft.SqlServer.Management.Sdk.Sfc.Enumerator.GetData (ConnectionInfo object, request request) in Microsoft.SqlSer ver.Management.Sdk.Sfc.Enumerator.Process (connectionInfo object, Request request) --- End of the internal trace exception stack trace --- at Microsoft.SqlServer.Management.Sdk.Sfc.Enumerator.Process (connectionInfo object, request request) at Microsoft.SqlServer.Management.Smo.ExecutionManager.GetEnumeratorData (Request req) at Microsoft.SqlServer.Management.Smo.Server.GetLCIDCollation (String collationName) at Microsoft.SqlServer.Management.Smo.SqlSmoObject.GetComparerromrom .SqlServer.Management.Smo.SqlSmoObject.GetDbComparer (Boolean inServer) in Microsoft.SqlServer.Management.Smo.SqlSmoObject.InitializeStringComparer () in Microsoft.SqlServer.Management.Smo.Database.PreInlververld .SqlSmoObject.InitChildLevel (urn levelFilter, ScriptingPreferences sp, Boolean forScripting) on ​​Microsoft.SqlServer.Management.Smo.DatabasePrefetchBase.Initializ eObjectCollection (String type) when Microsoft.SqlServer.Management.Smo.DatabasePrefetchBase.d__1.MoveNext () in Microsoft.SqlServer.Management.Smo.SmoDependencyDiscoverer.SfcChildrenDiscovery (HashSet 1 discoveredUrns) at Microsoft.SqlServer.Management.Smo.SmoDependencyDiscoverer.Discover(IEnumerable 1 urns) at Microsoft.SqlServer.Management.Smo.ScriptMaker.Discover (IEnumerable 1 urns) at Microsoft.SqlServer.Management.Smo.ScriptMaker.DiscoverOrderScript(IEnumerable 1 urns) at Microsoft.SqlServer.Management.Smo.ScriptMaker. ScriptWorker (List`1 urns, writer ISmoScriptWriter) in Microsoft.SqlServer.Management.Smo.ScriptMaker.Script (Urn [] urns, ISmoScriptWriter) in Microsoft.SqlServer.Management.SqlScriptPublish.SqlScriptGenerator.DoScript (ScriptOutputOptions endOptions) internal exception stack trace --- at Microsoft.SqlServer.Management.SqlScriptPublish.GeneratePublishPage.worker_DoWork (Object sender, DoWorkEventArgs e) in System.ComponentModel.BackgroundWorker.OnDoWork (DoWorkEventArgs e) in System.ComponentModel.BackgroundWorker.WorkerThreadStart (Object argument)

I found this topic: Failed to create scripts for Azure Sql database: "Getting a list of objects from: failed" but I can not use: http://cloudservices.red-gate.com/

+4
source share
2 answers

Try using third-party tools for SQL Server that can work with Azure. I think SQL Compare from Red-Gate was able to work with SQL Azure, but Im not 100% sure. You can always use it in trial mode to get the job done ...

+2
source

Azure Migration Wizard may be for you too.

http://sqlazuremw.codeplex.com/

0
source

Source: https://habr.com/ru/post/1502909/


All Articles