locked
3.0 Database Question RRS feed

  • Question

  •  

    Hello All,

     

    I really hope you can answer my question.  I am currently using CRM 3.0.  A few custom fields but nothing really complicated.  We are preparing to upgrade to 4.0 next week and I would like to do a run through on a test environment first so I'm trying to replicate our Production environment on a test server.

     

    I successful installed the application and had even added a couple of users for good measure in my new test environment.

     

    I wanted to take a copy of my databases in production so I detached the METADATA Database and the MSCRM database and made a copy of them over on my test server.  I then detached the METADATA and MSCRM databases that had been created on my test server, moved them to another file folder and placed my copy of my production databases in their place.  After I attached my copies of my production databases in my test environment, I could no longer access CRM through the web-app.  I started getting authentication errors.  Going back to look at what users I had on my test server now, expecting to have all of the users from my production server, I had NO users at all.  I had even lost the Server Management and User Management items out of my Deployment Manager tree.

     

    I decided to detach the databases that I had copied over from my production server and re-attached the the databases that had originally been created from my creation of my test environment and all is back to normal with the original users I had set up to begin with on the test environment.

     

    It seems this should work but maybe there is a step that I'm missing.  Can someone please help me?

     

    Thanks,

     

    Theresa

    Thursday, May 15, 2008 9:37 PM

Answers

  • Okay after some more research I may have found my problem.  I still don't know how to fix it but maybe there's a SQL Expert who can.  As I stated before when I deleted the main security/login DOMAIN/CRMTEST$ user it deleted the DOMAIN/CRMTEST$ login name from the two CRM DB's.  That statement isn't entirely true.  I did take it out of the login name on the METADATA db but it did not take it out of the login name on the dbo user on on the MSCRM db.  I think there in lies my problem.  I have not yet figured out how to remove this login name from the dbo user on this db but maybe someone out there can help me figure out how.

     

    Thanks,

     

    Friday, May 16, 2008 3:44 PM

All replies

  • The problem is that CRM keeps SID info from AD in the DB and you need to synch this up with your "test" environment. You need to do the following:

     

    - Uninstall CRM from the test server

    - Restore both DBs from production on the test SQL machine (or go back through the attach process you used before)

    - Run the Redeployment Wizrd on the test CRM server.  This will walk you through the steps needed to sync AD with a new test environment

    - install CRM on the test server telling it to use the existing DBs

     

    If you are in a different domain, then you will need enough AD users to match the users from the prod domain during the redeployment.  Also, I recommend creating the test AD groups in a different OU if you are in the same dommain.

     

    Thursday, May 15, 2008 10:23 PM
  • Hi Matt,

     

    Thanks for the help.  This all makes perfect sense.  I'm feeling pretty lame about now as I should have thought of this.  I do have one more question.  I'm having problems finding the Redeployment tool for 3.0.  I found it for 1.0 and 1.2 but I've searched everywhere.  Are the 1.0 and 1.2 tools acceptable or  can you possibly point me in the right direction for the 3.0 tool?

     

    Thanks again,

     

    Theresa

    Friday, May 16, 2008 1:14 PM
  • The redeployment wizard for 3.0 is available on the installation media - we had to find it ourselves, we've found this tool to be pretty invaluable when setting up pre-production environments that are in our development AD domain.
    Friday, May 16, 2008 1:39 PM
  • Thanks I figured that out after a I completed a different search.  Thanks all for your help.  I'm on my way agina.

    Friday, May 16, 2008 1:55 PM
  • I have run into another problem.  I don't know if this problem is created because I had already installed CRM once and had to reinstall or what.  I have made it to re-installing the application and I'm getting an error

     

    Action Microsoft.Crm.Setup.Server.GrantDatabaseAccessAction failed.

    User or role 'DOMAIN\CRMTEST$' already exists in the current database.

     

    I have a feeling this has something to do with the users in SQL but I don't know how to resolve this.  Any more words of wisdom?

     

    Thanks,

     

    Theresa

    Friday, May 16, 2008 2:31 PM
  • Not sure specifically, but check the 2 CRM DB's to see if that user shows up in the User list, but it is not present int he SQL main logins list.  It could be as simple as adding the login yourself manually to the list or removing it from the CRM DBs and letting the isntall clear it up.

    Friday, May 16, 2008 2:34 PM
  • That user shows up in both the CRM DB's for the dbo user and the login name is DOMAIN/CRMTEST$.  It also shows up in the main security/logins screen as DOMAIN/CRMTEST$ as the user.  I can delete from the main security/logins screen and it will remove the login name from  the CRM DB login name but I can not delete the user from the CRM DB's as it says that the user owns objects and therefore can not be deleted.  Our SQL guru is scratching his head on this one too.

     

    Thanks,

     

    Friday, May 16, 2008 3:06 PM
  • Okay after some more research I may have found my problem.  I still don't know how to fix it but maybe there's a SQL Expert who can.  As I stated before when I deleted the main security/login DOMAIN/CRMTEST$ user it deleted the DOMAIN/CRMTEST$ login name from the two CRM DB's.  That statement isn't entirely true.  I did take it out of the login name on the METADATA db but it did not take it out of the login name on the dbo user on on the MSCRM db.  I think there in lies my problem.  I have not yet figured out how to remove this login name from the dbo user on this db but maybe someone out there can help me figure out how.

     

    Thanks,

     

    Friday, May 16, 2008 3:44 PM