/*BKUP.IDC*/
Datasource: Web SQL
Template: BKUP.htx
Username: sa
Password: sa
SQLStatement:
+if %jb%=1
+/*判断系统维护员*/
+SELECT qsrq=convert(varchar(12),getdate(),1),
zzrq=convert(varchar(12),+dateadd(day,1,getdate()),1)
+/*预置起始日期和终止日期*/
/*BKUPCZ.IDC*/
Datasource: Web SQL
Template: BKUPCZ.htx
Username: sa
Password: sa
SQLStatement:
+INSERT FJJDBBK.DBO.JKLD SELECT * FROM FJJDB.DBO.JKLD
+where convert(varchar(12),gdsj,1)>=′%QSRQ%′
and convert(varchar(12),gdsj,1)< =′%ZZRQ%′
…………
+/*把当前数据库中选定的数据转存到桥数据库中*/
+DUMP DATABASE FJJDBBK TO
TAPE = ′\\.\tape0′ WITH INIT, NOUNLOAD
+/*备份数据*/
+SELECT TS=′备份数据库操作已完成!′
/*HUIF.IDC*/
Datasource: Web SQL
Template: HUIF.htx
Username: sa
Password: sa
SQLStatement:
+if %jb%=1
+begin
+LOAD DATABASE FJJDBBK FROM TAPE=′\\.\TAPE0′ WITH
NOUNLOAD
+/*恢复备份数据*/
+SELECT TS=′恢复数据库操作已完成!′+/*
+end
/*QLSJKCZ.IDC*/
Datasource: Web SQL
Username: sa
Password: sa
Template: QLSJKCZ.htx
SQLStatement:
+delete FJJDB.DBO.JKLD
where convert(varchar(12),gdsj,1)>=′%QSRQ%′ and
convert(varchar(12),gdsj,1)<=′%ZZRQ%′
…………
+/*删除当前数据库中选定的数据*/
+SELECT TS=′删除操作已完成!′ |