SQL Server Performance

reporting SysAdmins

Discussion in 'SQL Server Reporting Services' started by fastwater, Aug 3, 2005.

  1. fastwater New Member

    Im looking for a script that will return all the SysAdmins of numerous SQL servers.

    Id like the output to include server name and all the Sysadmins for each server.

    Ideally piping output to .pdf.

    Anyone with suggestions? my output looks like this (its ugly!):

    =================================================

    sysadmin
    MSADww_nt_dba

    0x010500000000000515000000ADCD10C1047E4D9549A099426F4B0000


    sysadmin
    PAWDIST01SQLAgentCmdExec

    0x010500000000000515000000FD77B1564B2CBC1A43170A32EF030000


    sysadmin
    sa

    0x01



    (5 rows affected)
    1>
    C:TEMP>type pawdist01-sqlagent.txt
    1> 2> 3> ServerRole
    MemberName

    MemberSID


    -----------------------------------
    ----------------------------------------------------------------
    ---------------------------------------------------------
    ----------------------------------------------------------------
    ----------------------------------------------------------------
    ------------------------------
    sysadmin
    MSADatmexec

    0x010500000000000515000000ADCD10C1047E4D9549A099427C890000


    sysadmin
    MSADobk

    0x010500000000000515000000ADCD10C1047E4D9549A09942FC620000


    sysadmin
    MSADww_nt_dba

    0x010500000000000515000000ADCD10C1047E4D9549A099426F4B0000


    sysadmin
    PAWDIST01SQLAgentCmdExec

    0x010500000000000515000000FD77B1564B2CBC1A43170A32EF030000


    sysadmin
    sa

    0x01
    ===============================================

    Thanks in advance for any help

    Dan
  2. satya Moderator

    May use

    SELECT name
    FROM sysusers
    WHERE name = USER_NAME(1)
    GO


    Satya SKJ
    Moderator
    http://www.SQL-Server-Performance.Com/forum
    This posting is provided “AS IS” with no rights for the sake of knowledge sharing.

Share This Page