Friday, December 04, 2009

sqlcmd 512 characters bug (On SQL server 2008 R2)

On SQL server 2008 R2 November CTP using sqlcmd to output file will result in truncated characters. I have tried this on my PC numerous times and still not getting more than 512 characters.

I have used the following command

sqlcmd -E -S -d master -Q "PRINT REPLICATE('this is testing for more than 512 characters',1000)" -b -o C:\NoMorethan512characters.txt

The above command produced only 512 characters. After further investigation, I found out that this has been reported as a feedback on Microsoft connect sqlcmd 512 characters still not registered as a bug by Microsoft. I hope this is going to be fixed soon.

4 comments:

紅包 said...

成功是優點的發揮,失敗是缺點的累積 ....................................................

皮東 said...

以簡單的行為愉悅他人的心靈,勝過千人低頭禱告........................................

StartUpFounder said...

There is a free tool "SQLS*Plus" which is an SQL*Plus for SQL Server. Works with SQL Server 2000/2005 and 2008

Very flexible with data formatting (set lines size, pagesize, etc), variables (&, &&), spool, etc - light years better than isql, osql or sqlcmd

I downloaded SQLS*Plus from http://www.memfix.com

SQLServerSimpler said...

why you use sql plus for sql server when you have got SQL Server managment studio?