Not applicable

NWAdmin.exe Detach Database

Hi,

 

I am in the process of migrating a SharePoint 2010 farm to SharePoint 2013. The SharePoint 2010 farm has Nintex installed and there are various workflows setup.

 

I have read the NW2010 - 2013 Upgrade Guide it provides very detailed steps, however I am unsure about one of these. In the section marked 'Attaching Nintex Workflow Content Databases' point 2C says to run command 'NWAdmin.exe –o DetachDatabase –serverName <myservername> -databaseName <mydatabasename>'

 

Can you confirm exactly what this does?

 

The reason I ask is in my situation I have a test box which I am going to perform trial migrations on and as part of this I have a copy of the production databases. I don't want to run this command on the production 2010 environment in case this stops the workflows on the SP 2010 environment. I don't want to migrate production until I have run some test migrations first but in order to do this I need to migrate the workflow content.

 

I hope this makes sense.

 

Cheers,

 

Ray

0 Kudos
Reply
4 Replies
Not applicable

Re: NWAdmin.exe Detach Database

The detach command moves some information related to Nintex Live around in the database to prepare it for migration since you can only have one Nintex Live ID per farm. The step after running the detach command, and backing up/restoring the DBs in the guide asks you to execute a stored procedure (EXEC dbo._PrepareForNewEnvironment). This SP will remove all of the live information as well as any database mappings that existed in the "original farm" to allow you to attach it into the new farm. As long as you run this SP after attaching on the target environment SQL server and before attaching in Central Admin, everything should continue to run as expected.   Please let us know if this helps and if you have any other questions.

0 Kudos
Reply
Not applicable

Re: NWAdmin.exe Detach Database

Hi,

Thanks for getting back to me.

Unfortunately I'm still a little unsure over the exact steps needed here. According the the Nintex document I have, NW2010 - 2013 Upgrade Guide.pdf, the steps are:

  • In the old SP 2010 farm you
    • stop timer service
    • run DetechDatabase
    • backup DB
    • start timer service
  • In the new farm you:
    • restore DB
    • run AttachDatabase

In the document I have there is no mention of executing any stored procedures.

I don't think my client is using Nintex live, although I'm not 100% sure, so does this mean I can just backup the SQL db?

Cheers,

Ray

0 Kudos
Reply
leebrandt
Design Dabbler

Re: NWAdmin.exe Detach Database

Have you made progress with your migration?

The instruction says (page 5)

in SharePoint 2010

1. Stop the "Windows SharePoint Services Timer" service

2. Run NWAdmin.exe -o DetachDatabase

3. Backup the DB

4 Start the  "Windows SharePoint Services Timer" service

in SharePoint 2013

5. Restore the DB

6. Execute "_PrepareForNewEnvironment" stored procedure

7. ..connect to the configuration database

0 Kudos
Reply
Not applicable

Re: NWAdmin.exe Detach Database

This absolutely doesn't answer the question asked - I have the same scenario - I need to restore the Nintex DBs to a TEST environment first, but according to your documentation, the detach command wipes certain things from the CURRENT LIVE environment. Also what happens if I need to roll back if the deploy fails?

What are the implications of running Run NWAdmin.exe -o DetachDatabase on the CURRENT environment? How do I make sure the CURRENT environment continues to run after running that command? Do I need to re-attach the DB? Will I lose data / status of workflows in progress?

Thanks.

0 Kudos
Reply