Tag Archives: SQL Server

How to Change SQL Server sa User’s Password

Problem:

You are a Windows Administrator and you can log in SQL server instance. However you cannot access databases.
You want to log in the SQL server instance under sa user but you forget the sa user’s password.
You cannot the sa user’s password using SQL Server Management Studio.

Solution:

1. Open cmd.exe and execute commands below. Replace MSSQL$SQLEXPRESS with your SQL service name and localhost\SQLEXPRESS with your SQL instance.

net stop MSSQL$SQLEXPRESS
net start MSSQL$SQLEXPRESS /m"SQLCMD"
sqlcmd -S localhost\SQLEXPRESS

2. Type and press Enter for each line below.

ALTER LOGIN [sa] WITH DEFAULT_DATABASE=[master]
GO
USE [master]
GO
ALTER LOGIN [sa] WITH PASSWORD=N'Password@1234'
GO
exit

3. Open cmd.exe and execute commands below.

net stop MSSQL$SQLEXPRESS
net start MSSQL$SQLEXPRESS

4. Open SQL Server Management Studio and log in the SQL server using the sa account.

Topic 7 – Introduction to Database Management Systems

Why do I need to learn about database management systems?

Your software must help users to do their work. The most important part of the users’ work is the information. You need to learn about database management systems to store, manipulate, retrieve and secure this information.

What can I do after finishing learning database management systems?

You can create enterprise systems, such as airlines and railways, banking, education, telecommunications, digital libraries and digital publishing, finance, sales, health care information systems.

It sounds interesting! What should I do now?

Learning about database management systems requires a lot of effort. First you need to learn how to use database management systems.

Please read
– this Ignatius Fernandez (2015). Beginning Oracle Database 12c Administration: From Novice to Professional. Apress book, or
– this Adam Jorgensen et al. (2012). Microsoft SQL Server 2012 Bible. Wiley book, or
– this Vinicius M. Grippa and Sergey Kuzmichev (2021). Learning MySQL. O’Reilly Media book, or
– this Regina O. Obe and Leo S. Hsu (2017). PostgreSQL Up and Running. O’Reilly Media book.

After that please read
– this Jeff Carpenter and Eben Hewitt (2020). Cassandra: The Definitive Guide: Distributed Data at Web Scale. O’Reilly Media book, and
– this Bradshaw Shannon, Eoin Brazil and Kristina Chodorow (2019). MongoDB: The Definitive Guide: Powerful and Scalable Data Storage. 3rd Edition. O’Reilly Media book.

Terminology Review:

  • Database Management Systems
  • Relational Databases
  • (Oracle) Tablespaces, Datafiles, and Objects
  • (Oracle) Databases, Instances, Schemas
  • Entity-Relationship Model
  • SQL, TSQL
  • Stored Procedures
  • Functions
  • Relational Model
  • Joins
  • Subqueries
  • Views
  • Common Table Expressions
  • Indexes
  • Recovery
  • Replication
  • NoSQL
  • Key-Value Databases
  • Document Databases
  • Column-Family Databases

After finishing learning about database management systems please click Topic 8 – Introduction to Web Application Development to continue.