|
|
select * from dba_tab_comments where 1=1 and owner='anyxxxxxx' and comments is NULL and table_name not like 'BIN$%' order by table_name |
|
"C:\Program Files\Microsoft SQL Server90\Tools\Binn\sqlcmd" -S localhost -i e:\Backupbackup.sql |
풀백업
|
declare @runtime nvarchar(10) declare @backupdevice nvarchar(100) declare @backupname nvarchar(100) set @runtime = substring(convert(nvarchar(20), getdate(), 8) ,1,2) set @backupdevice = N'e:\Backupbackup_' + @runtime + N'.bak' set @backupname = N'backup_' + @runtime BACKUP DATABASE [TU] TO DISK = @backupdevice WITH NOFORMAT, INIT, NAME = @backupname, SKIP, NOREWIND, NOUNLOAD, STATS = 10 |
증분 백업
|
declare @runtime nvarchar(10) declare @backupdevice nvarchar(100) declare @backupname nvarchar(100) set @runtime = substring(convert(nvarchar(20), getdate(), 8) ,1,2) set @backupdevice = N'e:\Backupbackup_' + @runtime + N'.bak' set @backupname = N'backup_' + @runtime BACKUP DATABASE [TU] TO DISK = @backupdevice WITH DIFFERENTIAL, NOFORMAT, INIT, NAME = @backupname, SKIP, NOREWIND, NOUNLOAD, STATS = 10 |
|
set yyyy=%date:~0,4% set mm=%date:~5,2% set dd=%date:~8,2% echo group%yyyy%%mm%%dd%.log >> file.txt |
|
링크
|