Author |
Topic |
haibec
Yak Posting Veteran
54 Posts |
Posted - 2008-10-20 : 04:55:22
|
Hi All!I want a script creat 1000000 account ( ag0000001 to ag1000000) with password different . Passwod include 2 field a feild PASS encript by Base64 and a field TEXT_PASS is password as text Thank |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-10-20 : 05:17:47
|
for creating logins use a computed column based on an identity column to concatenate 'ag' to generated value. for generating passwords see below. it should give you an idea. tweak it to get password in required format.http://sqlblogcasts.com/blogs/madhivanan/archive/2007/11/20/random-password-generator.aspx |
 |
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2008-10-20 : 06:15:43
|
Base64 encoded? E 12°55'05.63"N 56°04'39.26" |
 |
|
haibec
Yak Posting Veteran
54 Posts |
Posted - 2008-10-20 : 06:21:49
|
quote: Originally posted by Peso Base64 encoded? E 12°55'05.63"N 56°04'39.26"
Yes |
 |
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2008-10-20 : 06:23:53
|
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=67831&SearchTerms=mime64 E 12°55'05.63"N 56°04'39.26" |
 |
|
haibec
Yak Posting Veteran
54 Posts |
Posted - 2008-10-20 : 06:37:59
|
quote: Originally posted by Peso http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=67831&SearchTerms=mime64 E 12°55'05.63"N 56°04'39.26"
i was run this function . but don't same my question. Plase help me detail |
 |
|
hanbingl
Aged Yak Warrior
652 Posts |
Posted - 2008-10-20 : 13:42:40
|
declare @i intdeclare @password varchar(8)set @i = 1while @i <= 1000000beginset @password=''select @password=@password+char(n) from(select top 8 number as n from master..spt_valueswhere type='p' and number between 48 and 122order by newid()) as tinsert into tabl1(username, passtxt, pass64)select 'ag'+right('0000000'+cast(@i as varchar(7)),7), @password, dbo.fnMIME64Encode(0,@password)set @i = @i + 1end |
 |
|
haibec
Yak Posting Veteran
54 Posts |
Posted - 2008-10-20 : 22:41:10
|
quote: Originally posted by hanbingl declare @i intdeclare @password varchar(8)set @i = 1while @i <= 1000000beginset @password=''select @password=@password+char(n) from(select top 8 number as n from master..spt_valueswhere type='p' and number between 48 and 122order by newid()) as tinsert into tabl1(username, passtxt, pass64)select 'ag'+right('0000000'+cast(@i as varchar(7)),7), @password, dbo.fnMIME64Encode(0,@password)set @i = @i + 1end
Okie. I was insert succesfull . Now , i want passwors only letter (letter not capitals) and number ? |
 |
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2008-10-21 : 02:53:11
|
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=78859&SearchTerms=password E 12°55'05.63"N 56°04'39.26" |
 |
|
hanbingl
Aged Yak Warrior
652 Posts |
Posted - 2008-10-21 : 10:38:37
|
change where type='p' and number between 48 and 122 to where type='p' and number between 97 and 122 |
 |
|
haibec
Yak Posting Veteran
54 Posts |
Posted - 2008-10-22 : 00:26:15
|
quote: Originally posted by hanbingl change where type='p' and number between 48 and 122 to where type='p' and number between 97 and 122
Okie thank you very much |
 |
|
|