Professional Web Applications Themes

suser_name() inconsistencies across servers - Microsoft SQL / MS SQL Server

Greetings! I am trying to pinpoint an issue a developer ran into. We have two different SQL Servers both running version 7.00.1063. They also both run on Windows NT 4. The problem we're having is that we have NT authenticated accounts on both servers. On the production server, the suser_name(suser_id('domain\userabc')) function returns the full domain\userabc name. On the development server, this function returns only the userabc name. The problem is, aside from that being a developer coding against a system "table" such as syslogins - thought its only a view, that since they went after a column "name" in syslogins ...

  1. #1

    Default suser_name() inconsistencies across servers

    Greetings!

    I am trying to pinpoint an issue a developer ran into.
    We have two different SQL Servers both running version
    7.00.1063. They also both run on Windows NT 4.

    The problem we're having is that we have NT authenticated
    accounts on both servers. On the production server, the
    suser_name(suser_id('domain\userabc')) function returns
    the full domain\userabc name. On the development server,
    this function returns only the userabc name.

    The problem is, aside from that being a developer coding
    against a system "table" such as syslogins - thought its
    only a view, that since they went after a column "name"
    in syslogins that depends on this suser_name() their code
    has broken in development. They I'm just wondering if
    there is a known bug about this that I haven't run across.

    Another question: Why did MS code with functions that
    were to be for b\w compatibility only?

    Thanks in advance.
    Steve
    Steve Guest

  2. #2

    Default Re: suser_name() inconsistencies across servers

    This is because on one server the sp_grantdbaccess was called like this:

    exec sp_grantdbaccess 'domain\user', 'domain\user'

    and on the other like this

    exec sp_grantdbaccess 'domain\user', 'user'

    I believe there was also a change in EM behavior at some point (7.0 to 2000
    or one of the 2000 Sp's) where it started using the former instead of the
    latter.

    --
    Kevin Connell, MCDBA
    --------------------------------------------------
    The views expressed here are my own
    and not of my employer.
    ----------------------------------------------------
    "Steve H." <edu> wrote in message
    news:02df01c368e9$1655db60$gbl... 


    Kevin Guest

  3. #3

    Default Re: suser_name() inconsistencies across servers

    Thanks for the post Kevin.

    I tried a new sequence with a new login account.

    exec sp_grantlogin 'mc\mml00'
    -- without grantinguser database access
    select suser_name(suser_id('mc\mml00'))

    mml00

    -- after granting user database access
    sp_grantdbaccess 'mc\mml00', 'mc\mml00'

    mml00

    I would expect this to return properly "mc\mml00".

    Thank you.
    Steve

     
    called like this: 
    point (7.0 to 2000 
    former instead of the [/ref]
    authenticated [/ref]
    the [/ref]
    server, [/ref]
    coding [/ref]
    its [/ref]
    code [/ref]
    across. 
    >
    >
    >.
    >[/ref]
    Steve Guest

  4. #4

    Default Re: suser_name() inconsistencies across servers

    My bad, I was confusing this with user. Anyway, suser_name is deprecated.
    use suser_sname.

    --
    Kevin Connell, MCDBA
    --------------------------------------------------
    The views expressed here are my own
    and not of my employer.
    ----------------------------------------------------
    "Steve H." <edu> wrote in message
    news:043901c368ed$e143f150$gbl... 
    > called like this: 
    > point (7.0 to 2000 
    > former instead of the [/ref]
    > authenticated [/ref]
    > the [/ref]
    > server, [/ref]
    > coding [/ref]
    > its [/ref]
    > code [/ref]
    > across. 
    > >
    > >
    > >.
    > >[/ref][/ref]


    Kevin Guest

  5. #5

    Default Re: suser_name() inconsistencies across servers

    or user.


    --
    Kevin Connell, MCDBA
    --------------------------------------------------
    The views expressed here are my own
    and not of my employer.
    ----------------------------------------------------
    "Steve H." <edu> wrote in message
    news:043901c368ed$e143f150$gbl... 
    > called like this: 
    > point (7.0 to 2000 
    > former instead of the [/ref]
    > authenticated [/ref]
    > the [/ref]
    > server, [/ref]
    > coding [/ref]
    > its [/ref]
    > code [/ref]
    > across. 
    > >
    > >
    > >.
    > >[/ref][/ref]


    Kevin Guest

Similar Threads

  1. Frontend Web Servers connect to Coldfusion Servers
    By Trensic in forum Coldfusion Server Administration
    Replies: 2
    Last Post: December 13th, 04:20 PM
  2. Mac to PC inconsistencies
    By glndi in forum Macromedia Dynamic HTML
    Replies: 1
    Last Post: December 10th, 07:39 PM
  3. cfhttp inconsistencies
    By ziggy31 in forum Coldfusion - Advanced Techniques
    Replies: 11
    Last Post: November 14th, 04:32 AM
  4. Text Inconsistencies
    By ShaunDon webforumsuser@macromedia.com in forum Macromedia Flash Sitedesign
    Replies: 0
    Last Post: January 26th, 09:14 PM

Bookmarks

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139