Skip to main content

I have a couple of sites that are not displaying correctly on the 'View Database Mappings' page. They are showing the old mappings. They are showing correctly on the 'Nintex Workflow Database Setup' and on the 'Manage Database Mappings' screens. One of the sites was changed a year ago and the other one yesterday. They were set to use the new BD by setting the new mapping on the 'Manage Database Mappings' page.

I ran queries on the Nintex DB setup yesterday and there's nothing there so it's clearly not being used.

I also ran queries against the Nintex DB mapped a year ago and that one too has no records so it is still using the old database.

Any idea why this might not take hold and how I can resolve it?

Perhaps my question has the same answer as your question: in my farm deleted sites are not cleaned up from the `View database mappings' page. I removed workflow data before removing the sites. I also tried deactivating the Nintex features, but the site is still shown on the View database mappings site.

I still see the workflows from the deleted sites in the table dbo.PublishedWorkflows, but the tables dbo.ContentDBMapping, dbo.NWL_Sitemapping do not contain a reference do these deleted sites. Purging the site from SPDeletedSites does not help.


I'm not sure why you are seeing these mappings after removing the old site, It could be the steps you took to deactivate the sites or it could be that Nintex doesn't have a way to do this in the event that the sit is removed.

In my development site, and occasionally in QA or Production environments, I have the need to manually remove Nintex mappings. I have not had any negative impacts from this. I have a 1 to 1 mapping of site collections to Content databases and each site has their own Nintex DB as well. So your queries may not be the same.

I first delete the site in Central Admin, then in Manage Content Databases I remove the DB from the web app (dismounting it).

Then I open sql server manager studio and run the following  query, taking the databaseID from the Database table and running the delete commands on those entries in all 3 tables. After removing the mappings I delete the databases from SQL Server.

/****** You must be absolutely certain that the ID is the correct one or you'll need to restore from backups******/

use Nintex_Config

SELECT * FROM Nintex_Config].>dbo].>Storage] order by DatabaseID desc

SELECT * FROM Nintex_Config].>dbo].>ContentDbMapping] order by NWContentDbId desc

SELECT * FROM Nintex_Config].>dbo].>Databases] order by DatabaseID desc

 

/*

You best be sure this is right. This is the DatabaseID from the Databases table

Declare @DBID INT = 155

delete from rNintex_Config].idbo].bDatabases] where DatabaseID = @DBID

delete from rNintex_Config].idbo].storage where DataBaseID = @DBID

delete from rNintex_Config].idbo].bContentDbMapping] where NWContentDbId = @DBID

*/

 


Reply