我现在的数据库有10G大小,我估计里面碎片特别厉害,访问时非常慢,所以想整理一下,但网上的那些DBC的方法不行,要导入导出10G的数据要到什么时候呀,另外,我用什么方法可以压缩数据库呀
解决方案 »
- IT界的十大之谜之一:mouse_event模拟点击时坐标参数无效?!
- 求助 关于有效数字的问题
- 请教关于datareport的问题
- vb可执行文件不能创建ActiveX对象,为什么?急!!!
- 怎样向一个已知的句柄发送鼠标、键盘命令?
- 急用!!!!谁有DHTML应用程序的示例代码?简单即可,分不够再加!
- 大虾 帮我调整一个小程序./
- 如何在excel宏中取“当前文件名”?
- 函数直写代码与创建子过程时间比较
- Set ex = CreateObject("excel.application") 出现429错误,提示ACTIVEX部件不能创建对象和类,请帮忙!
- 主键冲突
- EXCEL 中使用Application.FileDialog
select 'bcp VISDB..'+name+' out d:\data\'+name+'.txt'+
' -S 49 -U dba -P pasword-n '+
'-e d:\log\'+name+'.log<br>pause<br>'
from sysobjects
where type = 'U' and id not in(
select b.id
from sysobjects a, syscolumns b
where a.id = b.id and a.type= 'U'
and b.type = 63 and b.status = 128
)
union
select 'bcp VISDB..'+name+' out d:\data\'+name+'.txt'+
' -S 49 -U dba -P password-n -E '+
'-e d:\log\'+name+'.log<br>pause<br>'
from sysobjects
where type = 'U' and id in(
select b.id
from sysobjects a, syscolumns b
where a.id = b.id and a.type= 'U'
and b.type = 63 and b.status = 128
)
自动生成bcp命令,然后自动处理带identity字段的表的identity问题,保证其前后一致。
这是导出命令,导入命令只要在其中修改 out 为 in,得到命令后,用html浏览,拷贝下页面中
显示的文件,到命令行运行就可以了