I disconnected two databases from our SQL 7 server, one will reattach without a log file, the other requires that the log file be present for reattach. What is the difference between the two?
I've used sp_detach_db and sp_attach_single_file_db numerous times in SQL 7 without encountering the situation you describe. Please explain what is happening with a little more detail. Do you recieve an error message? What process are you using to disconnect and reattach? Did you delete the LDF file before attempting to reattach? Terry L. Broadbent FAQ183-874 contains tips for posting questions in these forums.
NOTE: Reference to the FAQ is not directed at any individual.
Server: Msg 945, Level 14, State 2, Line 1
Database 'test' cannot be opened because some of the files could not be activated.
Server: Msg 1813, Level 16, State 2, Line 1
Could not open new database 'test'. CREATE DATABASE is aborted.
Is there any additional information in the SQL Error log? Fo example, does the log indicate which file could not be activated?
Did the database have any secondary database (.ndf) files associated with this database? If so, you will need to include those in the attach.
Is the MDF file read-only by chance? That will prevent attaching it. Terry L. Broadbent FAQ183-874 contains tips for posting questions in these forums.
NOTE: Reference to the FAQ is not directed at any individual.
How much space is available on the c: drive? Terry L. Broadbent FAQ183-874 contains tips for posting questions in these forums.
NOTE: Reference to the FAQ is not directed at any individual.
Just checked the space on C: (well actually it was checked for me when the exchange information store refused to start because of lack of disk space) I will try to reattach the db today and let you know.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.