How To Change the Password of a Login Name in MS SQL Server?
Submitted by: AdministratorIf a developer lost the password of his or her login name, you can reset the password with the "ALTER LOGIN" statement as shown in this tutorial example:
-- Login with sa
ALTER LOGIN ggl_DBA WITH PASSWORD = 'globalguideline';
GO
Command(s) completed successfully.
ggl_DBA's password is changed now. Try it with the SQLCMD tool:
C:>SQLCMD -S LOCALHOSTSQLEXPRESS -U ggl_DBA -P globalguideline
1> QUIT
You can also use the "ALTER LOGIN" to change your own password.
Submitted by: Administrator
-- Login with sa
ALTER LOGIN ggl_DBA WITH PASSWORD = 'globalguideline';
GO
Command(s) completed successfully.
ggl_DBA's password is changed now. Try it with the SQLCMD tool:
C:>SQLCMD -S LOCALHOSTSQLEXPRESS -U ggl_DBA -P globalguideline
1> QUIT
You can also use the "ALTER LOGIN" to change your own password.
Submitted by: Administrator
Read Online MS SQL Server Job Interview Questions And Answers
Top MS SQL Server Questions
☺ | What Is a Transact-SQL Statement Batch in MS SQL Server? |
☺ | What Happens If Strings Are Casted into Wrong Code Pages in MS SQL Server? |
☺ | How To Write Character String Constants or Literals in MS SQL Server? |
☺ | How To Convert a Numeric Expression from One Data Type to Another? |
☺ | How To Concatenate Two Binary Strings Together? |
Top Databases Programming Categories
☺ | RDBMS Interview Questions. |
☺ | SQL Interview Questions. |
☺ | SSRS Interview Questions. |
☺ | Database Administrator (DBA) Interview Questions. |
☺ | Sybase Interview Questions. |