Results 1 to 3 of 3
  1. #1
    Join Date
    Sep 2008

    Unanswered: Detecting OS or File System errors within SQLCMD


    I'm using sqlcmd to create a series of flat files which are used to populate a legacy DB2 system. The files are being extracted from a SQL Server 2005 database, and written to a network share. The files are several hundred GB in size. Under normal conditions, the process runs for a few hours, and completes with no problems.

    However, on occasion, the network share runs out of disk space. When this happens, my sqlcmd job terminates without reporting any error. If there is no space when the job starts, it also terminates without reporting an error.

    I've been able to use the /b and /v switches to capture errors generated inside SQL Server, but these OS errors seem to be impossible to nail down.

    Has anyone faced this problem? Any suggestions?


    Unpleasant SPAMMY links removed by PC poots
    Last edited by pootle flump; 10-08-08 at 04:24.

  2. #2
    Join Date
    Nov 2004
    on the wrong server
    Provided Answers: 6
    are you using the -o flag to capture output?
    “If one brings so much courage to this world the world has to kill them or break them, so of course it kills them. The world breaks every one and afterward many are strong at the broken places. But those that will not break it kills. It kills the very good and the very gentle and the very brave impartially. If you are none of these you can be sure it will kill you too but there will be no special hurry.” Earnest Hemingway, A Farewell To Arms.

  3. #3
    Join Date
    May 2004
    why are you using sqlcmd to create flat files? wouldn't bcp be more appropriate?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts