PVP SERVERLER FORUM
Would you like to react to this message? Create an account in a few clicks or log in to continue.
PVP SERVERLER FORUM

You are not connected. Please login or register

DB YEDEKLEMEK İÇİN------Qa Kodu.....

Go down  Message [Page 1 of 1]

1hot DB YEDEKLEMEK İÇİN------Qa Kodu..... Mon Apr 19, 2010 10:35 am

VulpinEMarteN

VulpinEMarteN
Üye
Üye

declare @location varchar(120)

set @location = N'c:\KoDB\Gokhantasci-'+replace(str(year(getdate()))+'-'+str(month(getdate()))+'-'+str(day(getdate())),' ', '')+'.bak'

BACKUP DATABASE [Kn_Online] TO DISK = @location WITH NOFORMAT, INIT, NAME = N'KO-Full Database Backup', SKIP, NOREWIND, NOUNLOAD, STATS = 10

declare @backupSetId as int

select
@backupSetId = position from msdb..backupset where database_name=N'Kn_Online' and backup_set_id=(select max(backup_set_id) from msdb..backupset where database_name=N'Kn_Online' )

if @
backupSetId is null begin raiserror(N'Verify failed. Backup information for database ''Kn_Online'' not found.', 16, 1) end

RESTORE VERIFYONLY FROM DISK
= @location WITH FILE = @backupSetId, NOUNLOAD, NOREWIND

GO


(Bu Kodu Kopyalamadan Önce C: Klasöründe KODB Adlı Klasör Oluşturun
Oraya DB’Yi Oraya Kopyalıyacak)

Back to top  Message [Page 1 of 1]

Permissions in this forum:
You cannot reply to topics in this forum