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: .

Come leggere i nomi dei campi di una tabella senza conoscerli! VB6 Spegnere un computer da remoto

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Trackback this post  |  Subscribe to the comments via RSS Feed


Calendar

November 2011
M T W T F S S
« Oct    
 123456
78910111213
14151617181920
21222324252627
282930  

Most Recent Posts


Follow

Get every new post delivered to your Inbox.