sql_variant datatype

  • I have few tables with datatype sql_variant.

    invariably, during integrity check from the maintenance plan, I get these errors and this is happening for sql_variant columns only. I am thinking whether to get out of sql_variant and move to varchar().

    [Microsoft][ODBC SQL Server Driver][SQL Server]Table error: Object ID 2131642787, index ID 0, page (1:10854), row 55. Record check (innerLength <= innerColInfo.CbMaxLen () && innerPCol != NULL) failed. Values are 2 and 0.

    [Microsoft][ODBC SQL Server Driver][SQL Server]CHECKDB found 0 allocation errors and 900 consistency errors in database 'tst'.

    [Microsoft][ODBC SQL Server Driver][SQL Server]repair_allow_data_loss is the minimum repair level for the errors found by DBCC CHECKDB (tst).

    ** Execution Time: 0 hrs, 1 mins, 14 secs **

  • This was removed by the editor as SPAM

  • Depends what you're storing in the column.

    Personally I subscribe to the Keep It Simple philosophy. If you data can be represented in the simpler (and cross platform-compatible) VARCHAR type I would use that option

    I have found it is possible to please all of the people all of the time if you do exactly what they want. Harold Macmillan 1961


    I have found it is possible to please all of the people all of the time if you do exactly what they want. Harold Macmillan 1961

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

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