Column Names Corrupted

  • jfaith

    SSC Enthusiast

    Points: 158

    Intermittently we are getting column header names corrupted in the output text file when executing a stored proc from a job in SSIS step. This is 15 yr old process that has only started to fail in a 2008 R2 cluster env.
    Note: Actual data is unaffected.
    The pseudo proc sql looks something like this:
    SELECT 'tableA' as XTABLENAME, count(*) as XCOUNT from schemaA.tableA
    SELECT col1
    FROM schemaA,tableA 
    ORDER BY col1

    select 'tableB' as XTABLENAME, count(*) as XCOUNT from schemaA.tableB
    SELECT col1, col2, col3
    FROM schemaA,tableB 
    ORDER BY col1
    ...
    -------------------end proc----------------------------------------
    The job executes
    USE msdb
    GO
    EXEC sp_start_job @job_name = 'xpr_extract'
    GO
    WAIT FOR DELAY '000:05:00'
    -----------------------end job-------------------------------------
    --- expected
    XTABLENAME XCOUNT
    ------------- -----------
    tableA 1

    col1
    --------------- 
    123456789012345
    XTABLENAME XCOUNT
    ------------- -----------
    tableB 3

    col1 col2 col3
    --------------- --------------- ---------- 
    123456789012345 000000000000012 0000000001
    123456789012345 000000000000012 0000000002
    123456789012345 000000000000015 0000000001
    ---------------------------------end expected----------------------
    Columns get corrupted like this; See last table columns:
    XTABLENAME XCOUNT
    ------------- -----------
    tableA 1

    col1
    --------------- 
    123456789012345
    XTABLENAME XCOUNT
    ------------- -----------
    tableB 3

    col1 _xxx2 x_xxx
    --------------- --------------- ---------- 
    123456789012345 000000000000012 0000000001
    123456789012345 000000000000012 0000000002
    123456789012345 000000000000015 0000000001

  • jfaith

    SSC Enthusiast

    Points: 158

    Could SQL Agent limitations and concurrent re-indexing have bearing on output?

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply