Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > VB Script

Vista - Check passwords for SA

Reply
 
Old 09-29-2008   #1 (permalink)
Carlos Felipe França da Fonseca


 
 

Check passwords for SA

I need to develop a script to connect to each SQL Server server, each
instance and each database, to verify if the SA and its password is
matching.
I have many servers, and some of them have more than one instance. Each
instance has more than one database.
I have the server and their respective password for the SA.
I just need to confirm if their passwords are matching.
Does anybody know the best way to do that?

Thanks,

Felipe



My System SpecsSystem Spec
Old 09-29-2008   #2 (permalink)
hb21l6


 
 

Re: Check passwords for SA


"Carlos Felipe França da Fonseca" <carlosfelipefranca@xxxxxx> wrote in
message news:%23HxlWLlIJHA.4324@xxxxxx
Quote:

>I need to develop a script to connect to each SQL Server server, each
>instance and each database, to verify if the SA and its password is
>matching.
> I have many servers, and some of them have more than one instance. Each
> instance has more than one database.
> I have the server and their respective password for the SA.
> I just need to confirm if their passwords are matching.
> Does anybody know the best way to do that?
>
> Thanks,
>
> Felipe
>
>
Yeah, its all possible, I've written one, but can't find the code in my
library. :O(
if i find it, i'll post it tomorrow.


Heres what I did.
You can to confirm if yours is the same as the one on the SQL server, you
can't get the SA password from the SQL server.
So its a True or False return you will get.

create a log file for your results.

create an array of sql servers
create an array of usernames and passwords.

Loop
access the sql server and list containing databases from the
sysobjects in the master table.
Loop
loop through the databases testing connection and writing
results to text file.
next
Next




My System SpecsSystem Spec
Old 10-02-2008   #3 (permalink)
Carlos Felipe França da Fonseca


 
 

Re: Check passwords for SA

Thanks for your reply.

I'm using ADODB.Connection object to access the SQL Server instances every
time it passes through the loop to read the server name and its respective
password for SA in an array. The problem is that ADO Open method does not
return any value informing whether the connection was established or not.
I was handling errors: immediately after calling ADO Open method, I was
verifying Err = 0 to register that the connection was really established.
But I'm not sure if this kind of handle is trustable enough. I'm looking for
something that returns this information.

Thanks,

Felipe

"hb21l6" <hb21l6@xxxxxx> wrote in message
news:CBFF7F32-202B-4256-8FE8-39CAA3B05B34@xxxxxx
Quote:

>
> "Carlos Felipe França da Fonseca" <carlosfelipefranca@xxxxxx> wrote in
> message news:%23HxlWLlIJHA.4324@xxxxxx
Quote:

>>I need to develop a script to connect to each SQL Server server, each
>>instance and each database, to verify if the SA and its password is
>>matching.
>> I have many servers, and some of them have more than one instance. Each
>> instance has more than one database.
>> I have the server and their respective password for the SA.
>> I just need to confirm if their passwords are matching.
>> Does anybody know the best way to do that?
>>
>> Thanks,
>>
>> Felipe
>>
>>
>
> Yeah, its all possible, I've written one, but can't find the code in my
> library. :O(
> if i find it, i'll post it tomorrow.
>
>
> Heres what I did.
> You can to confirm if yours is the same as the one on the SQL server, you
> can't get the SA password from the SQL server.
> So its a True or False return you will get.
>
> create a log file for your results.
>
> create an array of sql servers
> create an array of usernames and passwords.
>
> Loop
> access the sql server and list containing databases from the
> sysobjects in the master table.
> Loop
> loop through the databases testing connection and writing
> results to text file.
> next
> Next
>
>
>
>

My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
spell check wont check english/ Vista mail
Passwords Vista mail
Passwords Vista security
NTLM Passwords Linux NAS passwords Vista networking & sharing
Newbie: Nagios with nrpe_nt, check for diskspace; check services,returncode PowerShell


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46