÷ẤѾ Data
º촶 价 http://thepkboybbs.co.cc :: Yulgang Serve :: Code [Query Analyzer] :: Code [Query Analyzer] Ѻ觤ҢͧԿ
หน้า 1 จาก 1
÷ẤѾ Data
÷ẤѾ Data
(ѹͺ͡ѧ㨡Ѻ SQL2000 ФѺ мͧѺ SQL2005 Ѻ)
١蹹价 Job ¤Ѻ §仡˹ ẤѾ˹Ѻ
Quote:
--trunkating
BACKUP LOG rxjhgame WITH NO_LOG
USE [rxjhgame]
GO
--shrinking
DBCC SHRINKDATABASE(N'rxjhgame')
Declare @dateBackup Varchar(100)
Set @dateBackup = 'C:\Backups\rxjhgame_' +
Convert(varchar, datepart( year , Getdate() )) + '-'+
Convert( varchar , datepart( month , Getdate() ) ) + '-'+
Convert( varchar, datepart( day , Getdate() ) ) + '.bak'
--saving backup with name and date.
BACKUP DATABASE [rxjhgame] TO DISK = @dateBackup WITH NOFORMAT, NOINIT, NAME = N'rxjhgame-Full Database Backup', SKIP, NOREWIND, NOUNLOAD, STATS = 10
GO
Set @dateBackup = 'C:\Backups\rxjhgame_' +
ẤѾ͡ҷ C:\Backups ФѺ
ͧ٤Ѻ Դ Ф觤ҧѹ
2 駹¹ rxjhgame rxjhaccount Ҩ繵ͧ Backup 2 ѹ
(ѹͺ͡ѧ㨡Ѻ SQL2000 ФѺ мͧѺ SQL2005 Ѻ)
١蹹价 Job ¤Ѻ §仡˹ ẤѾ˹Ѻ
Quote:
--trunkating
BACKUP LOG rxjhgame WITH NO_LOG
USE [rxjhgame]
GO
--shrinking
DBCC SHRINKDATABASE(N'rxjhgame')
Declare @dateBackup Varchar(100)
Set @dateBackup = 'C:\Backups\rxjhgame_' +
Convert(varchar, datepart( year , Getdate() )) + '-'+
Convert( varchar , datepart( month , Getdate() ) ) + '-'+
Convert( varchar, datepart( day , Getdate() ) ) + '.bak'
--saving backup with name and date.
BACKUP DATABASE [rxjhgame] TO DISK = @dateBackup WITH NOFORMAT, NOINIT, NAME = N'rxjhgame-Full Database Backup', SKIP, NOREWIND, NOUNLOAD, STATS = 10
GO
Set @dateBackup = 'C:\Backups\rxjhgame_' +
ẤѾ͡ҷ C:\Backups ФѺ
ͧ٤Ѻ Դ Ф觤ҧѹ
2 駹¹ rxjhgame rxjhaccount Ҩ繵ͧ Backup 2 ѹ
ThePKBoy- Moderator
- จำนวนข้อความ : 23
Registration date : 06/04/2008
º촶 价 http://thepkboybbs.co.cc :: Yulgang Serve :: Code [Query Analyzer] :: Code [Query Analyzer] Ѻ觤ҢͧԿ
หน้า 1 จาก 1
Permissions in this forum:
คุณไม่สามารถพิมพ์ตอบ