Results 1 to 5 of 5
  1. #1
    Join Date
    Nov 2003
    Location
    FRANCE
    Posts
    393

    Unanswered: Attaching-detaching Db = Too long

    Why does it take time to detach or attach a Db sometimes ?

  2. #2
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322
    Karolyn,

    It shouldn't. It's the fastest method.

    The file shoud however be on the local machine, not acorss the network..

    How big are we talking?
    Brett
    8-)

    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

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

  3. #3
    Join Date
    Jan 2003
    Location
    Massachusetts
    Posts
    5,799
    Provided Answers: 11
    It could be the database is going into recovery. Anything showing up in the SQL Errorlog?

  4. #4
    Join Date
    Feb 2004
    Posts
    492
    when detaching a database sqlserver checks if there are changes suchs as updates and inserts that were processed but has not (yet) actually done. The changes reside in memory of sqlserver but were not written to the disk. So I think it does these first prior detaching.

  5. #5
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    Detaching can take a while, because of the need to "flush the log", etc. It seems to me that the GUI provides a checkbox to skip that step, but that is needless risk from my perspective.

    I can't think of a reason that attaching a database would take more than a minute or so (basically modify a few system tables, then go through the normal database recovery/startup that happens whenever a database is first opened).

    -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
  •