<%@ Language=VBScript %>
<HTML>
<HEAD>
<META name=VI60_defaultClientScript content=VBScript>
<META NAME="GENERATOR" Content="Microsoft FrontPage 4.0">
<SCRIPT ID=clientEventHandlersVBS LANGUAGE=vbscript>
<!--
Sub btnbak_onclick
if frmbak.txtsvr.value="" then
window.alert("'Server Name' is empty!")
frmbak.txtsvr.focus
exit sub
end if
if frmbak.txtuid.value="" then
window.alert("'Administrators' is empty!")
frmbak.txtuid.focus
exit sub
end if
if frmbak.txtdb.value="" then
window.alert("'Database' is empty!")
frmbak.txtdb.focus
exit sub
end if
if frmbak.txtto.value="" then
window.alert("'Backup To' is empty!")
frmbak.txtto.focus
exit sub
end if
frmbak.submit
End Sub
-->
</SCRIPT>
<link rel="stylesheet" href="../../sheets/B2BStyle.css">
</HEAD>
<form action="backupdbsave.asp" method="post" id=frmbak name=frmbak>
<body class="bg_frame_up">
<p class=heading> Database --> Backup</p>
<P align=center>
<div align="center">
<center>
<table width="60%" cellpadding=1 cellspacing=1 border=0 align=center>
<tr>
<td class=TD_Mand_FN align="center" height="35" width="40%">Server Name:</td>
<td class=TD_Mand_F height="35" width="59%">
<INPUT id=txtsvr name=txtsvr size="20" style="font-family: Arial; font-size: 9pt"></td>
</tr>
<tr>
<td class=TD_Mand_FN align="center" height="35" width="40%">Administrators:</td>
<td class=TD_Mand_F height="35" width="59%">
<INPUT id=txtuid name=txtuid size="20" style="font-family: Arial; font-size: 9pt"></td>
</tr>
<tr>
<td class=TD_Mand_FN align="center" height="35" width="40%">Password:</td>
<td class=TD_Mand_F height="35" width="59%">
<INPUT id=txtpwd name=txtpwd type=password style="font-family: Arial; font-size: 9pt"></td>
</tr>
<tr>
<td class=TD_Mand_FN align="center" height="35" width="40%">Database:</td>
<td class=TD_Mand_F height="35" width="59%">
<p align="left">
<INPUT id=txtdb name=txtdb size="20" style="font-family: Arial; font-size: 9pt"></p>
</td>
</tr>
<td class=TD_Mand_FN align="center" height="35" width="40%">Backup To:<br>
<u>(Server Path)</u></td>
<td class=TD_Mand_F height="35" width="59%">
<input id=txtto name=txtto style="font-family: Arial; font-size: 9pt"></td>
</tr>
</table>
</center> </div>
<p align=center><input id=btnbak name=btnbak type=button value="Start Backup" style="font-family: Arial; font-size: 9pt"></p>
</body>
</form>
</HTML>
文件2:BackupDBSave.asp
<%@ Language=VBScript %>
<%
dim msvr,muid,mpwd,mdb,mto
msvr=Request.Form("txtsvr")
muid=Request.Form("txtuid")
mpwd=Request.Form("txtpwd")
mdb=Request.Form("txtdb")
mto=Request.Form("txtto")
if mpwd="" then mpwd="''"
on error resume next
set dmosvr=server.CreateObject("SQLDMO.SQLServer")
dmosvr.connect msvr,muid,mpwd
if err.number>0 then Response.Redirect("http:backuperr.asp?err="&err.number)
mdevname="Backup_"&muid&"_"&mdb
set dmodev=server.CreateObject("SQLDMO.BackupDevice")
dmodev.name=mdevname
dmodev.type=2
dmodev.PhysicalLocation=mto
dmosvr.BackupDevices.Add dmodev
if err.number>0 then Response.Redirect("http:backuperr.asp?err="&err.number)
set dmobak=server.CreateObject("SQLDMO.Backup")
dmobak.database=mdb
dmobak.devices=mdevname
%>
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
</HEAD>
<body background="../../Images/dot.gif">
<p><strong>Backuping, wait please...</strong></p>
<%
dmobak.sqlbackup dmosvr
if err.number>0 then Response.Redirect("http:backuperr.asp?err="&err.number)
dmosvr.backupdevices(mdevname).remove
set dmobak=nothing
set dmodev=nothing
dmosvr.disconnect
set dmosvr=nothing
%>
<p><strong>Database '<%=mdb%>' backup successed!</strong></p>
</BODY>
</HTML>
文件3:BackupErr.asp
<%@ Language=VBScript %>
<%
dim errno,errstr
errno=Request.QueryString("err")
errstr=""
select case cstr(errno)
case "18456"
errstr="administrators or password error!"
case "20482"
errstr="server name error or server cannot connect!"
case "911"
errstr="database not found!"
case "15026"
errstr="server path not found!"
case "3201"
errstr="server path not found!"
case "3254"
errstr="restore from file lawlessness!"
case else
errstr="unknown error! retry later please!"
end select
%>
<HTML>
<HEAD>
<META name=VI60_defaultClientScript content=VBScript>
<META NAME="GENERATOR" Content="Microsoft FrontPage 4.0">
<SCRIPT ID=clientEventHandlersVBS LANGUAGE=vbscript>
<!--
Sub btnret_onclick
history.back
End Sub
-->
</SCRIPT>
<title></title>
</HEAD>
<body class="bg_frame_up">
<p align=center><font color=#006666><%=errstr%></font></p>
<p align=center><input id=btnret name=btnret type=button value=Return style="font-family: Arial; font-size: 9pt"></p>
</BODY>
</HTML>
栏目列表
最新更新
nodejs爬虫
Python正则表达式完全指南
爬取豆瓣Top250图书数据
shp 地图文件批量添加字段
爬虫小试牛刀(爬取学校通知公告)
【python基础】函数-初识函数
【python基础】函数-返回值
HTTP请求:requests模块基础使用必知必会
Python初学者友好丨详解参数传递类型
如何有效管理爬虫流量?
SQL SERVER中递归
2个场景实例讲解GaussDB(DWS)基表统计信息估
常用的 SQL Server 关键字及其含义
动手分析SQL Server中的事务中使用的锁
openGauss内核分析:SQL by pass & 经典执行
一招教你如何高效批量导入与更新数据
天天写SQL,这些神奇的特性你知道吗?
openGauss内核分析:执行计划生成
[IM002]Navicat ODBC驱动器管理器 未发现数据
初入Sql Server 之 存储过程的简单使用
这是目前我见过最好的跨域解决方案!
减少回流与重绘
减少回流与重绘
如何使用KrpanoToolJS在浏览器切图
performance.now() 与 Date.now() 对比
一款纯 JS 实现的轻量化图片编辑器
关于开发 VS Code 插件遇到的 workbench.scm.
前端设计模式——观察者模式
前端设计模式——中介者模式
创建型-原型模式