Try Now
More in this section

Forums / General Discussions / Replication


2 posts, 0 answered
  1. Erik
    Erik avatar
    34 posts
    06 Dec 2007
    10 Apr 2008
    Link to this post
    Can somebody give me some advice/help on how they typically setup a replicate site for testing purposes?  Right now I'm actually running a copy of my entire site on my local Win XP machine with my live site running on Win 2003 Server and SQL Express.

    My main problem is updating database changes on the server down to my local dev machine.  When I'm on the server I go into Management Studio, but it seems like everytime I open it up I can't connect to my database.  It gives an error saying "process cannot access the file because it is being used by another process".  I know what you're thinking: shut down IIS.  Well, I tried that; I even tried shutting down both IIS and SQLExpress and it still won't let me access the database.

    I don't want to have to reboot the server just so I can download my DB or even to do a backup of it.  The problem is when I actually get my database attached in Management Studio, the next time I come into it I get that error mentioned above, so basically I can't do anything.

    Some help would be really appreciated, this is terribly frustrating.

  2. Vlad
    Vlad avatar
    498 posts
    15 Jul 2016
    14 Apr 2008
    Link to this post
    Hi Erik,

    As you said, your database is attached to the SQL Server. Therefore, you are getting "process cannot access the file because it is being used by another process" because it is used by SQL Server. So, stopping IIS won't help.

    We can give you the following suggestions:
    1. In case you want to replicate an attached database, you should better use the SQL Server Replication tool or SQL Server Database Publishing Wizard
    2. In case you want to replicate the database just by replacing the .MDF file, you should detach it from the SQL Server first. Then, you could change the connection string in the web.config file specifying the path to the .MDF file (SQL Express connection string).
    Probably, you could find other solutions and tools for database replications in the Internet.

    Kind regards,
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
2 posts, 0 answered