i'm trying generate script of data in database can move data on identical database on server. in sql server 2012 right click on source database
tasks > generate scripts > script entire database , database objects > advanced > types of data script: data only
this gives me error cyclic dependency. if change type of data script schema , data generates fine. how can fix work data only?
action result getting list of objects mydatabase failed
detailed report:
microsoft.sqlserver.management.sqlscriptpublish.sqlscriptpublishexception: error occurred while scripting objects. ---> microsoft.sqlserver.management.smo.smoexception: cyclic dependencies found. @ microsoft.sqlserver.management.smo.smodependencyorderer.dependencygraphtraversal(int32 num, dictionary
2 dictionary, list
1 sortedlist, hashset1 visited, hashset
1 current) @ microsoft.sqlserver.management.smo.smodependencyorderer.dependencygraphtraversal(int32 num, dictionary2 dictionary, list
1 sortedlist, hashset1 visited, hashset
1 current) @ microsoft.sqlserver.management.smo.smodependencyorderer.dependencygraphtraversal(int32 num, dictionary2 dictionary, list
1 sortedlist, hashset1 visited, hashset
1 current) @ microsoft.sqlserver.management.smo.smodependencyorderer.dependencygraphtraversal(int32 num, dictionary2 dictionary, list
1 sortedlist, hashset1 visited, hashset
1 current) @ microsoft.sqlserver.management.smo.smodependencyorderer.sortdictionary(dictionary2 dictionary) @ microsoft.sqlserver.management.smo.smodependencyorderer.sortdataset(dataset ds) @ microsoft.sqlserver.management.smo.smodependencyorderer.sortdataset(list
1 objectlist, dictionary2 iddictionary, dataset ds) @ microsoft.sqlserver.management.smo.smodependencyorderer.executequeryusingtemptable(list
1 objectlist, list1 list, string query) @ microsoft.sqlserver.management.smo.smodependencyorderer.resolvetableonlydependencies() @ microsoft.sqlserver.management.smo.smodependencyorderer.resolvedependencies() @ microsoft.sqlserver.management.smo.smodependencyorderer.order(ienumerable
1 urns) @ microsoft.sqlserver.management.smo.scriptmaker.discoverorderscript(ienumerable1 urns) @ microsoft.sqlserver.management.smo.scriptmaker.scriptworker(list
1 urns, ismoscriptwriter writer) @ microsoft.sqlserver.management.smo.scriptmaker.script(urn[] urns, ismoscriptwriter writer) @ microsoft.sqlserver.management.sqlscriptpublish.sqlscriptgenerator.doscript(scriptoutputoptions outputoptions) --- end of inner exception stack trace --- @ microsoft.sqlserver.management.sqlscriptpublish.generatepublishpage.worker_dowork(object sender, doworkeventargs e) @ system.componentmodel.backgroundworker.ondowork(doworkeventargs e) @ system.componentmodel.backgroundworker.workerthreadstart(object argument)
i had same exact error... see answer here: http://mattslay.com/ssms-generate-scripts-data-only-cyclic-dependencies-found-error/
then, on whim, knowing had scripted database before, connected sql server 2012 instance using sql server management 2008 r2, , able generated scripts without error!!
note, did data-only, , had allow script database objects. tried select tables, gave other errors wasn’t willing track down, did whole thing.
Comments
Post a Comment