Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 creat 1000000 account with password different

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
Go to Top of Page

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"
Go to Top of Page

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
Go to Top of Page

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"
Go to Top of Page

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
Go to Top of Page

hanbingl
Aged Yak Warrior

652 Posts

Posted - 2008-10-20 : 13:42:40
declare @i int
declare @password varchar(8)

set @i = 1

while @i <= 1000000
begin

set @password=''
select @password=@password+char(n) from
(
select top 8 number as n from master..spt_values
where type='p' and number between 48 and 122
order by newid()
) as t

insert into tabl1(username, passtxt, pass64)
select 'ag'+right('0000000'+cast(@i as varchar(7)),7), @password, dbo.fnMIME64Encode(0,@password)

set @i = @i + 1
end
Go to Top of Page

haibec
Yak Posting Veteran

54 Posts

Posted - 2008-10-20 : 22:41:10
quote:
Originally posted by hanbingl

declare @i int
declare @password varchar(8)

set @i = 1

while @i <= 1000000
begin

set @password=''
select @password=@password+char(n) from
(
select top 8 number as n from master..spt_values
where type='p' and number between 48 and 122
order by newid()
) as t

insert into tabl1(username, passtxt, pass64)
select 'ag'+right('0000000'+cast(@i as varchar(7)),7), @password, dbo.fnMIME64Encode(0,@password)

set @i = @i + 1
end



Okie. I was insert succesfull . Now , i want passwors only letter (letter not capitals) and number ?
Go to Top of Page

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"
Go to Top of Page

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
Go to Top of Page

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
Go to Top of Page
   

- Advertisement -