Feedback:

OS Username Scalar Function

Would be useful to have a scalar function that returns the OS user login name, rather than the dictionary user name which is what USER() returns for dictionary connections. Perhaps add an option to the USER() scalar to alter its behavior in this way.

27 votes
Vote 0 votes Vote Vote
Vote
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    I agree to the terms of service

    You'll receive a confirmation email with a link to create a password (optional).

    Signed in as (Sign out)
    You have left! (?) (thinking…)
    Peter FunkPeter Funk shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

    3 comments

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      I agree to the terms of service

      You'll receive a confirmation email with a link to create a password (optional).

      Signed in as (Sign out)
      Submitting...
      • oscar hernandezoscar hernandez commented  ·   ·  Flag as inappropriate

        If the function is an scalar user_os(); by example, You can use it in the default value of the field, in order to have the person that create the record, Or changed it (using it inside a trigger), It would be great if there is a function like p_SetApplicationID:
        sp_setuser_os(cUser_Logged).

      • Rodd GrahamRodd Graham commented  ·   ·  Flag as inappropriate

        Possible alternative: Allow the ACE32 client to substitute the OS username for the database login username in the connection string. Similar to using integrated authentication in MS Sql Server except that the password would still need to be provided unless ADS learns how to use external user credentials. IMO, should be a unique connection string verb like "ADS_USE_OS_UID". Then USER() works.

      • joachimdjoachimd commented  ·   ·  Flag as inappropriate

        other idea: enhance sp_mgGetConnectedUsers to contain the unique connection id (connection handle) and provide a function to retrieve it in SQL. Then (together with some other suggestions) you can query that SP to get _ALL_ information about computername, username, ip, terminal client ip, ...

        SELECT * FROM (EXECUTE PROCEDURE sp_mgGetConnectedUsers()) cu
        WHERE cu.[ConnectionId] = ConnectionID();

      Knowledge Base and Helpdesk