Results 1 to 5 of 5
  1. #1
    Join Date
    Apr 2004
    Posts
    69

    Unanswered: Building a database

    I am working with SQL server 2000. The database is installed in my machine. Now I have got the ".ldf" and ".mdf" file pertaining to a database from someother server.

    Is it possible to build the database present in the above said files in my server.

    NOTE : I dont have a direct access to the remote server from where the above said files were obtained (otherwise I think the DTS utility would have come in handy).

  2. #2
    Join Date
    Jul 2003
    Location
    The Dark Planet
    Posts
    1,401
    An example from The Holy book
    This example attaches two files from pubs to the current server.

    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'
    Get yourself a copy of the The Holy Book

    order has no physical Brett in The meaning of a Kaiser . -database data

  3. #3
    Join Date
    Apr 2004
    Posts
    69
    Thanks for the instant help . That worked !

  4. #4
    Join Date
    Apr 2004
    Posts
    69
    BTW, the imported database seems to have a lot of procedures like dt_addtosourcecontrol, dt_adduserobject etc.. what are these for ?

  5. #5
    Join Date
    Feb 2004
    Posts
    492
    You might want to take a peek at Microsoft Knowledge Base Article 218172 when attaching/detaching databases on different servers.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •