可以实现楼主的功能,包含磁盘空间的处理,但这个过程非常复杂!返回磁盘空间:
http://blog.csdn.net/softj/archive/2005/09/29/492104.aspx

解决方案 »

  1.   

    如果要用DTS方式,要自己编辑DTS包并执行,也可以用BCP方式试下。(BCP更快,不过DTS可以在导出过程中进行一些转换。)
      

  2.   

    谢谢, 不过softj的方法不行啊,
      

  3.   

    You can use some program (vb, c#) to deal with it, and handle it in your application.
      

  4.   

    I always use the bcp utility and the xp_cmdshell extended stored procedure in the master database. You can write a BCP OUT command for Information_schema.Tables. Execute the below script in Query analyzer with Text result. Paste the  output of the result in a new Query window and execute. This will export the table data to text files in C:\temp\test\ folder with the table name as the text  file name.    use pubsgoset quoted_identifier off  
    select 'master..xp_cmdshell '+"'"+ ' bcp pubs..'+table_name+' out C:\temp\test\'+table_name+'.txt -Usa –P12345 -S(local) -c'+"'" +char(10)+'go' from information_schema.tables where +table_type='BASE TABLE'
      

  5.   

    只用sql复杂了些,如果写程序加sql就简单多了