Login failed SQL Express

R

RichGK

How do I actually setup what users have access in SQL Express?

Please note that I am a SQL Server administrator so am comfortable
with creating id's etc in the full product. I cannot however find out
how to do this with Express.

In my windows application I have created the SQLE database and it's
settings are as the following.

Integrated security = true;
It is using windows authentication. (I'd use SQL authentication but
cannot find the server administration console - I expect because this
is express?)

My NT user id is being passed as the login which for arguments sake is
XYZ\mylogin

The database owner is XYZ\mylogin

The error is Login failed for user 'XYZ\mylogin

Thanks,
Rich.
 
K

Karim

Here is your console

Start Menu > Programs > Microsoft SQL Server 2005 > Configuration
Tools >

Change it to SQL authentication
 
R

RichGK

Here is your console

Start Menu > Programs > Microsoft SQL Server 2005 > Configuration
Tools >

Change it to SQL authentication

The problem with that is that I cannot find out how you create users
in SQL Express.

Thanks,
Rich.
 
A

Andy

The problem with that is that I cannot find out how you create users
in SQL Express.

The same was you would in an version of Sql 2005; express is a real
version of the server.

If you want a GUI, you need to download Sql Server Management Studio
Express, which is a seperate installation.
 
A

Alberto Poblacion

RichGK said:
Please note that I am a SQL Server administrator so am comfortable
with creating id's etc in the full product. I cannot however find out
how to do this with Express.

The express version does not come with and administrative tool, but if
you need it you can download from Microsoft the Sql Server Management Studio
Express, which contains most of the functionality in SSMS:
http://www.microsoft.com/downloads/...ae-4bd1-4e3d-94b8-5a0f62bf7796&DisplayLang=en

If you need to grant access programatically, you can send a command
similar to "create login [xyz\mylogin] from windows", and then a "create
user ..." to create the user uin the database, and also "grant all to..." or
whatever grants you wish to do to give permissions to the user. All of these
can be sent by means of the ExecuteNonQuery() of a SqlCommand. To send this
commands you will need to login into windows briefly as Administrator so
that integrated security grants you access to the server.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top