user3688418
user3688418

Reputation:

How to generate random passwords in SQL Server using stored procedure?

SQL Server supports many applications and most applications have a feature to store passwords. Is there any tip from which I can cover a simple stored procedure to generate random passwords that can be incorporated into my applications?

Upvotes: 1

Views: 2578

Answers (2)

Eralper
Eralper

Reputation: 6622

Please read the tutorial SQL Password Generator . You will find how you can customize password generator and SQL source codes of a sample stored procedure which generates random password according to the rules defined in customization

As a result you will be creating random passwords by executing following script

DECLARE @pwd varchar(25)
EXECUTE Generate_Password @pwd OUTPUT
SELECT @pwd 

I hope it helps,

Upvotes: 0

trailmax
trailmax

Reputation: 35116

Is GUID good enough for a password? use NEWID() to generate new GUID and pass it as a password.

Upvotes: 3

Related Questions