Re: Restore database

From: Dan Guzman (danguzman_at_nospam-earthlink.net)
Date: 08/20/04


Date: Thu, 19 Aug 2004 21:28:27 -0500

The DISK= keyword is required when restoring from a disk file instead of a
named backup device. Also, the MOVE option is needed if the source database
file names are already in use. The complete syntax is in the Books Online
<tsqlref.chm::/ts_ra-rz_25rm.htm>. Example below.

RESTORE DATABASE MyNwind
FROM DISK='BackupNorthw.bkp'
WITH
MOVE 'Northwind' TO 'C:\MyDbFiles\MyNwind.mdf',
MOVE 'Northwind_Log' TO 'C:\MyDbFiles\MyNwind_Log.ldf',
REPLACE, STATS=10

-- 
Hope this helps.
Dan Guzman
SQL Server MVP
"Tinoco" <hertino_sql@hotmail.com.INVALID> wrote in message
news:95b601c4862f$be97a290$a401280a@phx.gbl...
> Hi.
>
> Use this:
> RESTORE DATABASE MyNwind
>    FROM BackupNorthw.bkp
>
> More information in BOLs.
>
> Hermilson T.
> MCDBA, MCSD
> Colombia
>
> >-----Original Message-----
> >What is the command to restore a database.  I have
> a .bkp file but I don't
> >want to do it through Enterprise Manager.
> >
> >Thanks!
>


Relevant Pages

  • Re: Backend Exchange migrate to New Hardware (Server)
    ... Exchange mailbox stores and Exchange public folder stores. ... When you use Backup to restore Exchange databases, ... Storage Engine to restore Exchange database files and their ...
    (microsoft.public.exchange.setup)
  • Backup and Restore Files
    ... What is the best way to backup and restore a runtime database file? ... pszDisplayName As String ...
    (microsoft.public.access.gettingstarted)
  • Re: PARTIAL SQL Server RESTOREs
    ... DROP DATABASE mywind_part ... ALTER DATABASE mywind ADD FILEGROUP new_customers ... -- A full database backup is performed. ... RESTORE FILELISTONLY lists the database ...
    (microsoft.public.sqlserver.server)
  • RE: Restore public folders and companyweb
    ... > where the backup of the database. ... Before you can start to restore the SharePoint Services databases, ... > Microsoft CSS Online Newsgroup Support ... > This newsgroup only focuses on SBS technical issues. ...
    (microsoft.public.windows.server.sbs)
  • Re: Transaction Log ??
    ... we used to simplify our database restore process: ... every database got their respective backup folder. ... -- get logFileName, FirstLSN, LastLSN list ...
    (microsoft.public.sqlserver.security)