ssis – 生成脚本 – 仅数据 – 发现循环依赖错误

前端之家收集整理的这篇文章主要介绍了ssis – 生成脚本 – 仅数据 – 发现循环依赖错误前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我试图生成一个数据库中的所有数据的脚本,所以我可以将数据移动到另一个服务器上的相同的数据库.在sql Server 2012中,我右键单击源数据库

任务>生成脚本>脚本整个数据库和所有数据库对象>高级>数据类型到脚本:仅数据

这给我一个关于循环依赖的错误.如果我将数据类型更改为脚本到模式和数据,它会生成罚款.如何解决这个问题呢?

Action Result Getting a list
of objects from MyDatabase Failed

Detailed report:

Microsoft.sqlServer.Management.sqlScriptPublish.sqlScriptPublishException:
An error occurred while scripting the objects. —>
Microsoft.sqlServer.Management.Smo.SmoException: Cyclic dependencies
found. at
Microsoft.sqlServer.Management.Smo.SmoDependencyOrderer.DependencyGraphTraversal(Int32
num,Dictionary2 dictionary,List1 sortedList,HashSet1 visited,
HashSet
1 current) at
Microsoft.sqlServer.Management.Smo.SmoDependencyOrderer.DependencyGraphTraversal(Int32
num,
HashSet1 current) at
Microsoft.sqlServer.Management.Smo.SmoDependencyOrderer.SortDictionary(Dictionary2
dictionary) at
Microsoft.sqlServer.Management.Smo.SmoDependencyOrderer.SortDataSet(DataSet
ds) at
Microsoft.sqlServer.Management.Smo.SmoDependencyOrderer.SortDataSet(List
1
objectList,Dictionary2 idDictionary,DataSet ds) at
Microsoft.sqlServer.Management.Smo.SmoDependencyOrderer.ExecuteQueryUsingTempTable(List
1
objectList,List1 list,String query) at
Microsoft.sqlServer.Management.Smo.SmoDependencyOrderer.ResolveTableOnlyDependencies()
at
Microsoft.sqlServer.Management.Smo.SmoDependencyOrderer.ResolveDependencies()
at
Microsoft.sqlServer.Management.Smo.SmoDependencyOrderer.Order(IEnumerable
1
urns) at
Microsoft.sqlServer.Management.Smo.ScriptMaker.DiscoverOrderScript(IEnumerable1
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.sqlScriptPublish.sqlScriptGenerator.DoScript(ScriptOutputOptions
outputOptions) — End of inner exception stack trace — at
Microsoft.sqlServer.Management.sqlScriptPublish.GeneratePublishPage.worker_DoWork(Object
sender,DoWorkEventArgs e) at
System.ComponentModel.BackgroundWorker.OnDoWork(DoWorkEventArgs e) at
System.ComponentModel.BackgroundWorker.WorkerThreadStart(Object
argument)

我有同样的确切错误…看到我的答案在这里: http://mattslay.com/ssms-generate-scripts-data-only-cyclic-dependencies-found-error/

Then,on a whim,knowing that I had successfully scripted this database before,I connected to the sql Server 2012 instance using sql Server Management 2008 R2,and I was able to generated the scripts without error!!

Note,that I did data-only,and I had to allow it to script all database objects. I tried to select only certain tables,but that gave some other errors that I wasn’t willing to track down,so I just did the whole thing.

原文链接:https://www.f2er.com/javaschema/281930.html

猜你在找的设计模式相关文章