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

Logic Failed when using System Date
Autoincrement primary key
PInvoke Passing structure with a nested structure array C#
Watin: is there a way to call ImageByTitle from a table cell?
Recursively create Tree from List
Compilation issue in C# .NET
C# remove unallowed folder name characters [duplicate]
Image processing with lockbits, alternative to getpixel?
Multi level header structure WPF
C# Accessing dynamic property on interface
How do I get the tint color from a sprite batch in HLSL
Difference of two lists C#
read xml file by linq
How to get current running task in a blockingqueue of C#?
Why does System.Drawing.Image.GetThumbnailImage require an unused delegate?
Should I be worried about Version Conflicts?

Categories

HOME
grpc
windows-server-2008
intellisense
gaussian
livecharts
crash
grid
sitemap
webpack-dev-server
segmentation-fault
phpexcel
theory
vichuploaderbundle
virtualenv
ng2-charts
mbed
comma
swift3.1
samba
autologin
gpo
git-branch
aws-iot
handle
ppp
datastax-enterprise
grunt-contrib-uglify
android-cursorloader
osgi-bundle
storefront
angularjs-resource
ansible-inventory
extern
form-fields
nscollectionview
irr
vpython
firefox-developer-edition
pexpect
f#-fake
html-entities
azure-data-catalog
jenkins-2
dcom
visio-2010
visualizer
selection-sort
jtextarea
business-catalyst
zsh-completion
mavlink
mongodb-3.3
ldd
falcon
airwatch
trendline
hana-sql-script
dday
opendolphin
jcomponent
page-flipping
autoscaling
vspackage
android-networking
copy-on-write
skview
conkeror
numerical-recipes
crtdbg.h
drools-guvnor
indic
disparity-mapping
nest-initiative
telerik-appbuilder
rda
satisfiability
internet-radio
cvi
8-puzzle
cab
latex-suite
ncml
inflate
motordriver
hypertable
django-1.4
stl-algorithm
cherokee
isgl3d
norton
virtual-destructor
database-agnostic
miniport
appointment





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