Java开发网 Java开发网
注册 | 登录 | 帮助 | 搜索 | 排行榜 | 发帖统计  

您没有登录

» Java开发网 » Database/JDBC/SQL/JDO/Hibernate  

按打印兼容模式打印这个话题 打印话题    把这个话题寄给朋友 寄给朋友    该主题的所有更新都将Email到你的邮箱 订阅主题
flat modethreaded modego to previous topicgo to next topicgo to back
作者 Re:请教高手:SQL2000 SERVER 中如何备份和复原单个TABLE? [Re:javait]
babyoracle





发贴: 159
积分: 21
于 2003-06-13 08:42 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
据我所知MS SQL Server的备份有四种方式:complete、differential、Transaction Log、File and filegroup。如果要实现你的目的可以使用第四种,但是你在建数据库时就因该做好准备,也就是把你要备份的table建到单独的文件。
for example:
--Create database
USE master
GO
CREATE DATABASE Archive
ON
PRIMARY ( NAME = Arch1,
FILENAME = 'd:\program files\microsoft sql server\mssql\data\archdat1.mdf',
SIZE = 100MB,
MAXSIZE = 200,
FILEGROWTH = 20),
FILEGROUP SalesGroup2
( NAME = Arch2,
FILENAME = 'd:\program files\microsoft sql server\mssql\data\archdat2.ndf',
SIZE = 100MB,
MAXSIZE = 200,
FILEGROWTH = 20),
FILEGROUP SalesGroup3
( NAME = Arch3,
FILENAME = 'd:\program files\microsoft sql server\mssql\data\archdat3.ndf',
SIZE = 100MB,
MAXSIZE = 200,
FILEGROWTH = 20)
LOG ON
( NAME = Archlog1,
FILENAME = 'd:\program files\microsoft sql server\mssql\data\archlog1.ldf',
SIZE = 100MB,
MAXSIZE = 200,
FILEGROWTH = 20),
( NAME = Archlog2,
FILENAME = 'd:\program files\microsoft sql server\mssql\data\archlog2.ldf',
SIZE = 100MB,
MAXSIZE = 200,
FILEGROWTH = 20)
GO
--Create table
use Archive
go
CREATE TABLE jobs
(
job_id smallint
IDENTITY(1,1)
PRIMARY KEY CLUSTERED,
job_desc varchar(50) NOT NULL
DEFAULT 'New Position - title not formalized yet',
min_lvl tinyint NOT NULL
CHECK (min_lvl >= 10),
max_lvl tinyint NOT NULL
CHECK (max_lvl <= 250)
)
--attention
on SalesGroup2
--这样jobs就建在了,d:\program files\microsoft sql server\mssql\data\archdat2.ndf上,你就可以通过备份这个文件而备份jobs了,Good luck!


九佰 edited on 2003-06-13 08:44


话题树型展开
人气 标题 作者 字数 发贴时间
5348 请教高手:SQL2000 SERVER 中如何备份和复原单个TABLE? javait 80 2003-06-12 10:25
4066 Re:请教高手:SQL2000 SERVER 中如何备份和复原单个TABLE? javait 35 2003-06-13 01:36
4677 Re:请教高手:SQL2000 SERVER 中如何备份和复原单个TABLE? babyoracle 1571 2003-06-13 08:42
4277 Re:请教高手:SQL2000 SERVER 中如何备份和复原单个TABLE? javait 73 2003-06-13 23:38

flat modethreaded modego to previous topicgo to next topicgo to back
  已读帖子
  新的帖子
  被删除的帖子
Jump to the top of page

   Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent
Copyright © 2002-2020 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号
客服电话 0592-8750026    客服信箱 714923@qq.com    客服QQ 714923