Share this topic on FacebookShare this topic on MySpaceShare this topic on Del.icio.usShare this topic on DiggShare this topic on StumbleUponShare this topic on TwitterShare this topic on GoogleShare this topic on Yahoo

Author Topic: Backup dan Restore data SQL pakai VFP  (Read 3449 times)

0 Members and 1 Guest are viewing this topic.

Offline Jamax JMX

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 0
  • Posts: 10
  • I'm sorry.......
    • Naruto on Bleach
Re: Backup dan Restore data SQL pakai VFP
« Reply #15 on: February 09, 2010, 02:01:20 AM »
Coba km liat di F1  :icon_study:  :icon_study:
Quote
USE master
EXEC sp_addumpdevice 'disk', 'MyNwind_1',
   DISK ='c:\Program Files\Microsoft SQL Server\MSSQL\BACKUP\MyNwind_1.dat'

-- Back up the full MyNwind database.
BACKUP DATABASE MyNwind TO MyNwind_1


atau bisa juga langsung

Quote
BACKUP DATABASE MyNwind  TO DISK = 'c:\Program Files\Microsoft SQL Server\MSSQL\BACKUP\MyNwind_1.dat'


Kalo Restore

Quote
RESTORE DATABASE MyNwind  FROM DISK = 'c:\Program Files\Microsoft SQL Server\MSSQL\BACKUP\MyNwind_1.dat'




Mas,,Sintak Backupnya dah bisa. Saya seperti ini :

cek="BACKUP DATABASE dbkoperasi TO DISK = 'c:\Program Files\Microsoft SQL Server\MSSQL\BACKUP\dbkoperasi_1.dat'"
If SQLExec(ckonek,cek,'backup')>0
   Messagebox("BACKUP DATABASE BERHASIL",64,"SUKSES")
Else
   Messagebox("BACKUP DATABASE GAGAL",64,"GAGAL")
Endif
Sudah berhasil...

Cuma Restorenya kok g bisa yach..
Seperti ini :
cek="RESTORE DATABASE dbkoperasi  FROM DISK = 'c:\Program Files\Microsoft SQL Server\MSSQL\BACKUP\dbkoperasi_1.dat'"
If SQLExec(ckonek,cek,'backup1')>0
   Messagebox("RESTORE DATABASE BERHASIL",64,"SUKSES")
Else
   Messagebox("RESTORE DATABASE GAGAL",64,"GAGAL")
Endif

Gagal terus..
Kondisinya mesti gimana ya Mas??? Mohon bimbingannya ???
« Last Edit: February 09, 2010, 02:10:09 AM by Jamax JMX »