2

I am trying to refresh my dev farm content database with a copy of the production farm content database, but I have been unsuccessful so far.

I used the following procedure:

1) stopped the sharepoint timer service.

2) selected the dev content database | tasks | restore database and selected the backup file of the production database.

3) modified the "restore As" to represent the dev mdf and log file names. (see picture below)

4) the restore was completed successful within the sql manamegement studio.

5) modified the logical name to represent the dev content databse.

I then tried to open the web application, but after a prompt for credentials the access fails. I was wondering if this is an access issue such the web app pool account not having the right permissions or I am doing something else wrong.

enter image description here

1
  • 1
    You have to make sure the Farm admin Account and App Pool Account have DBO rights on this restored dev db....also share the error
    – Waqas Sarwar MVP
    Dec 10, 2014 at 21:07

2 Answers 2

2

As you are restoring a DB backup from a different farm (PROD to DEV), I believe you should dismount the DB (using Central Administration UI or PowerShell commandlet Dismount-SPContentDatabase) before restoring a content database, and then re-mount after restore. This takes care of the synchronization with the configuration database and also lets you specify the correct database credentials.

Mounting the database using Mount-SPContentDatabase will also output any errors it comes across, which may help debugging the issue.

Another thing to check if this doesn't work: are the prod and dev environments running exactly the same version of SharePoint?

1
  • That did the trick. only after following your instruction of dismounting that database through CA, and mounting it with powershell, I was able to access the restored content databse in the DEV environment. clear instructions @anderaus Dec 19, 2014 at 9:40
0

According to the information you provided, two things make sure.

  • Farm Account and App Pool Account should Have the DBO rights on the restored DB.
  • DB is not offline.

Also if their is any error share with us.

6
  • when you say app pool account? is that the WEB app pool account? Dec 10, 2014 at 21:44
  • correct, the account running the app pool of web app.
    – Waqas Sarwar MVP
    Dec 10, 2014 at 21:47
  • Did you mount DB in dev farm? If not you should use this cmdlet Mount-SPContentDatabase "My DB" -DatabaseServer "SP Server" -WebApplication http://...
    – Wilon
    Dec 10, 2014 at 22:00
  • The db is already mounted in central admin, so the powershell is not needed. This is just a refresh of the content database. Dec 12, 2014 at 18:48
  • @Waqas Sarwar , Even after adding both the farm account and web app pool account, i still cannot access the web application. I am wondering if the restored production DB is expecting the same hostname of the web application it was running, i.e production.oursharepoint.com? My dev web application is dev.oursharepoint.com Dec 12, 2014 at 18:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.