Setting a username and password in SQL Server

Tags:
SQL Server
SQL Server administration
SQL Server authentication
SQL Server connectivity
How do I set the username and password in SQL Server to allow connection to the database?
ASKED: November 10, 2008  7:37 PM
UPDATED: January 29, 2014  4:52 PM

Answer Wiki

Thanks. We'll let you know when a new response is added.

New Logins to the SQL Server are created with the CREATE LOGIN command. You use the same command to create both a SQL Login or a Windows Login.

CREATE LOGON YourUserName
WITH PASSWORD = 'YourPassword';

CREATE LOGON YourCompany\YourUserName FROM WINDOWS;

If you are using SQL 2000 or order a different command is used.

Discuss This Question: 2  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • yngwie

    i have a problem when i get in website the windows security is show me message : Warning this server is Requesting that your username and password be sent in an inscure manner ... how can i disable it or remove this username and Pass. pls help me i can't get in any website   

    10 pointsBadges:
    report
  • TomLiotta
    i have a problem when i get in website...   If you can explain what that has to do with setting a user/password for SQL Server, some discussion might be possible.   If you can't, then you should open your own question rather than trying to take over an unrelated thread. Future members will be better able to find answers through searches if threads are consistent.   When you open your own question, please be sure to include a reference to a web site that shows the problem.   Tom
    125,585 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following