当我尝试从SQL Server Management Studio 2012
数据库中Azure
生成脚本时。我收到以下错误:
Microsoft.SqlServer.Management.SqlScriptPublish.SqlScriptPublishException: 编写对象脚本时发生错误。 ---> Microsoft.SqlServer.Management.Sdk.Sfc.EnumeratorException:失败 检索此请求的数据。 ---> Microsoft.SqlServer.Management.Sdk.Sfc.InvalidVersionEnumeratorException: 版本11.0 SqlAzureDatabase不支持操作。在 Microsoft.SqlServer.Management.Smo.XmlReadDoc.LoadFile(程序集a, String strFile)at Microsoft.SqlServer.Management.Smo.SqlObject.LoadInitData(String file, ServerVersion ver,DatabaseEngineType databaseEngineType)at Microsoft.SqlServer.Management.Sdk.Sfc.ObjectCache.LoadElement(ObjectLoadInfo oli,ServerVersion ver,DatabaseEngineType databaseEngineType)at Microsoft.SqlServer.Management.Sdk.Sfc.ObjectCache.GetElement(ObjectLoadInfo oli,ServerVersion ver,DatabaseEngineType databaseEngineType)at Microsoft.SqlServer.Management.Sdk.Sfc.ObjectCache.GetAllElements(金塔 urn,ServerVersion ver,DatabaseEngineType databaseEngineType,Object ci)at Microsoft.SqlServer.Management.Sdk.Sfc.Environment.GetObjectsFromCache(金塔 urn,Object ci)at Microsoft.SqlServer.Management.Sdk.Sfc.Environment.GetData(请求 req,Object ci)at Microsoft.SqlServer.Management.Sdk.Sfc.Enumerator.GetData(对象 connectionInfo,请求请求)at Microsoft.SqlServer.Management.Sdk.Sfc.Enumerator.Process(对象 connectionInfo,请求请求)---内部异常堆栈的结束 追踪--- at Microsoft.SqlServer.Management.Sdk.Sfc.Enumerator.Process(对象 connectionInfo,请求请求)at Microsoft.SqlServer.Management.Smo.ExecutionManager.GetEnumeratorData(请求 req)at Microsoft.SqlServer.Management.Smo.Server.GetLCIDCollation(字符串 collationName)at Microsoft.SqlServer.Management.Smo.SqlSmoObject.GetComparerFromCollation(字符串 collationName)at Microsoft.SqlServer.Management.Smo.SqlSmoObject.GetDbComparer(布尔 inServer)at Microsoft.SqlServer.Management.Smo.SqlSmoObject.InitializeStringComparer() 在Microsoft.SqlServer.Management.Smo.Database.PreInitChildLevel()at Microsoft.SqlServer.Management.Smo.SqlSmoObject.InitChildLevel(金塔 levelFilter,ScriptingPreferences sp,Boolean forScripting)at Microsoft.SqlServer.Management.Smo.DatabasePrefetchBase.InitializeObjectCollection(字符串 输入) Microsoft.SqlServer.Management.Smo.DatabasePrefetchBase.d__1.MoveNext() 在 Microsoft.SqlServer.Management.Smo.SmoDependencyDiscoverer.SfcChildrenDiscovery(HashSet的
1 discoveredUrns) at Microsoft.SqlServer.Management.Smo.SmoDependencyDiscoverer.Discover(IEnumerable
1 骨灰盒 Microsoft.SqlServer.Management.Smo.ScriptMaker.Discover(IEnumerable的1 urns) at Microsoft.SqlServer.Management.Smo.ScriptMaker.DiscoverOrderScript(IEnumerable
1 骨灰盒 Microsoft.SqlServer.Management.Smo.ScriptMaker.ScriptWorker(List`1 urns,ISmoScriptWriter writer) Microsoft.SqlServer.Management.Smo.ScriptMaker.Script(Urn [] urns, ISmoScriptWriter编写者) Microsoft.SqlServer.Management.SqlScriptPublish.SqlScriptGenerator.DoScript(ScriptOutputOptions outputOptions)---内部异常堆栈跟踪结束--- at Microsoft.SqlServer.Management.SqlScriptPublish.GeneratePublishPage.worker_DoWork(对象 发件人,DoWorkEventArgs e)at System.ComponentModel.BackgroundWorker.OnDoWork(DoWorkEventArgs e)at System.ComponentModel.BackgroundWorker.WorkerThreadStart(对象 参数)
我找到了这个帖子:Failed to generate scripts for Sql Azure database: "Getting the list of objects from : failed"
但我无法使用:http://cloudservices.red-gate.com/
答案 0 :(得分:2)
尝试使用能够与Azure配合使用的SQL Server第三方工具。我认为来自Red-Gate的SQL Compare能够使用SQL Azure但我并不是百分之百确定。您始终可以在试用模式下使用它来完成工作......
答案 1 :(得分:0)
SQL Azure迁移向导也可能是您的选择。