Friday, October 8, 2010

Database Restore and Backup using Queries

backup database bnsdavgps to disk = 'D:\MS SQL Databases\Data\bnsdavgps.bak'

RESTORE FILELISTONLY FROM DISK = 'D:\MS SQL Databases\Data\bnsdavgps.bak'
--GpsMelissaDPS
--GpsMelissaDPS_log

RESTORE DATABASE BNSDAVGPSNew FROM DISK = 'D:\MS SQL Databases\Data\bnsdavgps.bak'
WITH REPLACE, File=1, Norecovery,
MOVE 'GpsMelissaDPS' TO 'D:\MS SQL Databases\Data\bnsdavgpsnew.mdf',
MOVE 'GpsMelissaDPS_log' TO 'D:\MS SQL Databases\Data\bnsdavgpsnew_log.ldf'

No comments:

Post a Comment

How to check local and global angular versions

 Use the command ng version (or ng v ) to find the version of Angular CLI in the current folder. Run it outside of the Angular project, to f...