General information
Forum:
Microsoft SQL Server
Title:
Attaching a non detached database
Hi!, I have this little situation:
I have a 6GB database with no indexes, in order to index the main tables I've executed some commands and left the PC working in the night.
This mourning I noticed that the proccess after 7 hrs raised an error about full disk space but the job where still working.
I couldn't cancel the process and I needed the space, so I tried to restart my computer, detach the db, delete the log file and then attach the db so I could save the log space and try another way to index the table.
That didn't work. Even when I restarted the computer the database was in use by the system user not "sa".
Because I needed the space available for another work, I stopped the sqlserver service, deleted manualy from the disk the log file and continued my work.
Later in this afternoon I tried to attach the db and now I recieve the error 5173, "Cannot associate files with different databases".
I searched the books online and I read that It's not possible to attach a Db if the database were not dettached by sp_dettach_db.
I really need that database but now I don't have the original log file.
1. What can I do now to solve my problem?.
2. What should I've done in the first place?.
Thanks In Advance!!
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only