|
Definitions More Info. | Definition ID | 67 | Title | SQL | Category | SCRIPT | Definition | dosya_kopyalama_orjinal_sorgu | Definition Description | DECLARE @TodayDate as varchar(40), @TodayHour as varchar(40), @TodayMinu as varchar(40), @NewFileName as varchar(100), @tumfiles as varchar(5), @cmdstr1 as varchar(128) set @tumfiles='*.*' SELECT @TodayDate = CONVERT(varchar(10), GETDATE(), 112) SELECT @TodayHour = DATEPART(hh,GETDATE()) SELECT @TodayMinu = DATEPART(minute,GETDATE()) SELECT @NewFileName = 'DOGANTELEKOM'+'_'+'ABONE'+'_'+@TodayDate + '' + '.abn' print @NewFileName set @cmdstr1='MOVE /Y D:\TIBTOTAL\TIB_FARK_ARSIV\'+@tumfiles+' D:\TIBTOTAL\TIB_FARK_ARSIV\arsiv' EXEC master..xp_cmdshell @cmdstr1 ---------------------------------------------------------------------- DECLARE @TodayDate as varchar(40), @TodayHour as varchar(40), @TodayMinu as varchar(40), @NewFileName as varchar(100), @cmdstr as varchar(128) SELECT @TodayDate = CONVERT(varchar(10), GETDATE(), 112) SELECT @TodayHour = DATEPART(hh,GETDATE()) SELECT @TodayMinu = DATEPART(minute,GETDATE()) SELECT @NewFileName = 'DOGANTELEKOM'+'_'+'ABONE'+'_'+@TodayDate + '' + '.abn' print @NewFileName set @cmdstr='COPY /Y D:\TIBTOTAL\TIB.txt D:\TIBTOTAL\TIB_FARK_ARSIV\'+@NewFileName EXEC master..xp_cmdshell @cmdstr --query sonucunu mail atan bölüm EXEC msdb.dbo.sp_send_dbmail @recipients='[email protected];[email protected]', --@recipients='[email protected]', @subject = 'TIB DOSYASI OLUSTURULDU', @body = @NewFileName, @body_format = 'HTML'; ---------------------- DECLARE @calldate as varchar(100), @calldate2 as varchar(100), @NewFileName as varchar(500), @cmdstr as varchar(800) SELECT @calldate= CONVERT(VARCHAR(10),DATEADD(month, DATEDIFF(month, 0, SYSDATETIME())-5, 0),120) SELECT @calldate2=CONVERT(VARCHAR(10),DATEADD(month, DATEDIFF(month, 0, SYSDATETIME())-2, 0),120) --SELECT @NewFileName = 'WebServiceCallLogArchive'+'_'+'ABONE'+'_'+@TodayDate + '' + '.txt' SELECT @NewFileName = 'WebServiceCallLogArchive'+'_'+@calldate+'_'+'to'+'_'+ @calldate2+'.txt' print @NewFileName set @cmdstr='COPY /Y G:\WebServiceCallLogArchive\WebServiceCallLogArchive.txt G:\WebServiceCallLogArchive\archive\'+@NewFileName print @cmdstr EXEC master..xp_cmdshell @cmdstr --query sonucunu mail atan bölüm EXEC msdb.dbo.sp_send_dbmail @recipients='[email protected]', --@recipients='[email protected]', @subject = 'WebServiceCallLogArchive ARSIV DOSYASI OLUSTURULDU', @body = @NewFileName, @body_format = 'HTML'; | RecordBy | cunay | Record Date | 15-02-2012 16:30:36 | Düzenle | | Kopyala | | Sil | | |
|
|