MSSQL 2005, 2008自带 表比较工具 tablediff.exe
来源:互联网 发布:无主之地mac 迅雷下载 编辑:程序博客网 时间:2024/05/17 11:56
SQL Server 2005新增工具工具TABLEDIFF,用于比价两张表之间的差异。可以比较行数、架构、列;可将比较结果输出成T-SQL脚本或者输出到文件或者表中。
假定的SQL SERVER默认安装在c盘,那么这个工具位于“C:/Program Files/Microsoft SQL Server/90/COM/tablediff.exe”
C:/Program Files/Microsoft SQL Server/90/COM>tablediff.exe /?
Microsoft (R) SQL Server Replication Diff Tool
Copyright (C) 1988-2005 Microsoft Corporation. All rights reserved.
User-specified agent parameter values:
/?
Replication Diff Tool Command Line Options
usage: tablediff
-- Source Options -- 源
-sourceserver Source Host 源数据库服务器,如果服务器上安装两个实例,还得使用“服务器名称”/实例名称
-sourcedatabase Source Database 服务器上的数据库名称
-sourceschema Source Schema Name 表或者视图的所有者,一般就是dbo
-sourcetable Source Table or View 表或者视图名称
-sourceuser Source Login login名称
-sourcepassword Source Password 密码
-sourcelocked Lock the source table/view durring tablediff 比较的时候是否lock表和视图
-- Destination Options --
-destinationserver Destination Host
-destinationdatabase Destination Database
-destinationschema Destination Schema Name
-destinationtable Destination Table or View
-destinationuser Destination Login
-destinationpassword Destination Password
-destinationlocked Lock the destination table/view durring tablediff
-- Misc Options --
-t Timeout
-c Column Level Diff 比较列的差异
-f Generate Fix SQL (You may also specify a file name and path) 将两者之间的不同生成sql 脚本
-q Quick Row Count 只比较行数和架构
-et Specify a table to put the errors into 创建结果表
-dt Drop the error table if it exists 如果有结果表 这个选项可以删除
-o Output file 输出文件的路径
-b Number of bytes to read for blob data types (Default 8000)
-strict Strict compare of source and destination schema
-rc Number of retries retry的次数
-ri Retry interval 重试的等待时间
例子:
数据库服务器.上有数据库360,dbA上有表answer,使用下面的查询建立两个新表:
这样我们得到了新表answer2和answer3,下面来演示比较这两个表:tablediff.exe -sourceserver log-szzb -sourcedatabase 360 -sourcetable answer2 -destinationserver log-szzb -destinationdatabase 360 -destinationtable answer3 -et DiffsTable
刷新后在数据库360中得到一个新表“DiffsTable”,这个就是比较的结果。
- MSSQL 2005, 2008自带 表比较工具 tablediff.exe
- SQL SERVER tablediff比较表是否一致工具
- 一个Windows界面的TableDiff表比较工具,可比较表记录差异
- JDK自带的转码工具 native2ascii.exe
- apache 自带压力测试工具ab.exe的使用
- 使用Windows自带的ftp.exe命令行工具
- tablediff工具实用
- VS2008自带mssql 2005 sa账号登录问题
- 使用VS2005下自带的MSSQL 2005 EXPRESS
- 使用Winmerge取代VS2010自带的版本比较工具
- tablediff
- 利用ddk自带的工具build.exe编译windows驱动
- 利用ddk自带的工具build.exe编译windows驱动
- SQL Server自带备份整个数据库脚本工具 scptxfr.exe
- C# 利用自带xsd.exe工具操作XML-如通过XML生成xsd文件
- 利用ddk自带的工具build.exe编译windows驱动
- 利用微软自带aspnet_regiis.exe工具加密web.config文件
- C# 利用自带xsd.exe工具操作XML-如通过XML生成xsd文件
- 微软拼音输入法 2010 Beta 1 发布
- Android 2.1 源码目录结构详解(转)
- Android编译环境安装
- JSF 中页面表格融合 demo
- 相约微软技术教育大会 Tech-Ed 2009
- MSSQL 2005, 2008自带 表比较工具 tablediff.exe
- TableView出错:Either the tableModel parameter or both source and columns parameters must be specified by component.....
- CContextMenuManager上下文菜单管理器以及为菜单添加图标
- World Wind for Java坐标系
- 学习C++零星记录
- 如何判断一台机器是否属于域
- android MediaPlayer 创建失败的问题及解答
- android MediaPlayer 创建失败的问题及解答
- 事务日志在运行 SQL Server 的计算机上意外增大或充满