Link to home
Start Free TrialLog in
Avatar of Sym73
Sym73

asked on

Trouble setting permissions in SQL Server 2005 Express

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?

Thanks.
Avatar of imran_fast
imran_fast

You can sqlcmd command prompt utility to grant your user access
check this article for using sqlmd
http://www.databasejournal.com/features/mssql/article.php/3566401

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'
Avatar of Sym73

ASKER

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?

Thanks.
ASKER CERTIFIED SOLUTION
Avatar of imran_fast
imran_fast

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Sym73

ASKER

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

Thanks.