locked
Problem in accessing SQL Server database copied to another computer RRS feed

  • Question

  • I need to format my laptop so I copied my sql server 2005 database to another computer but I can't access it anymore thru ODBC and sql server 2005 installed in another laptop.  Using Vista, sql server 2005 and visual studio 2008.
    Wednesday, August 4, 2010 7:07 AM

Answers

  • Simply copying the database files  will not  work. You will have to detach from old computer and reattach mdf and ldf on the new machine.

    Or you can use backup and restore

    for more info...

    How to move SQL Server databases to a new location by using Detach and Attach functions in SQL Server

    http://support.microsoft.com/kb/224071


    How to move databases between computers that are running SQL Server
    http://support.microsoft.com/kb/314546

    • Marked as answer by mosingson Thursday, August 5, 2010 1:38 AM
    Wednesday, August 4, 2010 1:13 PM

All replies

  • What is the error message that you get? Is the firewall open for the SQL Server port?
    Pradeep Adiga
    My blog: http://www.sqldbadiaries.com
    Wednesday, August 4, 2010 8:09 AM
  • HI,

      Do you mean the firewall of Windows Security.  I turned it off.  Using DSN and Sql Server as driver,  at the change the default database to ... only the master, mmodel, msdb, and tempdb are the options.  All my other databases are missing (ex. PROPERTY.mdf) even though they are under the same folder (which is data under MSSQL).  In my original laptop, my other databases are included in the options.

    Mo

    Wednesday, August 4, 2010 1:06 PM
  • Simply copying the database files  will not  work. You will have to detach from old computer and reattach mdf and ldf on the new machine.

    Or you can use backup and restore

    for more info...

    How to move SQL Server databases to a new location by using Detach and Attach functions in SQL Server

    http://support.microsoft.com/kb/224071


    How to move databases between computers that are running SQL Server
    http://support.microsoft.com/kb/314546

    • Marked as answer by mosingson Thursday, August 5, 2010 1:38 AM
    Wednesday, August 4, 2010 1:13 PM
  • Hi Chirag Shah,

    Thanks.  That should settle it.  Could you help me though simply how to copy using backup and restore or other methods from one stand alone computer to another since I'm at programming stage only. It's kinda complicated reading all the instructions from microsoft support.  Mo

    Thursday, August 5, 2010 1:42 AM