So close and yet so far away... is there an "odbcping" type program? If we
run "odbcping" on the SQL2000 server, it works fine (to itself of course,
but using the ODBC settings AFAIK).

[root=pts/1]2:08pm@content:{/usr/local/openlink/bin}> setenv
        LD_LIBRARY_PATH=/usr/local/openlink/odbcsdk/lib
        ODBCINSTINI=/usr/local/openlink/bin/odbcinst.ini
        ODBCINI=/usr/local/openlink/bin/odbc.ini

[root=pts/1]2:08pm@content:{/usr/local/openlink/bin}> cat odbc.ini
        [ODBC Data Sources]
        OpenLink       = OpenLink Generic ODBC Driver
        TattooReader   = Tattoo Database on SQL2000 server

        [TattooReader]
        Driver          = /usr/local/openlink/lib/oplodbc.so.1
        Description     = TattooReader
        Host            = 10.2.3.11
        ServerType      = SQLServer 2000
        FetchBufferSize = 99
        UserName        = Tattoo_reader
        Password        = a4w59
        Database        = wt_updater_checkin
        ServerOptions   =
        ConnectOptions  =
        Options         =
        ReadOnly        = yes
        Trace           = 0
        TraceFile       = /tmp/iodbc.trace

        [OpenLink]
        Driver          = /usr/local/openlink/lib/oplodbc.so.1
        Description     = Sample OpenLink DSN
        Host            = 10.2.3.11
        ServerType      = SQLServer 2000
        FetchBufferSize = 99
        UserName        = Tattoo_reader
        Password        = a4w59
        Database        = wt_updater_checkin
        ServerOptions   =
        ConnectOptions  =
        Options         =
        ReadOnly        = yes
        Trace           = 0
        TraceFile       = /tmp/iodbc.trace

        [Default]
        Driver = /usr/local/openlink/lib/oplodbc.so.1

[root=pts/1]2:08pm@content:{/usr/local/openlink/bin}> cat odbcinst.ini
        [ODBC Drivers]
        OpenLink Generic ODBC Driver = Installed
        TattooReader = Installed

        [OpenLink Generic ODBC Driver]
        Driver = /usr/local/openlink/lib/oplodbc.so.1
        Setup  = /usr/local/openlink/lib/oplodbc.so.1

        [TattooReader]
        Driver = /usr/local/openlink/lib/oplodbc.so.1
        Setup  = /usr/local/openlink/lib/oplodbc.so.1


[root=pts/3]3:59pm@content:{/usr/local/openlink/bin}> ./odbctest
OpenLink ODBC Demonstration program
This program shows an interactive SQL processor
Enter ODBC connect string (? shows list): ?
DSN                            | Description
---------------------------------------------------------------
OpenLink                       | OpenLink Generic ODBC Driver
TattooReader                   | Tattoo Database on SQL2000 server

Enter ODBC connect string (? shows list): DSN=TattooReader
select * from blah



exit

the only way to exit this is to kill the process, "exit" doesn't work.
So, I'm not getting any errors anymore, but it's not doing anything either.

Now we haven't ruled out the firewall as a possible problem here, however I
can:
[root=pts/3]3:59pm@content:{/usr/local/openlink/bin}> telnet 10.2.3.11 1433
Trying 10.2.3.11...
Connected to 10.2.3.11.
Escape character is '^]'.
^[
^[^[
^[^[^[
^[^[
^[
^[
but as you can see, ^] doesn't Escape. In fact, the only way to stop it is
to kill the telnet process from another shell. SHOULD I be able to do
anything from the telnet prompt? Like with HTTP, you can get it to spew out
a web page, is there some command to run to make sure the connection is all
good in both directions?

[root=pts/2]4:03pm@content:{/root}> netstat
Active Internet connections (w/o servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State
tcp        0      0 xxx.xxx.xxx.xxx:1096     10.2.3.11:1433
ESTABLISHED

notice that the ports don't line up. should they? my MIS guy says that's
normal and there's just a pool of ports the OS picks from and will 'map'
them correctly (in lay terms).

and FWIW, the PHP example STILL segfaults. I would expect it to through up
an error, not segfault... that can't be good can it?

daevid.com

> -----Original Message-----
> From: Andrew Hill [mailto:[EMAIL PROTECTED]]
> Sent: Monday, April 02, 2001 8:08 PM
> To: Daevid Vincent; [EMAIL PROTECTED]; PHP General
> Subject: Re: [PHP-DB] PHP4.0.4 segfaults with odbc_pconnect
>
>
> Daevid,
>
>
> connection script snipped (looked fine)
>
> > $dsn="DSN=OpenLink"; // this is a valid DSN set up in the above odbc.ini
>
> > //$conn_id = odbc_connect("DSN=OpenLink;UID=daevid;PWD=secret","","");
> > ?>
> > ----------------------
> >
> > [OpenLink]
> > Driver          = /usr/local/openlink/lib/oplodbc.so.1
> > Description     = Sample OpenLink DSN
> > Host            = 10.2.3.11
> > ServerType      = Oracle 8.1.x
> > FetchBufferSize = 99
> > UserName        = daevid
> > Password        = secret
> > Database        = mydatabase
> > ServerOptions   =
> > ConnectOptions  =
> > Options         =
> > ReadOnly        = yes
> > Trace           = 0
> > TraceFile       = /tmp/iodbc.trace
> >
> > [Default]
> > Driver = /usr/local/openlink/lib/oplodbc.so.1
> >
> > Is "ServerType = Oracle 8.1.x" right?
> > I'm trying to connect to a MS SQL2000 server on a Win2k box:
>
> No, that is just a sample DSN - you will want to edit it to match your
> configureation or add an additional one wiht server type SQLServer 2000
> Database is the sqlserver catalog, e.g. northwind, pubs, or yours.
>
> When adding a DSN, add a matching section at the top as well:
>
> [ODBC Data Sources]
>     OpenLink       = OpenLink Generic ODBC Driver //o
>     SQLServer2k
>
> [SQLServer2k]
> Driver          = /usr/local/openlink/lib/oplodbc.so.1
> Host            = 10.2.3.11
> FetchBufferSize = 99
> ServerType      = SQLServer2000
> UserName        = daevid
> Password        = secret
> Database        = mydatabase
>
> You can add the other options as you see fit, or even override these by
> setting the RulesBook on the server side.
>
> Everything else looks fine.
>
> This assumes you have the server-side components of our Multi-Tier driver
> installed on the SQLServer box.  It might be wise to add a DSN on
> the server
> using the OpenLink driver, to test you have the server-side components
> installed properly.
>
> If you've not yet installed them, the SQLServer agent / Request Broker
> components are at: http://www.openlinksw.com/software/open40/ntadmzzz.zip
>
> Checking the docs out for configuring OpenLink Drivers might not hurt
> either, and might have saved you time setting up your initial connection:
> http://www.openlinksw.com/info/docs/rel4doc/index.html
> >
> > [root=pts/2]7:35pm@content:{/usr/local/openlink/bin}> cat odbcinst.ini
> > [ODBC Drivers]
> > OpenLink Generic ODBC Driver = Installed
> >
> > [OpenLink Generic ODBC Driver]
> > Driver = /usr/local/openlink/lib/oplodbc.so.1
> > Setup  = /usr/local/openlink/lib/oplodbc.so.1
> >
> > [root=pts/2]7:35pm@content:{/usr/local/openlink/bin}> ./odbctest
> > OpenLink ODBC Demonstration program
> > This program shows an interactive SQL processor
> >
> > Enter ODBC connect string (? shows list): ?
> >
> > DSN                            | Description
> > ---------------------------------------------------------------
> > OpenLink                       | OpenLink (MT)
> >
> > Enter ODBC connect string (? shows list): OpenLink
> > [iODBC][Driver Manager]Dialog failed, SQLSTATE=IM008
>
> Syntax problem here - odbctest takes the argument "DSN=DSN_Name", not just
> the DSN_Name
> >
> > Have a nice day.
> >
>
> You obviously have the ODBCINI set properly in the environmnet,
> or odbctest
> wouldn't show your DSNs.
>
> So fix the ServerType, ensure working server-side components, and change
> your connection syntax for odbctest - you actually are just about there.
>
> Let me know if you need additional assistance.
>
> Best regards,
> Andrew
> ---------------------------------------
> Andrew Hill - OpenLink Software
> Director Technology Evangelism
> eBusiness Infrastructure Technology
> http://www.openlinksw.com
>


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to