Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Windows 2000 Command Line Testing of Oracle System DSN

Re: Windows 2000 Command Line Testing of Oracle System DSN

From: Mark Bole <makbo_at_pacbell.net>
Date: Wed, 21 Sep 2005 18:27:39 GMT
Message-ID: <vChYe.1281$OC2.1129@newssvr21.news.prodigy.com>


ST1138_at_gmail.com wrote:

> Hi,
>
> I am currently configuring a server with over 200 "Oracle in OraHome92"
> System DSNs.
>
> As you can imagine this is a long and loborious process so to alleviate
> that as far as possible I have created a dos batch file which uses the
> "odbcconf configsysdsn" command to create the DSNs.
>
> However, I am unsure how to recreate the "test connection" facility
> which exists when manually performing the task through Windows Admin
> tools. There should in theory be a command line equivalent for almost
> every process in Windows - does anyone have any idea at all how to do
> this?
>

If there is not a native Windows tool, then one way to do this easily (after a slightly more difficult one-time setup :-( ) is to use Perl DBI with the DBD::ODBC driver. Within a simple Perl script, you can use the following connect string

@dbi:ODBC:yourDSN

and test it to your heart's content, completely automated for all 200 of your DSNs. In fact, coupled with the DBD::Oracle driver, I have been able to use Perl on Windows to conveniently "migrate" table definitions from Oracle to MS Access in a batch mode (not your question, but still a nice capability).

The "one time setup" (Perl and DBI and DBD::ODBC for Windows) may range from simple to impossible, depending on your experience with Perl. ActiveState Perl for Windows distribution with PPM (Perl package manager) is the easiest to use, although I recall reading somewhere that the DBD drivers for Windows are a little behind. I have used this successfully with Oracle version 9.2, DBD::ODBC version 1.06, and Perl version 5.6 "Binary build 630 provided by ActiveState Tool Corp. http://www.ActiveState.com" -- YMMV.

-Mark Bole Received on Wed Sep 21 2005 - 13:27:39 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US