Answered by:
how to create login and password for sql authentication mode?

Question
-
how to create login and password for sql authentication mode?
I forget or did not created login and password at the time of installation.
I am the administrator.
DBMS:SQL SERVER 2005\SQLEXPRESS
thanks,
bharathiMonday, February 2, 2009 7:42 AM
Answers
-
How to: Create a SQL Server Login
Most Windows users need a SQL Server login to connect to SQL Server. This topic shows how to create a SQL Server login.
To create a SQL Server login that uses Windows Authentication (SQL Server Management Studio)
-
In SQL Server Management Studio, open Object Explorer and expand the folder of the server instance in which to create the new login.
-
Right-click the Security folder, point to New, and then click Login.
-
On the General page, enter the name of a Windows user in the Login name box.
-
Select Windows Authentication.
-
Click OK.
To create a SQL Server login that uses SQL Server Authentication (SQL Server Management Studio)
-
In SQL Server Management Studio, open Object Explorer and expand the folder of the server instance in which to create the new login.
-
Right-click the Security folder, point to New, and then click Login.
-
On the General page, enter a name for the new login in the Login name box.
-
Select SQL Server Authentication. Windows Authentication is the more secure option.
-
Enter a password for the login.
-
Select the password policy options that should be applied to the new login. In general, enforcing password policy is the more secure option.
-
Click OK.
To create a SQL Server login that uses Windows Authentication using Transact-SQL
To create a SQL Server login that uses SQL Server Authentication (Transact-SQL)
-
In Query Editor, enter the following Transact-SQL command:
CREATE LOGIN <login name> WITH PASSWORD = '<password>' ; GO
Link: http://msdn.microsoft.com/en-us/library/aa337562.aspx
Hope it is helpful.
Dannol
Mark as Answer if it helps. This posting is provided "AS IS" with no warranties, confers no rights.- Proposed as answer by Deepak Rangarajan Monday, February 2, 2009 1:51 PM
- Marked as answer by bharathi_m Monday, February 2, 2009 3:02 PM
Monday, February 2, 2009 7:50 AMAnswerer -
-
Hi bhrathi,
"SQL authentication" is also "windows authentication". SQL Server has two authentication options - Windows and Mixed Mode (Windows/SQL).
If you don't yet have SQL Server Management Studio Express (SSMS), you can download it from here.
Log into your server via SSMS (using Windows Authentication). In the Object Explorer (left pane), right-click on the server, and select Properties. On the security page, ensure that "SQL Server and Windows Authentication Mode" is checked. Expand security, then Logins. Right-click on "sa", and select "properties". You can set or reset the password for the sa account on the properties screen.
You can create additional logins by right-clicking on Logins, and selecting New Login.
Does this help?
Aaron Alton | thehobt.blogspot.com- Marked as answer by bharathi_m Monday, February 2, 2009 3:03 PM
Monday, February 2, 2009 7:51 AM -
Try this,
CREATE
LOGIN [TestForums] WITH PASSWORD=N'MicroSOFT77', DEFAULT_DATABASE=[master], DEFAULT_LANGUAGE=[us_english], CHECK_EXPIRATION=OFF, CHECK_POLICY=ONGO
EXEC
sys.sp_addsrvrolemember @loginame = N'TestForums', @rolename = N'sysadmin'
Rajesh Jonnalagadda http://www.ggktech.com- Edited by Rajesh Jonnalagadda Monday, February 2, 2009 8:15 AM
- Marked as answer by bharathi_m Monday, February 2, 2009 3:03 PM
Monday, February 2, 2009 7:52 AM -
Rajesh Jonnalagadda said:
Try this,
CREATE
LOGIN [sa] WITH PASSWORD=N'Test', DEFAULT_DATABASE=[master], DEFAULT_LANGUAGE=[us_english], CHECK_EXPIRATION=OFF, CHECK_POLICY=ONGO
EXEC
sys.sp_addsrvrolemember @loginame = N'sa', @rolename = N'sysadmin'
Rajesh Jonnalagadda http://www.ggktech.com
Rajesh,
The sa login is created automatically - you don't need to create it manually.
Aaron Alton | thehobt.blogspot.com- Marked as answer by bharathi_m Monday, February 2, 2009 3:03 PM
Monday, February 2, 2009 7:59 AM
All replies
-
How to: Create a SQL Server Login
Most Windows users need a SQL Server login to connect to SQL Server. This topic shows how to create a SQL Server login.
To create a SQL Server login that uses Windows Authentication (SQL Server Management Studio)
-
In SQL Server Management Studio, open Object Explorer and expand the folder of the server instance in which to create the new login.
-
Right-click the Security folder, point to New, and then click Login.
-
On the General page, enter the name of a Windows user in the Login name box.
-
Select Windows Authentication.
-
Click OK.
To create a SQL Server login that uses SQL Server Authentication (SQL Server Management Studio)
-
In SQL Server Management Studio, open Object Explorer and expand the folder of the server instance in which to create the new login.
-
Right-click the Security folder, point to New, and then click Login.
-
On the General page, enter a name for the new login in the Login name box.
-
Select SQL Server Authentication. Windows Authentication is the more secure option.
-
Enter a password for the login.
-
Select the password policy options that should be applied to the new login. In general, enforcing password policy is the more secure option.
-
Click OK.
To create a SQL Server login that uses Windows Authentication using Transact-SQL
To create a SQL Server login that uses SQL Server Authentication (Transact-SQL)
-
In Query Editor, enter the following Transact-SQL command:
CREATE LOGIN <login name> WITH PASSWORD = '<password>' ; GO
Link: http://msdn.microsoft.com/en-us/library/aa337562.aspx
Hope it is helpful.
Dannol
Mark as Answer if it helps. This posting is provided "AS IS" with no warranties, confers no rights.- Proposed as answer by Deepak Rangarajan Monday, February 2, 2009 1:51 PM
- Marked as answer by bharathi_m Monday, February 2, 2009 3:02 PM
Monday, February 2, 2009 7:50 AMAnswerer -
-
Hi bhrathi,
"SQL authentication" is also "windows authentication". SQL Server has two authentication options - Windows and Mixed Mode (Windows/SQL).
If you don't yet have SQL Server Management Studio Express (SSMS), you can download it from here.
Log into your server via SSMS (using Windows Authentication). In the Object Explorer (left pane), right-click on the server, and select Properties. On the security page, ensure that "SQL Server and Windows Authentication Mode" is checked. Expand security, then Logins. Right-click on "sa", and select "properties". You can set or reset the password for the sa account on the properties screen.
You can create additional logins by right-clicking on Logins, and selecting New Login.
Does this help?
Aaron Alton | thehobt.blogspot.com- Marked as answer by bharathi_m Monday, February 2, 2009 3:03 PM
Monday, February 2, 2009 7:51 AM -
Try this,
CREATE
LOGIN [TestForums] WITH PASSWORD=N'MicroSOFT77', DEFAULT_DATABASE=[master], DEFAULT_LANGUAGE=[us_english], CHECK_EXPIRATION=OFF, CHECK_POLICY=ONGO
EXEC
sys.sp_addsrvrolemember @loginame = N'TestForums', @rolename = N'sysadmin'
Rajesh Jonnalagadda http://www.ggktech.com- Edited by Rajesh Jonnalagadda Monday, February 2, 2009 8:15 AM
- Marked as answer by bharathi_m Monday, February 2, 2009 3:03 PM
Monday, February 2, 2009 7:52 AM -
Rajesh Jonnalagadda said:
Try this,
CREATE
LOGIN [sa] WITH PASSWORD=N'Test', DEFAULT_DATABASE=[master], DEFAULT_LANGUAGE=[us_english], CHECK_EXPIRATION=OFF, CHECK_POLICY=ONGO
EXEC
sys.sp_addsrvrolemember @loginame = N'sa', @rolename = N'sysadmin'
Rajesh Jonnalagadda http://www.ggktech.com
Rajesh,
The sa login is created automatically - you don't need to create it manually.
Aaron Alton | thehobt.blogspot.com- Marked as answer by bharathi_m Monday, February 2, 2009 3:03 PM
Monday, February 2, 2009 7:59 AM -
Aaron,
I just given "sa" as example now i edited my post please check
Rajesh Jonnalagadda http://www.ggktech.comMonday, February 2, 2009 8:17 AM -
Sounds good, Rajesh. Just didn't want anyone to get confused ;-)
Aaron Alton | thehobt.blogspot.comTuesday, February 3, 2009 1:36 AM