SQL Server Service Account

Posted on 2011-10-18
Last Modified: 2012-05-12

Is there a way to find out what the SQL Server server account is from running a t-sql statement without going to the registry to get it?
Question by:PeterErhard
    LVL 7

    Expert Comment

    do you need to find the service account for SQL?

    Author Comment

    Yes and was wondering whether its possible to retrieve it from a system table or something and not have to do a registry lookup which I what I saw through a google search.
    LVL 7

    Accepted Solution

    I guess no such info is available inside SQL but there is a way to retrive this information from SQL using xp_command shell. You can see this info at  he following web:
    LVL 3

    Assisted Solution

    You can also find it in the SQL Server Configuration Manager:

    Program Files -> Microsoft SQL Server 2008 --> Configuration Tools --> SQL Server Configuration Manager

    Then under SQL Server Services, right click the SQL Server Service and select properties.
    LVL 68

    Assisted Solution

    You can retrieve it using Powershell and WMI, but that's at least as awkward as reading the registry really :-) .

    Author Closing Comment

    Thanks guys for the comments.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    SQL Server engine let you use a Windows account or a SQL Server account to connect to a SQL Server instance. This can be configured immediatly during the SQL Server installation or after in the Server Authentication section in the Server properties …
    Occasionally there is a need to clean table columns, especially if you have inherited legacy data. There are obviously many ways to accomplish that, including elaborate UPDATE queries with anywhere from one to numerous REPLACE functions (even within…
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    794 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now