Trouble setting permissions in SQL Server 2005 Express

Posted on 2007-08-06
Last Modified: 2013-11-05
I am running Windows Vista, and SQL Server 2005 Express came preinstalled from DELL.  I have downloaded and installed the SQL Management Studio.  

My windows account does not have permission as sysadmin, and cannot grant that permission to itself.

I tried to log in as SQL Server account "sa", but it says that it is not associated with a trusted connection (I'm not sure what the password would be anyway).

The windows account I am logged in as has Windows administrator permissions.

How can I setup accounts to have sysadmin permissions on this system?

Question by:Sym73
    LVL 28

    Expert Comment

    You can sqlcmd command prompt utility to grant your user access
    check this article for using sqlmd

    connect to sqlcmd using sa sql user and then you have to run this sql command from sqlcmd utility
    EXEC sp_addsrvrolemember 'yourdomain\youruser', 'sysadmin'

    Author Comment

    When I try to open SQLCMD.exe, it opens a command line window, the cursor flashes a time or two, then it closes.

    Do you know how to open this so that it doesn't automatically close?

    How do I connect as th 'sa' user using the sqlcmd?

    LVL 28

    Accepted Solution


    Author Comment

    It turns out I had to start the enterprise manager, I need to do so by right clicking and selecting "run as administrator".


    Featured Post

    Free Trending Threat Insights Every Day

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Join & Write a Comment

    by Mark Wills Attending one of Rob Farley's seminars the other day, I heard the phrase "The Accidental DBA" and fell in love with it. It got me thinking about the plight of the newcomer to SQL Server...  So if you are the accidental DBA, or, simp…
    Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
    Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
    This video discusses moving either the default database or any database to a new volume.

    754 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

    24 Experts available now in Live!

    Get 1:1 Help Now