ylbtech-DatabaseDesgin:web-ylbtech-数据库备份-数据库设计 |
DatabaseName:ylbtech
Model:备份
Type:数据库备份设计
Url:
1.A,数据库关系图(Database Diagram) |
1.B,数据库设计脚本(Database Design Script) |
-- =============================================
-- Create database template
-- =============================================
USE master
GO -- Drop the database if it already exists
IF EXISTS (
SELECT name
FROM sys.databases
WHERE name = N'TMBOOK'
)
DROP DATABASE TMBOOK
GO CREATE DATABASE TMBOOK
GO
use TMBOOK
go
-- =============================================
-- 1,数据备份
-- =============================================
create table DbBackup
(
buID int primary key identity(1000,1),
buType int check(buType in(0,1)),
buFileSation varchar(5000),
buFileName varchar(200),
buWeek varchar(200), buDate varchar(200)
) go
--2,
select * from DbBackup
select buID,buType,buFileSation,buFileName,buWeek,buDate from DbBackup
1.C,功能实现代码(Function Implementation Code) |
1,databaseBackupManager.aspx
<div style="text-align: center;">
<p class="style1"><strong>数据备份</strong></p>
<p>
<asp:Button ID="Button1" runat="server" Text="手动备份数据库" />
<asp:Button ID="Button2" runat="server" Text="自动备份数据库" />
</p>
<p class="style1"><strong>备份列表管理</strong></p>
<table style="width:100%;" >
<tr class="style1" >
<td>
<input id="Checkbox1" type="checkbox" />全选</td>
<td>
备份编号</td>
<td>
备份类型</td>
<td>
文件位置</td>
<td>
文件名</td>
<td>
备份时间</td>
<td>
备份星期</td>
<td>
备份日</td>
</tr>
<tr>
<td>
<input id="Checkbox2" type="checkbox" /></td>
<td>
</td>
<td>
</td>
<td>
</td>
<td>
</td>
<td>
</td>
<td>
</td>
<td>
</td>
</tr>
<tr>
<td>
</td>
<td>
</td>
<td>
</td>
<td>
</td>
<td>
</td>
<td>
</td>
<td>
</td>
<td>
</td>
</tr>
</table>
<p>
<asp:Button ID="Button3" runat="server" Text="删除" /></p>
</div>
2,opertionBackup.aspx
<div style="text-align:center">
<p class="style1"><strong>手动数据备份</strong></p>
<table style="width: 100%;">
<tr>
<td class="style2"> </td>
<td class="style3">
备份类型:</td>
<td class="style4">
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
</td>
<td>
</td>
</tr>
<tr>
<td class="style2"> </td>
<td class="style3">
备份位置:</td>
<td class="style4">
<asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>
</td>
<td>
</td>
</tr>
<tr>
<td class="style2"> </td>
<td class="style3">
文件名:</td>
<td class="style4">
<asp:TextBox ID="TextBox3" runat="server"></asp:TextBox>
</td>
<td>
</td>
</tr>
<tr>
<td class="style2">
</td>
<td class="style3">
</td>
<td class="style4">
<asp:Button ID="Button1" runat="server" Text="开始备份" />
</td>
<td>
</td>
</tr>
</table>
</div>
作者:ylbtech 出处:http://ylbtech.cnblogs.com/ 本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利。 |