Wednesday, March 7, 2012

HELP - problem after copying MDF and Log files

I had a problem where a log file was deleted. I managed to get the databas
e
recovered on my own machine. I sent the MDF and Log files to the client so
he could stop SQL Server, copy the files and then start SQL Server again.
Now I can't get into SQL Server at all - it keeps telling me SQL Server doe
s
not exist or access denied. I tried to delete the files that I copied (afte
r
shutting down SQL Server) but it didn't work - on startup I still can't
access the SQL Server with any of the client tools. HELP!Which database was the log lost for? As long as it was not master or model
you may be able to use sp_attach_single_file_db.
Check if SQL Server is running.
If you did it to master or model, you have messed up the server.
Regards
--
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
IM: mike@.epprecht.net
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"claire" <claire@.discussions.microsoft.com> wrote in message
news:AE9EC5D3-724A-4480-8367-D85855839152@.microsoft.com...
> I had a problem where a log file was deleted. I managed to get the
database
> recovered on my own machine. I sent the MDF and Log files to the client
so
> he could stop SQL Server, copy the files and then start SQL Server again.
> Now I can't get into SQL Server at all - it keeps telling me SQL Server
does
> not exist or access denied. I tried to delete the files that I copied
(after
> shutting down SQL Server) but it didn't work - on startup I still can't
> access the SQL Server with any of the client tools. HELP!
>|||Stopping the server, copying the files then starting was probably not a good
idea.
If you had the database on your machine then sending a backup and gettig the
client to restore would have been a better option.
Check the sql server logs and application logs - you will probably see a
message to say what has happenned. It sounds like he has corrupted master,
model or done something to change the path of the system databases.
This is probably recoverable but you might be better off re-installing sql
server and attaching all the databases (try ttaching on another server first
to check integrity).
You then might want to look at your backup strategy in case this happens
again.

No comments:

Post a Comment