Major Problem - lost my whole database



Hi, I need some help.

I've been trying to detach my SQL Server 2005 Express database so as
to attach it to my remote server. This has worked in the past, but I
can't get it to work this time - it attaches to the remote server as
read-only. However, then suddenly it would no longer attach back to
the local server, with a new error message and so I was left with no
database at all! This new error now comes when trying to attach to
either the remote or local server.

Basically somehow, when reattaching, it started taking the wrong paths
from the file - i.e. even though I pressed add and selected the mdf
file, it then put the wrong paths, and so couldn't find the files.
The error message was along the lines of, 'The directory 'C:\etc'
cannot be found'. But then it started working properly again, so I
got my database back.

However, I'm now highly concerned about doing anything, so I have a
couple of questions:

- When I lost the database, I tried to restore a backup I had made,
but I couldn't because the database wasn't present to restore to
(because it was detached). Is there a way to restore a database
without the database being there?

- The original problem I was experiencing was the database attaching
to the remote server as read-only. Any ideas as to why this is? I
tried going into Properties > Options and setting Read-Only to false,
but got the error message, 'Unable to open the physical file 'E:
\etc'.


Option 1: I created a backup of the database called database.bak.
However I can't seem to attach it restore it unless the database is
there to restore it too (which I don't have, as it won't reattach).
Is there a way to do this?

.



Relevant Pages

  • Re: SQL 2000 SP3 DB User Login Name changes
    ... database to a different server. ... I'm not sure why you have different behavior with attach vs. restore. ... > [Notice that the dbo user incorrectly has 'sysdba' as a Login Name after ...
    (microsoft.public.sqlserver.security)
  • attaching content db to managed path
    ... database move it to another server create a new web app and attach it. ... I would like to be able to restore a content database to a path. ...
    (microsoft.public.sharepoint.portalserver)
  • Re: Setting AllowBypassKey Property
    ... As long as I open the DB with shift pressed, the app stays in Design mode. ... "Bob Bonta" wrote: ... not tested on v97 database. ... I don't see an option in this reply form to attach a file ... ...
    (microsoft.public.access.modulesdaovba)
  • Restore from remote tape drive
    ... would someone be able to tell me how I can restore a SQL 2000 ... database from a tape drive that is located on a remote server without ...
    (microsoft.public.sqlserver.server)
  • Re: attempts to attach db are locking up the server...
    ... happening to the database I was trying to attach, ... Rick ... >What do you meant by Locking while attach? ... >> either don't work or end up locking the system. ...
    (microsoft.public.sqlserver.connect)