CFF KB - Carrz-Fox-Fire Promotions Knowledge Base

CFF KB is all about 1 thing: The Sharing of Knowledge and the Power we gain from it.
  • Breadrumbs:
  • Detach and Attach Database in SQL Server 2005

  • CFF Knowledge Base - Share With Facebook CFF Knowledge Base - Share on Twitter CFF Knowledge Base - Share on Reddit CFF Knowledge Base - Share on Digg It CFF Knowledge Base - Share on Stumble Upon It CFF Knowledge Base - Share on Delicious
    Share With Friends (Updated 6-8-2010)
  • Article ID:
    16
  • Date Created
    Thursday, September 30, 2010
  • Last Updated
    Wednesday, June 20, 2012
  • This Article Has been Viewed
    1676 times
  • Short Desc
    If you find yourself is a situation where you have to do an emergency reinstall of your SQL Server and was unable to back up your database, this article can help you.
  • Details
    Sometimes we are faced with massive problems that cause us to have to reinstall our servers without possible backup of our data. Now, if this does happen to you and you are among the fortunate ones that have their databases stored on a separate hard drive or partition, and you do have your database on your C:\ drive, then I suggest that you DO NOT reinstall your system until you safely backup your data store.
    For all others, please read on to the next step.
  • Recreate Issue
    This article is about attaching a database .mdf file to your SQL Server Management Studio. The recreation of this would be to reinstall sql server without first doing a backup, which happens more often than one might thing.
  • Resolve Issue
    Once you have your SQL Server installed, open the SQL Server Management studio and perform the following actions.

    Expand your [server name]
    Expand the [Database] node
    Right click on the[database] node and choose: Attach
    When the dialog opens, click [Add]
    When the [Locate Database Files] dialog opens
    Click on the drive tree to locate your SQL Server Data Store folder.
    (Example of folder location will be)
    O:\Microsoft SQL Server\MSSQL.1\MSSQL\Data

    Once you have located the drive with your data, choose the file.mdf and click [OK]
    Click [OK] on the [Attach Database] window
    You database should now be located in the Database tree node on the left of the Management Studio and ready for you to start working with it just like you was before.


    --------
    Related Articles

    Backing up SQL Server Data Store from a drive before reinstall«