Add new users to SQL Server mdf

  • Thread starter Thread starter weird0
  • Start date Start date
W

weird0

How can i add new users to the sql server mdf. Since, when i try to
access the mdf it gives me
the following error under the setting "Windows Authentication":

" Could not open default database.Login failed for user AMIRDIWAN
\Administrator"

Alternatively, i tried the other way by keeping "SQL SERVER
Authentication":

" Login failed for user 'amirdiwan'.The user is not associated with a
trusted SQL Server connection."


How can i fix this. Please let me know, as i have to do it for my
final year project?
 
weird0 said:
How can i add new users to the sql server mdf. Since, when i try to
access the mdf it gives me
the following error under the setting "Windows Authentication":

" Could not open default database.Login failed for user AMIRDIWAN
\Administrator"

Alternatively, i tried the other way by keeping "SQL SERVER
Authentication":

" Login failed for user 'amirdiwan'.The user is not associated with a
trusted SQL Server connection."


How can i fix this. Please let me know, as i have to do it for my
final year project?

First, although this is homework, I don't imagine solving this particular
problem is part of the assignment.

What version of SQL Server are you using? What version of Windows?

Is the instance of SQL Server on your local computer?

Do you have another local administrator account that you can try to connect
from?

David
 
weird0 said:
How can i add new users to the sql server mdf. Since, when i try to
access the mdf it gives me
the following error under the setting "Windows Authentication":

" Could not open default database.Login failed for user AMIRDIWAN
\Administrator"

Alternatively, i tried the other way by keeping "SQL SERVER
Authentication":

" Login failed for user 'amirdiwan'.The user is not associated with a
trusted SQL Server connection."


How can i fix this. Please let me know, as i have to do it for my
final year project?


SQL server logins aren't "Windows logins", so if you are using Windows authentication
(integrated security) you'll have to create windows accounts, when using SQL logins you have
to create SQL accounts. Note that you can also confifigure SQL server to use both SQL and
WIndows authentication, in which case you can use a mix of both.

Willy.
 
Back
Top