SQL script - TechRepublic
Question
May 24, 2012 at 01:32 AM
ll05197

SQL script

by ll05197 . Updated 14 years, 1 month ago

If I paste this in SQL management studio, new query and click execute, it will reset password for user E.
That is OK.

Use XDB
Go
UPDATE Users SET Locked=’0′, Deleted=’0′,
Password=0xE38AD214943DAAD1D64C102FAEC29DE
where UserName=’E’;

But I would like to use a script, if possible

When I run a backup, the script starts with the following

SqlCmd -E -S (local)\INSTANCE -Q……….etc

so I assume that the reset script should start with something similar

How do I do?

Thanx in advance

This discussion is locked

All Comments