Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2005
    Location
    SW England
    Posts
    102

    Unanswered: opening my client's DB locally

    My client has given me a DB file (.MDF) and I need to open it in order to export it to the remote DB.
    In Enterprise Manager I go to 'New Database' - create a new DB and click on the 'Data' tab to browse to my clients file. Enterprise Manager recognises the file and everything seems hunky dory. but the resulting DB seems to have no tables.
    The DB file is 1600K and has some stored procedures but if I try to export the tables there is nothing. His ASP files refer to tables in the SQL as you would expect.
    Am I missing something? it's the weekend so he is not available and I don't want to look tooo stupid!

  2. #2
    Join Date
    Nov 2004
    Location
    on the wrong server
    Posts
    8,835
    Provided Answers: 6
    look sp_attach_single_file_db up in sql server books online.
    “If one brings so much courage to this world the world has to kill them or break them, so of course it kills them. The world breaks every one and afterward many are strong at the broken places. But those that will not break it kills. It kills the very good and the very gentle and the very brave impartially. If you are none of these you can be sure it will kill you too but there will be no special hurry.” Earnest Hemingway, A Farewell To Arms.

  3. #3
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    Quote Originally Posted by darkmunk
    Am I missing something? it's the weekend so he is not available and I don't want to look tooo stupid!
    It is always good to not look too stupid to a client... That kinda throws them off their feed for a bit.

    As Thrasymachus pointed out, you could use sp_attach_single_file_db, but carefully read the restrictions caused by not having the log file... Under certain circumstances, that can be a major problem.

    -PatP

Posting Permissions

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