This is a common need, since you may have initially installed the SpiraTeam database onto the same server and the IIS web server, but now need to move it to a dedicated database server.

To migrate your database, please follow these steps:

  1. First temporarily stop the SpiraTeam application pool in IIS. This will stop users changing the data whilst you are doing the migration.
  2. Next backup the live data on your current SpiraTeam database via SQL Server Management Studio (click on Tasks > Backup Database). Copy this .BAK file to your new database server.
  3. Now restore the backup from the backup .BAK file onto the new database server with the same database name that it had before (e.g. SpiraTeam).
  4. Next run the following SQL command to relink the SpiraTest SQL Server login with the SQL Server user (otherwise the DB will throw an error):                            
  1. Using SQL Server Authentication
    USE SpiraTeam
    GO
    EXEC sp_change_users_login 'Update_One', 'SpiraTeam', 'SpiraTeam'
    GO
  2. Using Windows Authentication on Windows 2003/2008/Vista/7
    USE SpiraTeam
    GO
    ALTER USER SpiraTeam WITH LOGIN = [NT AUTHORITY\NETWORK SERVICE]
    GO
  3. Using Windows Authentication on Windows XP
    USE SpiraTeam
    GO
    ALTER USER SpiraTeam WITH LOGIN = [MACHINENAME\ASPNET]
    GO

5. Once you have relinked the logins, open up the Web.Config file on the SpiraTeam web service (usually in C:\Program Files\SpiraTeam folder) and change the database server name in the following section:

 <connectionStrings>
  <add name="SpiraTestEntities" connectionString="metadata=res://DataModel/SpiraDataModel.csdl|res://DataModel/SpiraDataModel.ssdl|res://DataModel/SpiraDataModel.msl;provider=System.Data.SqlClient;provider connection string=&quot;data source=SERVERNAME\INSTANCENAME;initial catalog=SpiraTeam;integrated security=True;multipleactiveresultsets=True;App=EntityFramework;Connection Timeout=30&quot;" providerName="System.Data.EntityClient" />
 </connectionStrings>

6. One that is done, start the SpiraTeam application pool in IIS

You should now be able to access the system with the new database server