sql backup & restore database to a different db
November 9, 2011 at 3:37 pm Leave a comment
to backup “testdb1″ db:
backup database testdb1 to disk='c:\bck1'
go
to restore filelist from backup file:
restore filelistonly from disk='c:\bck1''
go
the operation returns the filelist:
testdb1
testdb1_log
to restore db to testdb2
restore database prova3 from disk='c:\bck1'
with recovery,
move 'testdb1' to 'c:\destination\testdb2dat.mdf',
move 'testdb1_log' to 'c:\destionation\testdb2log.ldf'
go
Entry filed under: SQL, VB6. Tags: VB6; Database;.
Trackback this post | Subscribe to the comments via RSS Feed