Information générale
Forum:
Microsoft SQL Server
Titre:
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!!
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement