password field in syslogins - SQL 2000 SP4

  • Hi all,

    anyone encountered this behavior:?

    When select * from syslogins, and in text result, the password field has some Chinese character, not in HEX format like in sysxlogins. Any ideas why? also, when result to grid, data starting from the password field is shifter one column to the right when the password field is not NULL?

    :-):cool:

  • Bryansky (2/17/2008)


    Hi all,

    anyone encountered this behavior:?

    When select * from syslogins, and in text result, the password field has some Chinese character, not in HEX format like in sysxlogins. Any ideas why? also, when result to grid, data starting from the password field is shifter one column to the right when the password field is not NULL?

    The password column is of type sysname (an alias for nvarchar). However, since the password is encrypted, MS is storing binary data in the nvarchar column. Not a very nice thing to do, as it later tries to interpret the binary data as a valid UCS2 string.

    Regards,

    Andras


    Andras Belokosztolszki, MCPD, PhD
    GoldenGate Software

  • Andras Belokosztolszki (2/18/2008)


    Bryansky (2/17/2008)


    Hi all,

    anyone encountered this behavior:?

    When select * from syslogins, and in text result, the password field has some Chinese character, not in HEX format like in sysxlogins. Any ideas why? also, when result to grid, data starting from the password field is shifter one column to the right when the password field is not NULL?

    The password column is of type sysname (an alias for nvarchar). However, since the password is encrypted, MS is storing binary data in the nvarchar column. Not a very nice thing to do, as it later tries to interpret the binary data as a valid UCS2 string.

    Regards,

    Andras

    So it is not a bug but by design?

    :-):cool:

  • It is also fascinating that you can change the font of the output based on the string you are displaying:

    CREATE TABLE foo (a INT, c NVARCHAR(20), d INT)

    INSERT INTO foo VALUES (2, N'some random text', 0)

    INSERT INTO foo VALUES (4, CHAR(02) + CHAR(02) + N'Different font', 0)

    SELECT * FROM foo

    the second line will display in a different font 🙂 (you must use text mode result!)

    Andras


    Andras Belokosztolszki, MCPD, PhD
    GoldenGate Software

  • Andras Belokosztolszki (2/18/2008)


    It is also fascinating that you can change the font of the output based on the string you are displaying:

    CREATE TABLE foo (a INT, c NVARCHAR(20), d INT)

    INSERT INTO foo VALUES (2, N'some random text', 0)

    INSERT INTO foo VALUES (4, CHAR(02) + CHAR(02) + N'Different font', 0)

    SELECT * FROM foo

    the second line will display in a different font 🙂 (you must use text mode result!)

    Andras

    I just saw "Different font", is that what youou mean different fonts?. Th

    the first two char? thanks...

    :-):cool:

Viewing 5 posts - 1 through 4 (of 4 total)

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