Attaching LDF and MDF files, and usersnames

  • Hi, I need to attacha single LDF and a single MDF file to SQL Server 2000 MDSE, that used to run on Windows 2000 Advance Server (Motherboard died) to a single PC (different motherboard) running the same SQL Server 2000 MDSE, and I have the original Hard drive and backup copies of the LDF and MDF files. 

    Can anyone walk me thru this, please.  I am new to SQL Server, and don't even know if I am supposed to put the SQL commands to attach DB in a file or what.  LOL.  Sorry.

    I also need to make sure all the previous users can log in at this stand alone PC.

    Thank you, your patience is greatly appreciated.

  • Hi
    This is the sql command for attach the database..
    EXEC sp_attach_db @dbname = N'pubs',    @filename1 = N'c:\Program Files\Microsoft SQL Server\MSSQL\Data\pubs.mdf',    @filename2 = N'c:\Program Files\Microsoft SQL Server\MSSQL\Data\pubs_log.ldf'
    Explaination
    pubs : database name , change it to your database name
    @filename1 : mdf file physical path, give exact physical path of the mdf file
    @filename2 : ldf file physical path, give exact physical path of the mdf file
     
     

    With Regards
    MeenakshiSundaram Lakshmanan

  • For detailed information refer to http://support.microsoft.com/?id=314546

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply