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

Extracting image from a slide of a .pptx
How to sort in EF parents by number of children of children of children?
Fetch Data from database to Fullcalendar.io using Json
How can I handle button Click in XAML?
Binding a singleton list to a list view
Uploading documents from Amazon S3 to CloudSearch using .NET SDK
Import multiple XML files into Excel
Twilio rest api error code 21612
Generate list with random numbers. Sort and total sum
“Windows.UI.Xaml.Markup.XamlParse.Exception”
Am I using ContinueWith correctly?
Load multiple methods from dll at runtime C#
bind images in buttons in a FlipView windows app store
Efficient way of shifting row down in ASP table
How to run DirectX code samples on Visual Studio 2015 and Windows 10?
How to backup the database from the server to the client computer using asp.net page

Categories

HOME
oauth-2.0
qlikview
spring-boot
redux
locale
cluster-analysis
snappy
microcontroller
okhttp3
qt4
annyang
jcodemodel
velocity
point-of-sale
watson-dialog
derby
jsfiddle
ibatis
jquery-easyui
geography
views
datasource
include-path
scalatest
tftp
mobile-development
snapkit
minitest
perf
kdevelop
mockserver
blueimp
icu
file-descriptor
qt-quick
peerjs
python-venv
f#-fake
weld
reqif
jks
runner
flask-socketio
dcom
cloudconvert
perldoc
visualizer
group
nls
huawei
eclipse-mars
mate-desktop
git-cherry-pick
falcon
shtml
nd4j
sqlxml
datamodel
github-for-mac
newlib
gnu-sort
magnet-uri
vanilla-forums
cyberduck
syncano
web-standards
mergecursor
static-files
dojox.grid
qf-test
api-eveonline
nsurlrequest
parsefloat
dotcmis
nspopupbutton
mongoid4
vbaccelerator
complete
jfilechooser
surfaceview
scidb
ironworker
angularjs-select2
usersettings
pageload
auctex
junit-rule
animationdrawable
inserthtml
utm
zend-validate
digg
large-data-volumes
web-widget
unauthorized
memory-consumption

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