Creating a copy of the Live MOSS 2007 to a test server RRS feed

  • Question

  • Hi,

    Our company wanted to install a test server.

    So what we have done is that we have created a test environment and installed SQL Server, Sharepoint 2007 Server etc... I have also created a web application under the Application Management option and a site collection for that. It does display the page for me.

    Now here comes the difficult part for me, I need to copy the databases from the live server to the test server. it gives me the following errors at different times

    1. Unexpected end of file has occurred. The following elements are not closed: AlternateDomain, AlternateDomains. Line 25, position 1

    2. Attaching this database requires upgrade, which could time out the browser session.  You must use the STSADM command 'addcontentdb' to attach this database.

    For the first error, when i get back to the content database option of the Application Management, i see that the database was added, but then I was wondering why did I get the error.

    For the second error I got to know that I have to use stsadm to get it attached. But no answer to that since it does not add in the list.

    I know that I'm making a mistake somewhere, but cannot find it.

    Please let me know if there are any questions. Thanks for any help




    • Edited by Mike Walsh FIN Wednesday, May 4, 2011 8:52 AM The completely different question starting with "Secondly" removed. Post one question per thread so post this in its own thread with its own Title (Also Time pressure removed.)
    Wednesday, May 4, 2011 8:07 AM

All replies

  • Hi Leroy,

    You can try the STSADM backup and restore operation using the link below.

    Please create the site collection first and then use the restore operation.



    Chirag Patel, MCTS
    • Marked as answer by David HM Thursday, May 12, 2011 1:13 AM
    • Unmarked as answer by Mr Mascarenhas Tuesday, May 31, 2011 6:36 AM
    Wednesday, May 4, 2011 10:58 AM
  • Nope its still giving me a lot of errors.

    If you have a step by step copying including the webparts etc...


    Leroy M

    Tuesday, May 31, 2011 6:37 AM
  • Use OSQL to BACKUP and RESTORE the DATABASE to the new server.



    OSQL.EXE -E -S <SQL SERVER> -Q "RESTORE DATABASE <DATABASE NAME> FROM DISK='C:\Backups\SQLServer\<BACKUP FILE NAME>.bak' WITH MOVE '<DATABASE NAME>' TO 'C:\Program Files (x86)\Microsoft SQL Server\MSSQL.1\MSSQL\Data\<DATABASE NAME>.mdf', MOVE '<DATABASE NAME>_log' TO 'C:\Program Files (x86)\Microsoft SQL Server\MSSQL.1\MSSQL\Data\<DATABASE NAME>_log.ldf'"

    After you restore the database to the new server use SharePoint Central Administration to connect the content database (make sure you remove the link to the old content database prior to connecting the new one)

    Moderator Note: NEVER propose your own posts as answers. The function is there for people to proposed the good answers of other people. Not for self-proposing,
    • Proposed as answer by Brian T. Shell Wednesday, June 1, 2011 11:52 PM
    • Unproposed as answer by Mike Walsh FIN Thursday, June 2, 2011 5:52 AM
    • Edited by Mike Walsh FIN Thursday, June 2, 2011 5:53 AM Moderator Note added about not proposing own posts as answers.
    • Marked as answer by Emir Liu Friday, June 3, 2011 11:41 AM
    • Unmarked as answer by Emir Liu Friday, June 3, 2011 11:41 AM
    Wednesday, June 1, 2011 8:56 PM
  • understood
    Thursday, June 2, 2011 6:26 AM
  • Yes, will try that and reply
    • Marked as answer by Mr Mascarenhas Wednesday, March 13, 2013 8:17 AM
    • Unmarked as answer by Mr Mascarenhas Wednesday, March 13, 2013 8:17 AM
    Thursday, June 2, 2011 1:45 PM