Quantcast
Channel: THWACK: All Content - Network Performance Monitor
Viewing all articles
Browse latest Browse all 21870

Orion SQL database has non trusted foreign keys

$
0
0

Hi

 

A question about the database for Orion.

 

I saw that in the SQL database for orion there are a few untrusted Foreign Keys, FK. (I have that in a new installed labb with 11.5RC1 and SAM 6.2R1 and in an installation that has been up for several years)

 

If you run the following yeary you can see all untrusted foreign keys:

SELECT'['+s.name+'].['+o.name+'].['+i.name+']'ASkeyname

fromsys.foreign_keysi

INNERJOINsys.objectsoONi.parent_object_id=o.object_id

INNERJOINsys.schemassONo.schema_id=s.schema_id

WHEREi.is_not_trusted= 1 ANDi.is_not_for_replication= 0


In my new installation I had these:
[dbo].[NotificationTypePermissions].[FK_NotificationTypePermissions_NotificationTypeID]

[dbo].[NotificationItems].[FK_NotificationItems_Type]

[dbo].[NotificationMaintenanceRenewals].[FK_NotificationMaintenanceRenewals_RenewalID]

[dbo].[NotificationBlogs].[FK_NotificationBlogs_BlogID]


In my old installation I had some more:

[dbo].[Migration_NPM_NV_WL_APS_DETAIL].[FK_NPM_NV_WL_APS_DETAIL_NPM_NV_WL_CONTROLLERS_DETAIL]

[dbo].[Migration_NPM_NV_WL_INTERFACES_DETAIL].[FK_NPM_NV_WL_INTERFACES_DETAIL_NPM_NV_WL_APS_DETAIL]

[dbo].[Migration_NPM_NV_WL_CLIENTS_DETAIL].[FK_NPM_NV_WL_CLIENTS_DETAIL_NPM_NV_WL_INTERFACES_DETAIL]

[dbo].[VoipOperationResults_Detail].[FK_VoipOperationResults_Detail_VoipOperationInstanceID]

[dbo].[VoipOperationResults_Detail].[FK_VoipOperationResults_Detail_VoipOperationResultTypeID]

[dbo].[VoipOperationResults_Detail].[FK_VoipOperationResults_Detail_VoipOperationStatusID]

[dbo].[NotificationTypePermissions].[FK_NotificationTypePermissions_NotificationTypeID]

[dbo].[NotificationItems].[FK_NotificationItems_Type]

[dbo].[NotificationMaintenanceRenewals].[FK_NotificationMaintenanceRenewals_RenewalID]

[dbo].[NotificationBlogs].[FK_NotificationBlogs_BlogID]

 

Non trusted FK's make SQL queries take longer time. So I tried to enable them with this query:

ALTERTABLE[NotificationTypePermissions]WITHCHECKCHECKCONSTRAINT[FK_NotificationTypePermissions_NotificationTypeID]


Most of them work but not the above one. Not in prod and not in new installed labb. I get:

The ALTER TABLE statement conflicted with the FOREIGN KEY constraint "FK_NotificationTypePermissions_NotificationTypeID". The conflict occurred in database "Orion", table "dbo.NotificationItemTypes", column 'TypeID'


Same thing at a third installation.


So Solarwinds, what to do with them?


/Thomas


Viewing all articles
Browse latest Browse all 21870

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>