Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

Procedure: BackupDB

Experienced Elementalist
Joined
Dec 7, 2006
Messages
250
Reaction score
2
here ya go:

Code:
USE [KN_online]
GO
/****** Object:  StoredProcedure [dbo].[BackupDB]    Script Date: 08/18/2008 09:47:26 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [dbo].[BackupDB]
as
declare @location varchar(120)
set @location = N'c:\dbbackups\SERVERDB.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

Don't forget to change @location.


this proc is usefull because u can easily attach it to a php file, and make something like a: *Backup Tool*
 
Initiate Mage
Joined
Jan 20, 2008
Messages
4
Reaction score
0
Re: [Share] Procedure: BackupDB

this is Myst's procs..
 
Experienced Elementalist
Joined
Dec 7, 2006
Messages
250
Reaction score
2
Re: [Share] Procedure: BackupDB

proc of who?
 
Back
Top