c#


Filter Table Triggers when using SMO DependencyWalker


I have a database with numerous tables that I use the SMO DependencyTree and DependencyWalker to order them by dependencies and then script them out. However, there are two particular tables that have the following relationship:
CREATE TABLE Production_Events (
Event_Id int identity(1,1) NOT NULL,
Start_Time datetime NOT NULL,
End_Time datetime null
--... other columns
)
CREATE TABLE Production_Event_Data (
Production_Event_Data_Id int identity(1,1) NOT NULL,
Event_Id int NOT NULL, -- Foreign key to the above table
Variable_Id int NOT NULL, -- Foreign key to another table
Variable_Value varchar(25) NULL
--... other columns
)
The Production_Event table has a FOR INSERT trigger which populates the Production_Event_Data table with values that come from various sources when a new row is inserted in Production_Event.
If there is no trigger present on the Production_Event table, the DependencyWalker will properly order these tables for scripting by detecting the Foreign Key relationship between them. However, if the trigger is present, then DependencyWalker sees the trigger as a dependency and orders the tables incorrectly by putting the Production_Event_Data table before the Production_Events. Ultimately this will end with a Foreign Key Constraint error if you try to execute the script.
Is there a way to configure DependencyWalker to only account for table dependencies and NOT trigger dependencies?

Related Links

how to remove an item from class list while using for-each loop? [duplicate]
Generic GDI+ error in Janus
WPF XAML serialize/deserialize
How to implement Auditing system in C# in webservice?
Make a multiple page report: crystal report viewer only generates first page (C#)
how to read, write, process txt file like database in c# console
AdView always returns “Adview failed to load with error: unknown error”
Send uint over TCP to server c#
How to populate a ListView in Xamarin Android?
Static file not loading via wwwroot c#
VisualStudio 2017 Console Project template missing
how to display the file in an collapse/accordition Panel [closed]
Mysterious line between colored TextBlocks inside a StackPanel
How to send datetime parameter as DD/MM/YYYY HH:MM:SS format
How can I set a data breakpoint in a C# program in Visual Studio 2015? [duplicate]
c# Using AmazonS3 SDK for RIAK

Categories

HOME
c#
kendo-ui-angular2
marie
stanford-nlp
xamarin.forms
ibm
blob
watson-iot
okhttp3
multipartform-data
flowtype
doctrine2
minimax
google-search-appliance
aws-sdk-cpp
mongodb-replica-set
derby
github-flavored-markdown
dompdf
geography
views
md2
beacon
ejb-3.1
screen-scraping
functional-dependencies
struts
ckeditor4.x
android-xml
continuous-fourier
typeorm
custom-fields
dynamics-ax-2012-r3
pushpad
jbossfuse
visual-studio-debugging
ng2-bootstrap
ilog
powerbi-embedded
outlook-2010
stochastic-process
yelp
aspose.pdf
autodesk-data-management
g77
google-cloud-shell
critical-section
tsc
scrollmagic
lightspeed
therubyracer
google-scholar
universe
mate-desktop
sprockets
jde
python-rq
window.location
custom-build-step
music-player
jsondoc
jersey-test-framework
wonderware
newlib
javapackager
database-project
notice
jain-sip
page-flipping
eaaccessory
dcg
playn
cakephp-2.6
tinymce-plugins
tidesdk
dockerpy
douglas-peucker
chunks
xmlserializer
selenium-grid2
fscanf
xts
class-library
internet-radio
facebook-java-api
mysql-error-1146
nsnumber
azure-pack
panelgrid
removeall
msbuild-task
system.transactions
motordriver
filedialog
wdm
opendir
jqtransform
marathontesting
conditional-operator
database-agnostic
carbon-emacs
unauthorized
hotfix
memory-consumption

Resources

Encrypt Message