Home > SQL Server > How to change SQL Server password with SQLCMD

How to change SQL Server password with SQLCMD


In some situation, we need to change password for our SQL Server user account via SQLCMD as remote or local connection, it’s not really new but it’s too important, just follow these below steps:

  1. Open CMD with SQLCMD utility
  2. Connect to SQL instance with sysadmin authorization
  3. Execute script to modify user metadata

ALTER LOGIN ‘[your user account]’ WITH PASSWORD = N'[your new password]’;

 

Advertisements
Categories: SQL Server
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: