How to attach a database in SQL Server

Overview

Migration of TopTeam Application Server from one one computer to another computer is possible. When TopTeam SQL Application Server is moved from one computer to another along with its database attached to a SQL Server, TopTeam Application Database needs to be detached. After detaching TopTeam Application Server Database, it should again be attached to Microsoft SQL Server.
This activity gives you flexibility and mobility to move from one machine to another.

This article describes how to attach a database in SQL Server.

Who should read this?

  • TopTeam Administrators
  • Database Administrators
  • IT Support

Preparations

  1. Connect to Microsoft SQL Server using Management Studio having administrative access.
  2. Locate the name of TopTeam Database from TopTeam Application for SQL Server.

Step 1. Connect to Microsoft SQL Server

wpid32123-media_1261664429708.png

Connect to Microsoft SQL Server having administrative rights.
Default Username for Microsoft SQL Server: sa
Default Password for Microsoft SQL Server: manager

Once you are logged into Microsoft SQL Server, locate the database header in the Object Explorer window.
Right-click the Database header. From the context menu, select the Attach option.

Step 2. Locate TopTeam Database

wpid32125-media_1261668452441.png

The Attach option displays the Locate Database Fileswindow. It allows selection of the desired database.
Default extension of the database is .MDF.
Select desired database .MDF file.

The Databases to attach: window displays that lets you rename the database which is being attached to Microsoft SQL Server.

Step 3. Rename the database

wpid32124-media_1261666628125.png

By default, the database is attached as <<database file name>>. In case of existence of the same database name, the database can be renamed and attached.
It is mandatory to attach the database files (.MDF and .LDF) in order to access them using SQL Server.

For attaching additional databases, repeat the steps above.

Revised: May 24th, 2018