Re: Urgent - Unable to restore/attach a MDF file

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Hari Prasad (hari_prasad_k_at_hotmail.com)
Date: 07/07/04


Date: Wed, 7 Jul 2004 11:27:49 +0530

Hi,

This restore error might be because:-

1. Mentioning wrong location or file name
2. Do not have previlage to read the backup file.
3. Might be reading the backup file from remote machine in which SQL Server
startup
    account do not have access.

So check the SQL Server Startup account. If the user has got access to the
the file / folder then login to
query analyzer as SA and execute:-

RESTORE DATABASE <dbname> from disk='c:\backup\dbname.bak'

(Use Move option if required - refer books online for more information)

Attach with single MDF file

Refer sp_attach_single_file_db in books online

--
Thanks
Hari
MCDBA
"Learner" <wantnospam@email.com> wrote in message
news:MPG.1b55e0c2c1107e8c989746@msnews.microsoft.com...
> Hi,
>
> I was having problems on my PC so i did a fresh installation. However I
> had backed up my SQL database (I only have the MDF file and not the log
> file).
>
> I have tried restoring and attaching options but nothing works :(
>
> I also get the error saying
>
> "Can not open backup device.... Device error or device off-line. See the
> SQL server error log for more details. RESTORE database is terminating
> abnormally".
>
> Please this is urgent. Will be VERY grateful for your urgent reply.
>
>
> --
> Thanks.


Relevant Pages

  • Re: sql developer needing advice from sql server (6.5) admin guys
    ... Restore was no trivial process in the old architecture. ... are that you first need to create the database, ... Tibor Karaszi, SQL Server MVP ... When I look into the backup file the first word is 'TAPE' then the ...
    (microsoft.public.sqlserver.server)
  • Re: I couldnt restore the bak file
    ... you can't restore a SQL Server 2005 backup file to a SQL Server 2000 Instance so ensure that the backup file is backed up from a SQL Server 2000 Instance. ... I could not restore the bak file to sql server 2000. ...
    (microsoft.public.sqlserver.tools)
  • How to restore backupfile from ASP.
    ... i want to restore SQL Server 2000 database backup file ... using ASP.I have some code to restore backup file but it ...
    (microsoft.public.dotnet.languages.vb)
  • Re: sql server 2000 backup and restore
    ... >> - A full backup is done nightly at 10PM. ... >> - log files are copied to the backup file hourly ... >> I use Enterprise Manager to restore a backup manually. ... >>> a sql server 2000 database. ...
    (microsoft.public.sqlserver.setup)
  • Re: Backing Up WSS
    ... Backup and Restore Options for Windows SharePoint Services ... ·Use the Microsoft SQL Server 2000 tools to back up the databases. ...
    (microsoft.public.sharepoint.portalserver)