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 Administration (2000)
 ADMIN PASSWORD

Author  Topic 

jacksonbilly
Starting Member

1 Post

Posted - 2004-09-28 : 00:50:18
Our sql server clients have odbc connections set up to connect to the sql database. The username is "sa" and the password is blank. Well, we plan on implementing an admin password on our sql srvr. We can not use windows authentication at this time so what I am wanting to know is: is there a way to automate pushing out our new username and password to each ODBC connection on each of the computers in our domain?

Thanks in advance,

George Jackson

jsmith8858
Dr. Cross Join

7423 Posts

Posted - 2004-09-28 : 09:07:16
hate to say this, but -- nope !

if all of the connections are through MS Access databases or Crystal Reports or some consistent application, and all applications/files that connect are stored on the network in locations that you can identify beforehand (i.e., not stored on various C:\ drives on the workstations), then you could write some code to find these files, open them, and edit/alter all connect strings.

I have actually done this with MS Access -- at my old company, when we upgraded the Accounting system, a few key tables changed structure, and we had like 50 linked MS Access databases out there (don't ask !), but all stored on a particular network share. I wrote code to find all MDB files, open them in VB, find all linked tables with a matching ODBC connect to the Accounting system and matching the tables, and then to refresh the link.

so you can do stuff like that, but not anything that will "intercept" connections as they come and then change them at the client.

- Jeff
Go to Top of Page

MuadDBA

628 Posts

Posted - 2004-09-28 : 13:07:16
I am surprised the good doctor neglected to tell you to slap the @#$%%^ out of whoever:

a) set up the sa account with a blank password

and

b) gave out the sa password for everyone to use for their ad-hoc or application dbs.

Please please please take this as an opportunity to correct that problem.
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2004-09-28 : 13:09:21
ODBC DSNs are just registry entries. So you could deploy this via a login script. Have the login script launch a .reg file that contains the DSN changes.

Tara
Go to Top of Page

jsmith8858
Dr. Cross Join

7423 Posts

Posted - 2004-09-28 : 14:37:16
I thought of that -- but it depends if the connection is with or without a DSN. If the connections are using ODBC but without using DSN's, you'd need to manually edit the connect strings. If DSN's are used, then Tara definitely has the right approach -- that's the way to do it, use the log-in script and import .reg files.

- Jeff
Go to Top of Page
   

- Advertisement -