Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6120575
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T15:41:02+00:00 2026-05-23T15:41:02+00:00

I want to add a user in SQL Server 2008 so I can use

  • 0

I want to add a user in SQL Server 2008 so I can use SQL Server Authentication instead Windows Authentication for connecting to SQL, and have tried this code to create a user with login:

CREATE login [newLog] with password = 'passnewLognewLog'

I get it done, but when I want to connect to SQL Server using SQL Authentication, I get this message

Cannot connect to “Mydb”
additional information: Login failed for user
‘newLog’. (Microsoft SQL Server,
Error: 18456 )

What am I missing here?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T15:41:02+00:00Added an answer on May 23, 2026 at 3:41 pm

    After creating the login, you need to add the user to the database. This example is from the sql server documentation for CREATE USER:

    CREATE LOGIN AbolrousHazem 
        WITH PASSWORD = '340$Uuxwp7Mcxo7Khy';
    USE AdventureWorks2008R2;
    CREATE USER AbolrousHazem FOR LOGIN AbolrousHazem;
    GO 
    

    Edit

    To test, I ran this T-SQL:

    create login Foo with password ='f00';
    go
    
    use TestDB
    create user Foo for Login Foo
    go
    

    and opened a connection successfully using this connection string:

    "Server=<server>; user id=Foo; password=f00; initial catalog=TestDB"
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

When a user tries to connect to a SQL Server Database through Windows Authentication
I have 4 SQL server(2008 version) tables 1) USER- to store user information (Fields
I have dbml with single table users i want add partial class for User
I have a table in SQL Server which looks like this: ID Code Name
We have a SQL Server database table that consists of user id, some numeric
I'm using SQL Server 2005. I have a payments table with payment id's, user
I have some images in a SQL Server database. I want to display them
In my sql server table, I want to add a computed column that is
I'm working on a multi-user internet database-driven website with SQL Server 2008 / LinqToSQL
Basically I have a windows form C# program that uses a SQL Server Express

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.