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

Why are settings.settings variables not updating when I assign to them?
C# Chart crashes if there is a big Y-value
Backup localDB database in ClickOnce
how to populate text boxes based on dropdownlist selection mvc
Printing listview using loop prints all rows on the same line C#
Overcoming lack of app.config in SSIS Script Task to resolve memory exception issues
Popup still shows when not minimized
Convert string to int, check total sum of int based on foreach loop
Resizing images in parallel causing out of memory exception
Keep receiving error code CS0165
Dictionary throwing StackOverflowException after ContainsKey for an object is called
How can i use unbound column in Master to display data from detail
BitConverter.GetBytes vs Convert.ToByte
Visual Studios Xamarin error when creating blank app
Uploading a file via FTP
Why will the addressing method that works for images not work for text files?

Categories

HOME
ckan
swift3
mobile
process
formatting
singleton
datetimepicker
glympse
servicenow
procmon
country-codes
rmarkdown
wavefront
google-app-maker
elastalert
solidity
browsermob
web-testing
jsfiddle
printf
summernote
datasource
bug-reporting
xna
javaagents
gsuite
apdu
windowserror
my.cnf
cloudformation
scripting-language
bytebuffer
emr
jms-topic
recreate
paper-trail-gem
arp
mplab
imdb
luhn
javax
matlab-compiler
android-databinding
hippocms
stdin
cowboy
ninja-forms
socketcluster
tapply
android-graphview
apiman
intervention
taleo
piranha-cms
infovis
rivets.js
dcom
node-java
business-catalyst
catalyst
huawei
qudpsocket
computed-properties
indoor-positioning-system
dimensionality-reduction
eclipse-mars
git-cherry-pick
patching
nugetgallery
code-translation
ooad
jsondoc
datamodel
tvp
android-togglebutton
syncano
avrcp
pagecontrol
mri
pytz
jsmpp
facebook-java-api
nomachine
google-voice
grape-api
oc4j
qgraphicsscene
latex-suite
biztalk-deployment
quit
inflate
waveout
helicontech
commonsware
openwrap
qvariant
jqtransform
lwp
javah
fxcopcmd
azure-appfabric
datarelation
simultaneous
jquery-attributes
web-search
focus-stealing
paperless

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App