Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

using ODBCCONF.exe to make a System DSN entry

Posted on 2003-03-26
10
Medium Priority
?
5,607 Views
Last Modified: 2007-12-19
I want to create a batch file taht will register a system DSN for use with an ASP web app

basically

I need it to connect using SQL Server Driver
DSN = test
uid = test
pwd = pwd
Server = (local)
DB = test

And no other options

I've tried to get it in but the best I can do is register the system DSN as test but it is taking none of my other options
0
Comment
Question by:overlord64
10 Comments
 

Expert Comment

by:tarnaigy
ID: 8210798
Hi!

Is there any specific reason that you want to use the ODBCCONF utility?

In my opinion it would be much easier to create a DSN "template" manually with the ODBC Data Source Administrator, then export the DSN's registry key into a .reg file via regedit (wich can be used to import the settings back into any Windows system). They can be found under the HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI key.

The import is also very simple. Ex.:

regedit /S myreg.reg

imports the .reg file silently into the registry.

Sometimes the simpliest solutions are the best. I hope I could help you out at least temporarly.
0
 

Author Comment

by:overlord64
ID: 8215297
That won't work as I need to edit the ODBC twice and would much rather do it via the odbcconf ... I just cna't figure out the attribute to use for user and pwd... the rest I can do
0
 

Author Comment

by:overlord64
ID: 8215304
as well the registry does not allow for me to change the password of the DSN entry which is the goal.

After the project is finished, the installation file will change the password to access the database as I am not to know what it is.

It takes it from the database (using initial DSN), modifies the ODBC connection to use the value pulled from the database and then deletes the installation user.

The best way I would like to do this is by odbcconf
0
Veeam Disaster Recovery in Microsoft Azure

Veeam PN for Microsoft Azure is a FREE solution designed to simplify and automate the setup of a DR site in Microsoft Azure using lightweight software-defined networking. It reduces the complexity of VPN deployments and is designed for businesses of ALL sizes.

 

Author Comment

by:overlord64
ID: 8215307
as well the registry does not allow for me to change the password of the DSN entry which is the goal.

After the project is finished, the installation file will change the password to access the database as I am not to know what it is.

It takes it from the database (using initial DSN), modifies the ODBC connection to use the value pulled from the database and then deletes the installation user.

The best way I would like to do this is by odbcconf
0
 

Author Comment

by:overlord64
ID: 8216554
using UID= and PWD = always gives me invalid keyword value pairs

until I remove the UID and PWD then it will work


basically I need to only know what those attributes are for SQL Server Driver


0
 

Expert Comment

by:tarnaigy
ID: 8216626
I'm not sure that the SQL Server driver allows you to set a password. SQL authentication can happen using a UID/PWD pair or NT authentication. In both cases it would be a serious security leak if you could set a password in ODBC to authenticate. If you store a PWD on the client (even coded) it's much easier to obtain it using reverse engineering or brute force cracking.

Try to exec ODBCCONF with only UID defined, see what happens.
0
 

Author Comment

by:overlord64
ID: 8222199
same thing ... invalid pairs...
Could be the security tho'...
I think it's mainly gonna have to be resolved with a manual change of the ODBC driver ...
0
 
LVL 17

Expert Comment

by:walterecook
ID: 10360553
No comment has been added lately, so it's time to clean up this TA.
I will leave the following recommendation for this question in the Cleanup topic area:

PAQ with points refunded

Please leave any comments here within the next four days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

walterecook
EE Cleanup Volunteer
0
 

Accepted Solution

by:
PashaMod earned 0 total points
ID: 10391214
PAQed, with points refunded (75)

PashaMod
Community Support Moderator
0

Featured Post

[Webinar On Demand] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this blog post, we’ll look at how using thread_statistics can cause high memory usage.
Creating a Cordova application which allow user to save to/load from his Dropbox account the application database.
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …
Suggested Courses

579 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question