Re: Restore database
From: Dan Guzman (danguzman_at_nospam-earthlink.net)
Date: 08/20/04
- Next message: Joe Celko: "Re: Help with constraint"
- Previous message: Partha Mandayam: "Re: SQL Permissions"
- In reply to: Tinoco: "Restore database"
- Messages sorted by: [ date ] [ thread ]
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! >
- Next message: Joe Celko: "Re: Help with constraint"
- Previous message: Partha Mandayam: "Re: SQL Permissions"
- In reply to: Tinoco: "Restore database"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|
|