![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| 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. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | 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 Specs![]() |
| | #2 (permalink) |
| | 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 > > 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 Specs![]() |
| | #3 (permalink) |
| | 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 Specs![]() |
![]() |
| 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 | |||