Is ora_session_mode working for Oracle 9i?

2002-11-26 Thread Lin Feng

Hi,

I tried to connect to a Oracle 9i db (system as sysdba) with the following:

my $dbh = DBI->connect('dbi:Oracle:AM922X', 'system', 'pass1',  { ora_ession_mode  
=> 2 });

and I got the following:

DBI->connect(AM922X) failed: ORA-01031: insufficient privileges (DBD ERROR: 
OCISessionBegin) at test3.pl line 9 (i.e. the above line).

The same result when I login to the unix box as oracle or a regular user. Am I missing 
something? Any workaround?

Thanks for your help.
Lin




 



-
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now


Re: (Fwd) DBD::Oracle / alarm() problem

2002-11-26 Thread Tim Bunce
On Tue, Nov 26, 2002 at 04:52:10PM -0800, Josh Wilmes wrote:
> 
> Um..  that's what I already did (see my message below)
> 
> Doesn't answer my question.

Um.. neither did I. Sorry, in a rush.

Answer: I don't know. Talk to Oracle.

Tim.

> --Josh
> 
> At 0:41 on 11/27/2002 GMT, Tim Bunce <[EMAIL PROTECTED]> wrote:
> 
> > Google is your friend:
> > 
> > http://www.google.com/search?q=dbi+oracle+alarm+signal
> > eg
> > http:[EMAIL PROTECTED]/msg13194.html
> > 
> > Tim.
> > 
> > On Tue, Nov 26, 2002 at 10:32:27AM -0800, Josh Wilmes wrote:
> > > 
> > > .. so what now? :)
> > > 
> > > If this is an issue in the oracle libraries, is there a version that is 
> > > known to work on solaris?
> > > 
> > > --Josh
> > > 
> > > At 9:17 on 11/21/2002 GMT, Tim Bunce <[EMAIL PROTECTED]> wrote:
> > > 
> > > > - Forwarded message from Josh Wilmes <[EMAIL PROTECTED]> -
> > > > 
> > > > Delivered-To: [EMAIL PROTECTED]
> > > > To: [EMAIL PROTECTED]
> > > > Subject: DBD::Oracle / alarm() problem
> > > > From: Josh Wilmes <[EMAIL PROTECTED]>
> > > > Reply-To: Josh Wilmes <[EMAIL PROTECTED]>
> > > > Date: Wed, 20 Nov 2002 14:40:53 -0800
> > > > 
> > > > 
> > > > Tim,
> > > > 
> > > > I appear to be experiencing the problem described at
> > > > 
> > > >   http:[EMAIL PROTECTED]/msg13194.html
> > > > and
> > > >   http://groups.google.com/groups?selm=93he36%24egc%241%40nnrp1.deja.com
> > > > 
> > > > This script demonstrates the issue:
> > > > 
> > > > 
> > > > #!/usr/SD/perl/bin/perl
> > > > 
> > > > #use DBD::Oracle;
> > > > use DBI;
> > > > 
> > > > $SIG{ALRM} = sub { print "Caught alarm\n"; };
> > > > 
> > > > alarm (2);
> > > > $dbh = DBI->connect('dbi:Oracle:eman', 'eman', 'eman');
> > > > alarm (0);
> > > > 
> > > > sleep(5);
> > > > print "Success\n";
> > > > 
> > > > 
> > > > 
> > > > If the "use DBD::Oracle" line is uncommented, the script succeeds.  If 
> > > > commented out, it fails, and the $SIG{ALRM} handler doesn't work either- 
> > > > it just prints "Alarm Clock" and exits.
> > > > 
> > > > It appears that the oracle libraries are monkeying with the signal 
> > > > handlers?
> > > > 
> > > > Here are my versions:
> > > > 
> > > > Solaris 8
> > > > Perl5.6.1
> > > > DBI 1.30
> > > > DBD::Oracle 1.12
> > > > net88.1.7.0.0
> > > > 
> > > > 
> > > > I'm not really happy with the "use DBD::Oracle" workaround at this point-
>  
> > > > i'd hate to miss some script somewhere while trying to add it.
> > > > 
> > > > If there's a way to fix this in DBD, i'd prefer that, certainly.
> > > > 
> > > > If there's any additional testing I can do to narrow down the issue, plea
> se
> > > > let me know.
> > > > 
> > > > --Josh
> > > > 
> > > > -- 
> > > > Josh Wilmes - [EMAIL PROTECTED] 
> > > > 
> > > > 
> > > > 
> > > > 
> > > > 
> > > > - End forwarded message -
> > > > 
> > > 
> > > 
> > 
> 
> 



Re: avoiding mysql corruptions on server-crashes

2002-11-26 Thread Tim Bunce
On Tue, Nov 26, 2002 at 03:54:56PM -0600, Moritz von Schweinitz wrote:
> Hi there,
> 
> this is kinda OT, since i fear it's more of a mysql than dbi issue, but
> here goes...
> 
> the thing is that i have this long-running perlTk app. if i forcefully
> bring my database-servre down (simply brutaly switching it off - my
> system has to be able to handle really painful stuff like that),

Use MySQL InnoDB tables (or another database that handles transations).

Tim.



Re: (Fwd) DBD::Oracle / alarm() problem

2002-11-26 Thread Tim Bunce
Google is your friend:

http://www.google.com/search?q=dbi+oracle+alarm+signal
eg
http:[EMAIL PROTECTED]/msg13194.html

Tim.

On Tue, Nov 26, 2002 at 10:32:27AM -0800, Josh Wilmes wrote:
> 
> .. so what now? :)
> 
> If this is an issue in the oracle libraries, is there a version that is 
> known to work on solaris?
> 
> --Josh
> 
> At 9:17 on 11/21/2002 GMT, Tim Bunce <[EMAIL PROTECTED]> wrote:
> 
> > - Forwarded message from Josh Wilmes <[EMAIL PROTECTED]> -
> > 
> > Delivered-To: [EMAIL PROTECTED]
> > To: [EMAIL PROTECTED]
> > Subject: DBD::Oracle / alarm() problem
> > From: Josh Wilmes <[EMAIL PROTECTED]>
> > Reply-To: Josh Wilmes <[EMAIL PROTECTED]>
> > Date: Wed, 20 Nov 2002 14:40:53 -0800
> > 
> > 
> > Tim,
> > 
> > I appear to be experiencing the problem described at
> > 
> >   http:[EMAIL PROTECTED]/msg13194.html
> > and
> >   http://groups.google.com/groups?selm=93he36%24egc%241%40nnrp1.deja.com
> > 
> > This script demonstrates the issue:
> > 
> > 
> > #!/usr/SD/perl/bin/perl
> > 
> > #use DBD::Oracle;
> > use DBI;
> > 
> > $SIG{ALRM} = sub { print "Caught alarm\n"; };
> > 
> > alarm (2);
> > $dbh = DBI->connect('dbi:Oracle:eman', 'eman', 'eman');
> > alarm (0);
> > 
> > sleep(5);
> > print "Success\n";
> > 
> > 
> > 
> > If the "use DBD::Oracle" line is uncommented, the script succeeds.  If 
> > commented out, it fails, and the $SIG{ALRM} handler doesn't work either- 
> > it just prints "Alarm Clock" and exits.
> > 
> > It appears that the oracle libraries are monkeying with the signal 
> > handlers?
> > 
> > Here are my versions:
> > 
> > Solaris 8
> > Perl5.6.1
> > DBI 1.30
> > DBD::Oracle 1.12
> > net88.1.7.0.0
> > 
> > 
> > I'm not really happy with the "use DBD::Oracle" workaround at this point- 
> > i'd hate to miss some script somewhere while trying to add it.
> > 
> > If there's a way to fix this in DBD, i'd prefer that, certainly.
> > 
> > If there's any additional testing I can do to narrow down the issue, please
> > let me know.
> > 
> > --Josh
> > 
> > -- 
> > Josh Wilmes - [EMAIL PROTECTED] 
> > 
> > 
> > 
> > 
> > 
> > - End forwarded message -
> > 
> 
> 



RE: DBI and Paradox

2002-11-26 Thread Jeff Urlwin
> In other words, once you have your connect string working, just go for the
> DBI documentation.  Also, make sure your ODBC data source is set up as a
> SYSTEM DSN. It won't work otherwise -- I'm not entirely sure why, but
> there were posts on this group explaining that.

DBD::ODBC shouldn't absolutely require a system DSN, but that's usually
better, especially if you are developing web applications as the "user" the
web server logs in as will have access to the DSN.

>
> > Hi guys/gals,
> > I need a tutorial or something on how to access Paradox
> > databases with Perl, DBI and ODBC (I have the ODBC connection
> setup and it
> > works).  The files I have are .db files, and I guess I need to
> know, can I
> > just run ANSI SQL statements against it? Is there special quirks with
> > Paradox?  Stuff like that.   Can someone please point me in the right
> > direction?

Yes, there are "quirks" with Paradox (and all dbs, for that matter), but
probably none that you're not already aware of.  Table names are the file
names, as I recall, etc.  Refer to your Paradox ODBC guide for some more
information, but I suggest just trying it.  I think the ODBC DSN has to
point to the directory where the tables reside.  I haven't used paradox in 5
years or so.  My information may be outdated.

Regards,

Jeff







Re: DBI and Paradox

2002-11-26 Thread Paul Boutros
Can't speak for Paradox (and somebody on the list will give you better
advice shortly, I'm sure) but for Access and other ODBC DBs I've used:

use DBI;

my $user = '';
my $password = '';
my $connect = 'dbi::ODBC::DBNAME'; #insert your Database Name in there
my $dbh = DBI->connect($connect, $user, $password, {RaiseError => 1,
PrintError => 1, AutoCommit => 1});

my $sql = 'SELECT ID FROM STRAINS';
my $sth = $dbh->prepare($sql);

while (my @row = $sql->fetchrow_array()) {
print join("/t", @row), "\n";
}

In other words, once you have your connect string working, just go for the
DBI documentation.  Also, make sure your ODBC data source is set up as a
SYSTEM DSN. It won't work otherwise -- I'm not entirely sure why, but
there were posts on this group explaining that.

Hope it helps,
Paul

On Tue, 26 Nov 2002, Brian Spindler wrote:

> Hi guys/gals,
> I need a tutorial or something on how to access Paradox
> databases with Perl, DBI and ODBC (I have the ODBC connection setup and it
> works).  The files I have are .db files, and I guess I need to know, can I
> just run ANSI SQL statements against it? Is there special quirks with
> Paradox?  Stuff like that.   Can someone please point me in the right
> direction?  
>  
> Thank you in advance!
>  
> 
> Brian Spindler
> Assistant I.T. Manager
> RAB Electric Mfg. Co.
> 888-RAB-1000 x 84
> 888-RAB-1232 fax
> [EMAIL PROTECTED]
> 
> print scalar reverse join "", sort "tona",
> "reh","lre","ts","\nr","uj","ekca","p ","h ";
>  
> 




DBI and Paradox

2002-11-26 Thread Brian Spindler
Hi guys/gals,
I need a tutorial or something on how to access Paradox
databases with Perl, DBI and ODBC (I have the ODBC connection setup and it
works).  The files I have are .db files, and I guess I need to know, can I
just run ANSI SQL statements against it? Is there special quirks with
Paradox?  Stuff like that.   Can someone please point me in the right
direction?  
 
Thank you in advance!
 

Brian Spindler
Assistant I.T. Manager
RAB Electric Mfg. Co.
888-RAB-1000 x 84
888-RAB-1232 fax
[EMAIL PROTECTED]

print scalar reverse join "", sort "tona",
"reh","lre","ts","\nr","uj","ekca","p ","h ";
 



Re: DBI compilation errors on hp-ux

2002-11-26 Thread Michael A Chase
On Wed, 27 Nov 2002 09:00:20 +1100 [EMAIL PROTECTED] wrote:

> 
> Thanks for the quick reply but where can I find the readme.hpux or the url
> for the download of the DBD-Oracle distribution.

http://xmlproj.com/fom-serve/cache/52.html
http://search.cpan.org/author/TIMB/DBD-Oracle-1.12/

-- 
Mac :})
** I normally forward private questions to the appropriate mail list. **
Ask Smarter: http://www.tuxedo.org/~esr/faqs/smart-questions.html
Give a hobbit a fish and he eats fish for a day.
Give a hobbit a ring and he eats fish for an age.





RE: DBI compilation errors on hp-ux

2002-11-26 Thread Paul . Chan

Thanks for the quick reply but where can I find the readme.hpux or the url
for the download of the DBD-Oracle distribution.

Regards,

Paul Chan
Oracle DBA
Business Solutions 2
Group IT&T
NRMA Insurance Limited
Level 30, 580 George St.
Sydney, NSW 2000
Telephone: (02) 9260 8388 (ext 48388)
Mobile: 0411 013 136
email:  [EMAIL PROTECTED]



  [EMAIL PROTECTED] 
  OM   To:   [EMAIL PROTECTED], 
[EMAIL PROTECTED]  
  27/11/2002 02:06 cc:  
  AM   Subject:  RE: DBI compilation errors 
on hp-ux





Read the README.hpux that is part of the DBD-Oracle distribution.  Detailed
instructions therein... useful even if you are not building DBD-Oracle.


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Monday, November 25, 2002 11:31 PM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: DBI compilation errors on hp-ux

Hi DBI users,


I run out of ideas to compile DBI in hp-ux.

1. I did the following
perl Makefile.PL   (do a make realclean first)
make
and I got the following errors
(See attached file: DBImake.err)(See attached file: Makefile)
2. [/opt/tuxedo/dbi2/DBI-1.30]$ perl -v

This is perl, v5.6.1 built for PA-RISC1.1

Copyright 1987-2001, Larry Wall

Perl may be copied only under the terms of either the Artistic License or
the
GNU General Public License, which may be found in the Perl 5 source kit.

Complete documentation for Perl, including FAQ lists, should be found on
this system using `man perl' or `perldoc perl'.  If you have access to the
Internet, point your browser at http://www.perl.com/, the Perl Home Page.

3. [/opt/tuxedo/dbi2/DBI-1.30]$ uname -a
HP-UX lascs100 B.11.00 U 9000/800 138901517 unlimited-user license



Regards,

Paul Chan
Oracle DBA
Business Solutions 2
Group IT&T
NRMA Insurance Limited
Level 30, 580 George St.
Sydney, NSW 2000
Telephone: (02) 9260 8388 (ext 48388)
Mobile: 0411 013 136
email:  [EMAIL PROTECTED]

**
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.com
**







**
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.com
**




avoiding mysql corruptions on server-crashes

2002-11-26 Thread Moritz von Schweinitz
Hi there,

this is kinda OT, since i fear it's more of a mysql than dbi issue, but
here goes...

the thing is that i have this long-running perlTk app. if i forcefully
bring my database-servre down (simply brutaly switching it off - my
system has to be able to handle really painful stuff like that), and
bring the server up again, i get veey ugly corruptions in my database
(mysqlcheck says something about tables that weren't closed). i can
repair them, but that deletes some rather crucial rows, which of course
isn't acceptable.
my theory is that the dbi somehow/somewhere maintains _something_ open,
which breaks my tables.
so, what can i do? would calling $sth->finish help? should i
$dbh->disconnect after every query?

is this a mysql-specific thing? (i've never really seen these
corruptions before [could be, of course, because i'm coming from the
CGI-world]).

so, how can i tell dbi/mysql to clear all things mysql thinks it's doing?

thanks for any help,

M.

P.S.: my server's running win98 (ugh!) right now, but it'll run linux or
XP later on. bt i doubt that this would make the problem away...





RE: DBI compilation errors on hp-ux

2002-11-26 Thread LoBue, Mark
Where your error list says this:

"line 540: error 1705: Function prototypes are an ANSI feature."

is your clue.  You need the ANSI C compiler not included with hp-ux.  Before
everyone jumps up and says "get gcc for free", let me say that won't compile
either, I've tried it.

-Mark





RE: Using DBI/Oracle stand alone

2002-11-26 Thread Fong, Anna
Cyril,

I'm not sure why you'd need to have DBI compiled on each of your servers -- you can 
change the db connect string to access your Oracle databases from one location over 
TCP/IP.  Just set up the proper entries in your tnsnames.ora file



Anna Q. Fong, Webmaster 
California Data Exchange Center 

> -Original Message-
> From: [EMAIL PROTECTED] [SMTP:[EMAIL PROTECTED]]
> Sent: Tuesday, November 26, 2002 11:22 AM
> To:   [EMAIL PROTECTED]
> Subject:  Using DBI/Oracle stand alone
> 
> Hi,
>   I have made a little monitor script in perl to monitor an Oracle
> database (does select/update) in a monitoring table to check if the database
> is still up. The problem is that I have over 100 Solaris servers and I don't
> want to compile/install the DBI module on every server. Is it possible to
> compile a version of perl with the modules in it, or have the module work by
> it self (even if it means copying a few libraries).
> 
>   I've tried putting a require instead of use, but it breaks in the
> package.
> 
>   Have anybody done this, can it be done, any suggestion :)
> 
>   Thanks
> 
> -Cyril
> 



Re: Using DBI/Oracle stand alone

2002-11-26 Thread Joe Raube
Are all 100 Solaris servers with Oracle accessible via SQL*Net?

Create a tnsnames.ora file with all 100 instance aliases and do all
of the Perl DBI queries from a central machine.

-Joe

--- [EMAIL PROTECTED] wrote:
> Hi,
>   I have made a little monitor script in perl to monitor an Oracle
> database (does select/update) in a monitoring table to check if the
> database
> is still up. The problem is that I have over 100 Solaris servers
> and I don't
> want to compile/install the DBI module on every server. Is it
> possible to
> compile a version of perl with the modules in it, or have the
> module work by
> it self (even if it means copying a few libraries).
> 
>   I've tried putting a require instead of use, but it breaks in the
> package.
> 
>   Have anybody done this, can it be done, any suggestion :)
> 
>   Thanks
> 
> -Cyril
> 
> 




Using DBI/Oracle stand alone

2002-11-26 Thread Jaouich . Cyril
Hi,
I have made a little monitor script in perl to monitor an Oracle
database (does select/update) in a monitoring table to check if the database
is still up. The problem is that I have over 100 Solaris servers and I don't
want to compile/install the DBI module on every server. Is it possible to
compile a version of perl with the modules in it, or have the module work by
it self (even if it means copying a few libraries).

I've tried putting a require instead of use, but it breaks in the
package.

Have anybody done this, can it be done, any suggestion :)

Thanks

-Cyril




Re: Table Names

2002-11-26 Thread Michael Peppler
On Tue, 2002-11-26 at 08:49, Jeff Seger wrote:
> I may be wrong...I seem to be making a habit of it lately...but I don't
> think you can.  SHOW TABLES is a mysql command, not an sql statement.

You can still use it in a prepare() call. I've used "show columns from
" with DBI/DBD::MySQL with no problem.

Michael


> 
> On Tue, 2002-11-26 at 10:02, darren chamberlain wrote:
> > * Chris Rogers <[EMAIL PROTECTED]> [2002-11-26 09:45]:
> > > Is there a way to get a list of all table names in specific database
> > > using DBI::mysql in Perl?
> > 
> > Can you use SHOW TABLES?  E.g.:
> > 
> >   sub show_tables {
> >   my $dbh = shift;
> >   my ($sth, @tables, $table);
> > 
> >   $sth = $dbh->prepare("SHOW TABLES");
> >   $sth->execute;
> > 
> >   while ($table = $sth->fetchrow) {
> >   push @tables, $table;
> >   }
> > 
> >   $sth->finish;
> > 
> >   return @tables;
> >   }
> > 
> > (darren)
> > 
> > -- 
> > I have learnt silence from the talkative, toleration from the
> > intolerant, and kindness from the unkind; yet strange, I am
> > ungrateful to these teachers.
> > -- Kahlil Gibran
> > 
> 
> 
-- 
Michael Peppler / [EMAIL PROTECTED] / http://www.mbay.net/~mpeppler
[EMAIL PROTECTED] / ZetaTools, Inc / http://www.zetatools.com
ZetaTools: Call perl functions as Sybase stored procedures!



signature.asc
Description: This is a digitally signed message part


Re: (Fwd) DBD::Oracle / alarm() problem

2002-11-26 Thread Josh Wilmes

... so what now? :)

If this is an issue in the oracle libraries, is there a version that is 
known to work on solaris?

--Josh

At 9:17 on 11/21/2002 GMT, Tim Bunce <[EMAIL PROTECTED]> wrote:

> - Forwarded message from Josh Wilmes <[EMAIL PROTECTED]> -
> 
> Delivered-To: [EMAIL PROTECTED]
> To: [EMAIL PROTECTED]
> Subject: DBD::Oracle / alarm() problem
> From: Josh Wilmes <[EMAIL PROTECTED]>
> Reply-To: Josh Wilmes <[EMAIL PROTECTED]>
> Date: Wed, 20 Nov 2002 14:40:53 -0800
> 
> 
> Tim,
> 
> I appear to be experiencing the problem described at
> 
>   http:[EMAIL PROTECTED]/msg13194.html
> and
>   http://groups.google.com/groups?selm=93he36%24egc%241%40nnrp1.deja.com
> 
> This script demonstrates the issue:
> 
> 
> #!/usr/SD/perl/bin/perl
> 
> #use DBD::Oracle;
> use DBI;
> 
> $SIG{ALRM} = sub { print "Caught alarm\n"; };
> 
> alarm (2);
> $dbh = DBI->connect('dbi:Oracle:eman', 'eman', 'eman');
> alarm (0);
> 
> sleep(5);
> print "Success\n";
> 
> 
> 
> If the "use DBD::Oracle" line is uncommented, the script succeeds.  If 
> commented out, it fails, and the $SIG{ALRM} handler doesn't work either- 
> it just prints "Alarm Clock" and exits.
> 
> It appears that the oracle libraries are monkeying with the signal 
> handlers?
> 
> Here are my versions:
> 
> Solaris 8
> Perl5.6.1
> DBI 1.30
> DBD::Oracle 1.12
> net88.1.7.0.0
> 
> 
> I'm not really happy with the "use DBD::Oracle" workaround at this point- 
> i'd hate to miss some script somewhere while trying to add it.
> 
> If there's a way to fix this in DBD, i'd prefer that, certainly.
> 
> If there's any additional testing I can do to narrow down the issue, please
> let me know.
> 
> --Josh
> 
> -- 
> Josh Wilmes - [EMAIL PROTECTED] 
> 
> 
> 
> 
> 
> - End forwarded message -
> 





Re: Perl - Sql Server question

2002-11-26 Thread Simon Windsor
Hi

Thanks.

I have spent many hours seaching the Web and MS-SQL documentation, and no
where does it state, or give an example of

table_source = database.owner.table

As you  say this is very similar to Oracle with database links.

Thanx, once again

Simon
- Original Message -
From: "Joe Raube" <[EMAIL PROTECTED]>
To: "Simon Windsor" <[EMAIL PROTECTED]>
Sent: Tuesday, November 26, 2002 5:41 PM
Subject: Re: Perl - Sql Server question


> Do the databases exist in the same server?
>
> If so, as long as the permissions exist, this is very similar to
> accessing multiple schemas under Oracle.
>
> Oracle
>
> select a.id, b.id
> from schema1.table1 a, schema2.table2 b
> where b.id = a.id;
>
> SQL Server
>
> select a.id, b.id
> from database1.dbo.table1 a, database2.dbo.table2 b
> where b.id = a.id;
>
> -Joe
>
> --- Simon Windsor <[EMAIL PROTECTED]> wrote:
> > Hi
> >
> > I am sorry for asking this question, but I have been asked to port
> > a number of MySQL databases to MS Sql Server, and to move the
> > Perl/CGI application to ISAPI Perl.
> >
> > Everthing has gone fairly well, due mainly to the portability of
> > Perl/DBI, except I do not know how to perform a joined query across
> > two databases in SQL Server.
> >
> > This is easy in Oracle and MySQL but I cannot find how to do this
> > for MS SQL Server.
> >
> > Does anyone know if it is possible, or should I collapse my three
> > databases into one.
> >
> > It is shame that whilst Perl is very portable, and SQL to a lesser
> > extent, the ideas that different venders use for their databases,
> > schemas, users etc are all different.
> >
> > SImon
> >
> > Simon Windsor
> > Email: [EMAIL PROTECTED]
> > Tel: 01454 61768
> > Mob: 07720 447385
>
>




Re: Connect as sysdba in 9i

2002-11-26 Thread Michael A Chase
On Tue, 26 Nov 2002 04:22:31 -0800 (PST) Lin Feng <[EMAIL PROTECTED]> wrote:

> Any idea on how to connect system/sys as sysdba in Oracle 9i through 
> DBI? Any feedback is appreciated.

It's in the fine manual:

http://xmlproj.com/fom-serve/cache/49.html
http://search.cpan.org/author/TIMB/DBD-Oracle/Oracle.pm#Connect_Attributes

-- 
Mac :})
** I normally forward private questions to the appropriate mail list. **
Ask Smarter: http://www.tuxedo.org/~esr/faqs/smart-questions.html
Give a hobbit a fish and he eats fish for a day.
Give a hobbit a ring and he eats fish for an age.





Re: Table Names

2002-11-26 Thread Michael Ragsdale
Sorry if I was unclear.  I was answering the original question of obtaining 
a list of all the table names.

-Mike

At 12:48 PM 11/26/2002, Jeff Seger wrote:
OK, but that's not using the SHOW TABLES command.  Maybe I was unclear
about that.

On Tue, 2002-11-26 at 12:10, Michael Ragsdale wrote:
> Yes you can.  From the fine cheetah book, under metadata...
>
>
> my @tables = $dbh->tables();
> foreach my $table ( @tables ) {
>  print "Table: $table\n";
> }
>
>
>
> -Mike
>
>
> At 11:49 AM 11/26/2002, Jeff Seger wrote:
> >I may be wrong...I seem to be making a habit of it lately...but I don't
> >think you can.  SHOW TABLES is a mysql command, not an sql statement.
> >
> >On Tue, 2002-11-26 at 10:02, darren chamberlain wrote:
> > > * Chris Rogers <[EMAIL PROTECTED]> [2002-11-26 09:45]:
> > > > Is there a way to get a list of all table names in specific database
> > > > using DBI::mysql in Perl?
> > >
> > > Can you use SHOW TABLES?  E.g.:
> > >
> > >   sub show_tables {
> > >   my $dbh = shift;
> > >   my ($sth, @tables, $table);
> > >
> > >   $sth = $dbh->prepare("SHOW TABLES");
> > >   $sth->execute;
> > >
> > >   while ($table = $sth->fetchrow) {
> > >   push @tables, $table;
> > >   }
> > >
> > >   $sth->finish;
> > >
> > >   return @tables;
> > >   }
> > >
> > > (darren)
> > >
> > > --
> > > I have learnt silence from the talkative, toleration from the
> > > intolerant, and kindness from the unkind; yet strange, I am
> > > ungrateful to these teachers.
> > > -- Kahlil Gibran
> > >
>
>





Re: Perl - Sql Server question

2002-11-26 Thread Joe Raube
>From the MS SQL Server Books Online 

"Object Visibility and Qualification Rules

When you create an object, Microsoft® SQL Server™ uses the following
defaults for the parts of the name that are not specified: 

server defaults to the local server. 
database defaults to the current database. 
owner_name defaults to the username in the specified database
associated with the login ID of the current connection. 
When you create an object, SQL Server uses the defaults to build the
fully qualified name. For example, if a user is logged into Northwind
as the database owner (dbo) user, either of the following two
statements creates a table named Northwind.dbo.TableX:

CREATE TABLE TableX (cola INT PRIMARY KEY, colb NCHAR(3))

or

CREATE TABLE Northwind.dbo.TableX(cola INT PRIMARY KEY, colb
NCHAR(3))

Note It is recommended that the full table or view name be specified
to eliminate possible confusion relating to the object in question.

When you refer to an object, Microsoft® SQL Server™ uses the
following defaults for the parts of the name that are not specified: 

server defaults to the local server. 
database defaults to the current database. 
owner_name defaults to the username in the specified database
associated with the login ID of the current connection. If that user
owns no object with the specified name, SQL Server looks for an
object with the specified name that is owned by the database owner
(dbo) user. 

For example, assume LoginX connects to a server that has two
databases: DBY and DBZ. LoginX is associated with UserA in database
DBY and with UserB in database DBZ.

LoginX executes a SELECT statement in the current database.

USE DBY
SELECT * FROM DBY..TableX

Because LoginX is associated with UserA in DBY, SQL Server first
looks for DBY.UserA.TableX. If there is no table with this name, SQL
Server looks for a table DBY.dbo.TableX.

In the next example, LoginX executes a SELECT statement on a table
that is not in the current database:

USE DBY
SELECT * FROM DBZ..TableY

Because LoginX is associated with UserB in database DBZ, SQL Server
first looks for DBZ.UserB.TableY. If there is no table with this
name, SQL Server then looks for a table DBZ.dbo.TableY.

Note SQL Server does not try to deduce the owner of remote tables
based on the current login. To ensure that distributed queries
execute properly, use fully-qualified names.

The visibility for stored procedures that begin with sp_ differs from
the visibility for regular stored procedures. For more information,
see CREATE PROCEDURE. "

Many more examples exist in the docs.

-Joe

--- Simon Windsor <[EMAIL PROTECTED]> wrote:
> Hi
> 
> Thanks.
> 
> I have spent many hours seaching the Web and MS-SQL documentation,
> and no
> where does it state, or give an example of
> 
> table_source = database.owner.table
> 
> As you  say this is very similar to Oracle with database links.
> 
> Thanx, once again
> 
> Simon
> - Original Message -
> From: "Joe Raube" <[EMAIL PROTECTED]>
> To: "Simon Windsor" <[EMAIL PROTECTED]>
> Sent: Tuesday, November 26, 2002 5:41 PM
> Subject: Re: Perl - Sql Server question
> 
> 
> > Do the databases exist in the same server?
> >
> > If so, as long as the permissions exist, this is very similar to
> > accessing multiple schemas under Oracle.
> >
> > Oracle
> >
> > select a.id, b.id
> > from schema1.table1 a, schema2.table2 b
> > where b.id = a.id;
> >
> > SQL Server
> >
> > select a.id, b.id
> > from database1.dbo.table1 a, database2.dbo.table2 b
> > where b.id = a.id;
> >
> > -Joe
> >
> > --- Simon Windsor <[EMAIL PROTECTED]> wrote:
> > > Hi
> > >
> > > I am sorry for asking this question, but I have been asked to
> port
> > > a number of MySQL databases to MS Sql Server, and to move the
> > > Perl/CGI application to ISAPI Perl.
> > >
> > > Everthing has gone fairly well, due mainly to the portability
> of
> > > Perl/DBI, except I do not know how to perform a joined query
> across
> > > two databases in SQL Server.
> > >
> > > This is easy in Oracle and MySQL but I cannot find how to do
> this
> > > for MS SQL Server.
> > >
> > > Does anyone know if it is possible, or should I collapse my
> three
> > > databases into one.
> > >
> > > It is shame that whilst Perl is very portable, and SQL to a
> lesser
> > > extent, the ideas that different venders use for their
> databases,
> > > schemas, users etc are all different.
> > >
> > > SImon
> > >
> > > Simon Windsor
> > > Email: [EMAIL PROTECTED]
> > > Tel: 01454 61768
> > > Mob: 07720 447385
> >
> >
> 




Re: Table Names

2002-11-26 Thread Jeff Seger
OK, but that's not using the SHOW TABLES command.  Maybe I was unclear
about that.

On Tue, 2002-11-26 at 12:10, Michael Ragsdale wrote:
> Yes you can.  From the fine cheetah book, under metadata...
> 
> 
> my @tables = $dbh->tables();
> foreach my $table ( @tables ) {
>  print "Table: $table\n";
> }
> 
> 
> 
> -Mike
> 
> 
> At 11:49 AM 11/26/2002, Jeff Seger wrote:
> >I may be wrong...I seem to be making a habit of it lately...but I don't
> >think you can.  SHOW TABLES is a mysql command, not an sql statement.
> >
> >On Tue, 2002-11-26 at 10:02, darren chamberlain wrote:
> > > * Chris Rogers <[EMAIL PROTECTED]> [2002-11-26 09:45]:
> > > > Is there a way to get a list of all table names in specific database
> > > > using DBI::mysql in Perl?
> > >
> > > Can you use SHOW TABLES?  E.g.:
> > >
> > >   sub show_tables {
> > >   my $dbh = shift;
> > >   my ($sth, @tables, $table);
> > >
> > >   $sth = $dbh->prepare("SHOW TABLES");
> > >   $sth->execute;
> > >
> > >   while ($table = $sth->fetchrow) {
> > >   push @tables, $table;
> > >   }
> > >
> > >   $sth->finish;
> > >
> > >   return @tables;
> > >   }
> > >
> > > (darren)
> > >
> > > --
> > > I have learnt silence from the talkative, toleration from the
> > > intolerant, and kindness from the unkind; yet strange, I am
> > > ungrateful to these teachers.
> > > -- Kahlil Gibran
> > >
> 
> 






Re: Table Names

2002-11-26 Thread Tim Bunce
Or just @tables = $dbh->tables;

Tim.

On Tue, Nov 26, 2002 at 10:02:03AM -0500, darren chamberlain wrote:
> * Chris Rogers <[EMAIL PROTECTED]> [2002-11-26 09:45]:
> > Is there a way to get a list of all table names in specific database
> > using DBI::mysql in Perl?
> 
> Can you use SHOW TABLES?  E.g.:
> 
>   sub show_tables {
>   my $dbh = shift;
>   my ($sth, @tables, $table);
> 
>   $sth = $dbh->prepare("SHOW TABLES");
>   $sth->execute;
> 
>   while ($table = $sth->fetchrow) {
>   push @tables, $table;
>   }
> 
>   $sth->finish;
> 
>   return @tables;
>   }
> 
> (darren)
> 
> -- 
> I have learnt silence from the talkative, toleration from the
> intolerant, and kindness from the unkind; yet strange, I am
> ungrateful to these teachers.
> -- Kahlil Gibran



Re: Table Names

2002-11-26 Thread Michael Ragsdale
Yes you can.  From the fine cheetah book, under metadata...


my @tables = $dbh->tables();
foreach my $table ( @tables ) {
print "Table: $table\n";
}



-Mike


At 11:49 AM 11/26/2002, Jeff Seger wrote:

I may be wrong...I seem to be making a habit of it lately...but I don't
think you can.  SHOW TABLES is a mysql command, not an sql statement.

On Tue, 2002-11-26 at 10:02, darren chamberlain wrote:
> * Chris Rogers <[EMAIL PROTECTED]> [2002-11-26 09:45]:
> > Is there a way to get a list of all table names in specific database
> > using DBI::mysql in Perl?
>
> Can you use SHOW TABLES?  E.g.:
>
>   sub show_tables {
>   my $dbh = shift;
>   my ($sth, @tables, $table);
>
>   $sth = $dbh->prepare("SHOW TABLES");
>   $sth->execute;
>
>   while ($table = $sth->fetchrow) {
>   push @tables, $table;
>   }
>
>   $sth->finish;
>
>   return @tables;
>   }
>
> (darren)
>
> --
> I have learnt silence from the talkative, toleration from the
> intolerant, and kindness from the unkind; yet strange, I am
> ungrateful to these teachers.
> -- Kahlil Gibran
>





Perl - Sql Server question

2002-11-26 Thread Simon Windsor
Hi

I am sorry for asking this question, but I have been asked to port a number of MySQL 
databases to MS Sql Server, and to move the Perl/CGI application to ISAPI Perl.

Everthing has gone fairly well, due mainly to the portability of Perl/DBI, except I do 
not know how to perform a joined query across two databases in SQL Server.

This is easy in Oracle and MySQL but I cannot find how to do this for MS SQL Server.

Does anyone know if it is possible, or should I collapse my three databases into one.

It is shame that whilst Perl is very portable, and SQL to a lesser extent, the ideas 
that different venders use for their databases, schemas, users etc are all different.

SImon

Simon Windsor
Email: [EMAIL PROTECTED]
Tel: 01454 61768
Mob: 07720 447385


Re: Table Names

2002-11-26 Thread Jeff Seger
I may be wrong...I seem to be making a habit of it lately...but I don't
think you can.  SHOW TABLES is a mysql command, not an sql statement.

On Tue, 2002-11-26 at 10:02, darren chamberlain wrote:
> * Chris Rogers <[EMAIL PROTECTED]> [2002-11-26 09:45]:
> > Is there a way to get a list of all table names in specific database
> > using DBI::mysql in Perl?
> 
> Can you use SHOW TABLES?  E.g.:
> 
>   sub show_tables {
>   my $dbh = shift;
>   my ($sth, @tables, $table);
> 
>   $sth = $dbh->prepare("SHOW TABLES");
>   $sth->execute;
> 
>   while ($table = $sth->fetchrow) {
>   push @tables, $table;
>   }
> 
>   $sth->finish;
> 
>   return @tables;
>   }
> 
> (darren)
> 
> -- 
> I have learnt silence from the talkative, toleration from the
> intolerant, and kindness from the unkind; yet strange, I am
> ungrateful to these teachers.
> -- Kahlil Gibran
> 






Problems installing DBD-Oracle in HP-UX

2002-11-26 Thread Carlos Barroso
Hy there.
I'm trying to use perl 5.6.1 + DBI-1.30 + DBD-Oracle-1.12 on HP-UX.
I got the depot file from HP's site:

perl_B.5.6.1.E_HP-UX_B.11.00._32+64.depot

and installed it.
Then with /opt/perl/bin/perl -MCPAN installed the DBI module.
When I tried to install the DBD-Oracle module, the "make test" gave me these
errors:

( ... )
t/base../usr/lib/dld.sl: Can't shl_load() a library containing
Thread Local Storage: /usr/lib/libcl.2
/usr/lib/dld.sl: Exec format error
Failed to load Oracle extension and/or shared libraries:
install_driver(Oracle) failed: Can't load
'blib/arch/auto/DBD/Oracle/Oracle.sl' for module DBD::Oracle: Exec format
error at /opt/perl/lib/5.6.1/PA-RISC1.1-thread-multi/DynaLoader.pm line 206.
Compilation failed in require at (eval 1) line 3.
Perhaps a required shared library or dll isn't installed where expected
The remaining tests will probably also fail with the same error.
( ... )

I can't figure out what's wrong!?
I have
ORACLE_BASE
ORACLE_HOME
ORACLE_USERID
ORACLE_SID
all set.

Can someone please help me. I'm getting desperate.



Re: $sel->CursorName does not exist

2002-11-26 Thread David Wheeler
On Tuesday, November 26, 2002, at 02:21  AM, Tim Bunce wrote:


http://www.google.com/search?hl=en&lr=&ie=UTF-8&oe=UTF- 
8&safe=off&as_qdr=all&q=HandleEvent+Bunce

Cool, thanks. I don't think that PostgreSQL features callbacks at the  
database level, but I do recall such a thing from my SQL Server days  
years ago. IIRC, SQL Server can throw exceptions. Should be very cool,  
indeed.

Regards,

David

--
David Wheeler AIM: dwTheory
[EMAIL PROTECTED] ICQ: 15726394
http://david.wheeler.net/  Yahoo!: dew7e
   Jabber: [EMAIL PROTECTED]



RE: DBI drivers for Oracle on Windows NT - PLEASE HELP!!

2002-11-26 Thread Sterin, Ilya (I.)
You need to have a Visuall C++ compiler in order to compile the modules, which comes 
with nmake.

You can use a PPM instead.  Read the docs.

Ilya

-Original Message-
From: Sree Bammidipati [mailto:[EMAIL PROTECTED]]
Sent: Monday, November 25, 2002 6:46 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: DBI drivers for Oracle on Windows NT - PLEASE HELP!!


Dear Perl friends,

I have installed Perl 5.6 and it is working like a champ, as expected. 
I am encountering a problem in installing the perl DBI modules.  I have
downloaded DBI-1.30.tar.gz.  I have followed the instructions in the
README file.  However, very less or infact nothing is mentioned about
installing on WINDOWS platform.

Per Readme document, I tried to do the following
perl Makefile.PL
make   #  this fails because I do not have
"make" in windows
make test # this failed
make install  # this failed

I have downloaded "dmake" utility from the internet and this did not
work.

Can someone please give me direction???
Thanks a bunch in advance.
-Sree




RE: DBI compilation errors on hp-ux

2002-11-26 Thread LBaxter
Read the README.hpux that is part of the DBD-Oracle distribution.  Detailed
instructions therein... useful even if you are not building DBD-Oracle.


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] 
Sent: Monday, November 25, 2002 11:31 PM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: DBI compilation errors on hp-ux

Hi DBI users,


I run out of ideas to compile DBI in hp-ux.

1. I did the following
perl Makefile.PL   (do a make realclean first)
make
and I got the following errors
(See attached file: DBImake.err)(See attached file: Makefile)
2. [/opt/tuxedo/dbi2/DBI-1.30]$ perl -v

This is perl, v5.6.1 built for PA-RISC1.1

Copyright 1987-2001, Larry Wall

Perl may be copied only under the terms of either the Artistic License or
the
GNU General Public License, which may be found in the Perl 5 source kit.

Complete documentation for Perl, including FAQ lists, should be found on
this system using `man perl' or `perldoc perl'.  If you have access to the
Internet, point your browser at http://www.perl.com/, the Perl Home Page.

3. [/opt/tuxedo/dbi2/DBI-1.30]$ uname -a
HP-UX lascs100 B.11.00 U 9000/800 138901517 unlimited-user license



Regards,

Paul Chan
Oracle DBA
Business Solutions 2
Group IT&T
NRMA Insurance Limited
Level 30, 580 George St.
Sydney, NSW 2000
Telephone: (02) 9260 8388 (ext 48388)
Mobile: 0411 013 136
email:  [EMAIL PROTECTED]

**
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.com
**




Re: Table Names

2002-11-26 Thread darren chamberlain
* Chris Rogers <[EMAIL PROTECTED]> [2002-11-26 09:45]:
> Is there a way to get a list of all table names in specific database
> using DBI::mysql in Perl?

Can you use SHOW TABLES?  E.g.:

  sub show_tables {
  my $dbh = shift;
  my ($sth, @tables, $table);

  $sth = $dbh->prepare("SHOW TABLES");
  $sth->execute;

  while ($table = $sth->fetchrow) {
  push @tables, $table;
  }

  $sth->finish;

  return @tables;
  }

(darren)

-- 
I have learnt silence from the talkative, toleration from the
intolerant, and kindness from the unkind; yet strange, I am
ungrateful to these teachers.
-- Kahlil Gibran



Table Names

2002-11-26 Thread Chris Rogers
Is there a way to get a list of all table names in specific database using
DBI:mysql in Perl?  I can get the list of databases using:

@databases = DBI->data_sources("mysql");

and the list of fields in any given table but I can't figure out how to get
the list of tables.  The documentation references the method "table" which
is used as:

$arrayref = $statementhandle->{mysql_table};

This is supposed to return a reference to an array of tables.  What it does
return is an array reference of the table names that were part of the FROM
clause in the statement.  However, each table name is returned a number of
times that is equal to the number of fields in that table.  The most
important thing to note here is that I may not know that names of the tables
in the database, so constructing a statement that includes table names, then
using a function to extract those table names from the statement seems like
backtracking.  

I just need to know how to get a list of table names for a given database.
I would really appreciate any information or just hints in the right
direction.

Thanks,
Chris



DBD-Informix-1.04.PC1 build errors on Solaris 8

2002-11-26 Thread Cosby, Christopher
I'm trying to get DBD-Informix-1.04.PC1 to build on Solaris 8.  perl
Makefile.PL is successful.  'make' fails.  Here's the error, environment
follows.  Any suggestions?

ccosby@goose:~/DBD-Informix-1.04.PC1$ make
/usr/local/bin/perl -I/usr/local/lib/perl5/5.6.1/sun4-solaris-thread-multi
-I/usr/local/lib/perl5/5.6.1 /usr/local/lib/perl5/5.6.1/ExtUtils/xsubpp
-typemap /usr/local/lib/perl5/5.6.1/ExtUtils/typemap Informix.xs >
Informix.xsc && mv Informix.xsc Informix.c
cc -c -I/export/home/informix/incl/esql
-I/usr/local/lib/perl5/5.6.1/sun4-solaris-thread-multi/auto/DBI
-I/usr/local/lib/perl5/site_perl/5.6.1/sun4-solaris-thread-multi/auto/DBI
-I/auto/DBI
-I/usr/local/lib/perl5/site_perl/5.6.1/sun4-solaris-thread-multi/auto/DBI
-D_REENTRANT -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O
-DVERSION=\"1.04.PC1\" -DXS_VERSION=\"1.04.PC1\" -KPIC
-I/usr/local/lib/perl5/5.6.1/sun4-solaris-thread-multi/CORE
-DESQLC_VERSION=952 -DNDEBUG Informix.c
cc: unrecognized option `-KPIC'
Informix.xs: In function `XS_DBD__Informix__dr_FETCH':
Informix.xs:102: invalid type argument of `->'
make: *** [Informix.o] Error 1


::: Environment :::
SunOS goose 5.8 Generic_108528-17 sun4u sparc SUNW,Ultra-5_10
IBM Informix CSDK Version 2.80, IBM Informix-ESQL Version 9.52.FC1 from
/export/home/informix
This is perl, v5.6.1 built for sun4-solaris-thread-multi

perl Makefile.PL says:
Your Informix environment is (probably) OK
Using DBI 1.14 installed in
/usr/local/lib/perl5/site_perl/5.6.1/sun4-solaris-thread-multi/auto/DBI
Writing Makefile for DBD::Informix

gcc -v says:
Reading specs from /usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.2/specs
Configured with: ../configure --with-as=/usr/ccs/bin/as
--with-ld=/usr/ccs/bin/ld --disable-nls
Thread model: posix
gcc version 3.2

make --version says:
GNU Make 3.80

$INFORMIXDIR/bin/esql has (had to do this to get esql to compile anything):
COPTS="-m64 -mptr64 -Wa,-xarch=v9 -mcpu=v9"

env says:
DBD_INFORMIX_DEBUG_ESQLCC=yes
DBD_INFORMIX_DEBUG_ESQLLD=yes

Christopher S. Cosby
SciCare Software Services
770.236.1128


 - - - - - - -  Appended by Scientific-Atlanta, Inc.  - - - - - - -  
This e-mail and any attachments may contain information which is confidential, 
proprietary, privileged or otherwise protected by law. The information is solely 
intended for the named addressee (or a person responsible for delivering it to the 
addressee). If you are not the intended recipient of this message, you are not 
authorized to read, print, retain, copy or disseminate this message or any part of it. 
If you have received this e-mail in error, please notify the sender immediately by 
return e-mail and delete it from your computer. 




Re: (Fwd) help

2002-11-26 Thread Hardy Merrill
If you post the section of your code that you are having
trouble with, it would be easier to help you.

Hardy Merrill

Tim Bunce [[EMAIL PROTECTED]] wrote:
> - Forwarded message from carlo deu <[EMAIL PROTECTED]> -
> 
> Delivered-To: [EMAIL PROTECTED]
> From: "carlo deu" <[EMAIL PROTECTED]>
> To: "Tim Bunce" <[EMAIL PROTECTED]>
> Subject: help
> Date: Tue, 26 Nov 2002 14:50:50 +0100
> X-RAVMilter-Version: 8.4.1(snapshot 20020919) (vaxca1.unica.it)
> 
>  
> Hi mr Tim Bunce, excuse for my english but i have a small problem about
> 2 months !! 
> I hope explain my problem.
>  
> I have a DB under mysql, a table where i put 4 fields : the first is
> name , second is date, third is subject and forth is filename.  Ok ?
>  
> I want in a form html  with 4 fields where user can put data, pass this
> values to the script the query the DB . the problem is : when a user
> puts just a value in one field , or two values , or three . how can
> i do within the script understand the is those values
> !?!?!?!?!?!?!?!??
>  
> Ok ? i hope in your help !! please !
>  
> I am trying from many time but forn now nothing to do !!
>  
>  
> Thanks 
>  
> Carlo
>  
> 
> - End forwarded message -



(Fwd) help

2002-11-26 Thread Tim Bunce
- Forwarded message from carlo deu <[EMAIL PROTECTED]> -

Delivered-To: [EMAIL PROTECTED]
From: "carlo deu" <[EMAIL PROTECTED]>
To: "Tim Bunce" <[EMAIL PROTECTED]>
Subject: help
Date: Tue, 26 Nov 2002 14:50:50 +0100
X-RAVMilter-Version: 8.4.1(snapshot 20020919) (vaxca1.unica.it)

 
Hi mr Tim Bunce, excuse for my english but i have a small problem about
2 months !! 
I hope explain my problem.
 
I have a DB under mysql, a table where i put 4 fields : the first is
name , second is date, third is subject and forth is filename.  Ok ?
 
I want in a form html  with 4 fields where user can put data, pass this
values to the script the query the DB . the problem is : when a user
puts just a value in one field , or two values , or three . how can
i do within the script understand the is those values
!?!?!?!?!?!?!?!??
 
Ok ? i hope in your help !! please !
 
I am trying from many time but forn now nothing to do !!
 
 
Thanks 
 
Carlo
 

- End forwarded message -



RE: DBI drivers for Oracle on Windows NT - PLEASE HELP!!

2002-11-26 Thread Jeff Urlwin
It depends upon how you installed perl. Please see the FAQ.

=
See the DBI FAQ at www.xmlproj.com/cgi/fom.cgi

Regards,

Jeff

> Dear Perl friends,
> 
> I have installed Perl 5.6 and it is working like a champ, as expected. 
> I am encountering a problem in installing the perl DBI modules.  I have
> downloaded DBI-1.30.tar.gz.  I have followed the instructions in the
> README file.  However, very less or infact nothing is mentioned about
> installing on WINDOWS platform.
> 
> Per Readme document, I tried to do the following
> perl Makefile.PL
> make   #  this fails because I do not have
> "make" in windows
> make test # this failed
> make install  # this failed
> 
> I have downloaded "dmake" utility from the internet and this did not
> work.
> 
> Can someone please give me direction???
> Thanks a bunch in advance.
> -Sree
> 
> 
> 




Connect as sysdba in 9i

2002-11-26 Thread Lin Feng
Hi,

Any idea on how to connect system/sys as sysdba in Oracle 9i through 
DBI? Any feedback is appreciated.

Thanks,
Lin





-
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now


Re: $sel->CursorName does not exist

2002-11-26 Thread Tim Bunce
On Mon, Nov 25, 2002 at 04:15:49PM -0800, David Wheeler wrote:
> On Monday, November 25, 2002, at 04:04  PM, Tim Bunce wrote:
> 
> >Perl 5.8.0 is (quite reasonably) clearing refs in lexical variables
> >in a more timely manner when the sub exists.
> >
> >The failing test in 07kids.t isn't testing anything significant
> >so I've just replaced it with a comment:
> >
> ># Testing $dbh->{Kids} here is unstable because we would be 
> >relying on
> ># when perl chooses to call DESTROY the lexical $sth created 
> >within prepare()
> ># The HandleError sub doesn't get called until the do() is 
> >returning
> ># and recent perl's (>=5.8.0) have destroyed the handle by then 
> >(quite reasonably).
> >
> ># When a HandleEvent attribute gets added to the DBI then we'll 
> >probably call that
> ># at the moment the error is registered, and so we could test 
> >$sth->{Kids} then.
> 
> Ah, how interesting. Makes sense.
> 
> Um, what is HandleEvent? Have you described it somewhere?

http://www.google.com/search?hl=en&lr=&ie=UTF-8&oe=UTF-8&safe=off&as_qdr=all&q=HandleEvent+Bunce

Tim.



Re: [spam score 7/10 -pobox] DBD::Oracle Problem with dbms_output_get while ora_ph_type=96

2002-11-26 Thread Tim Bunce
Done. Thanks!

Tim.

On Tue, Nov 26, 2002 at 11:13:58AM +1100, Fox, Michael wrote:
> 
> its a slightly obscure combination of parameters, but when I set
> ora_ph_type=96, my dbms_output from Oracle stored procedures disappeared.
> 
> Turns out this setting affected the parameter binding in sub dbms_output_get
> in Oracle.pm, so that the return status from dbms_output.get_line is '0
> ' instead of '0', and the fetching terminates immediately.  The actual
> output lines are also blank padded to 400 characters.
> 
> Would it be a good idea to hardwire the parameter type in the parameter
> binding in this routine, to prevent any global settings from upsetting it?
> eg: lines 534-535 become:
> 
>$sth->bind_param_inout(':l', \$line,  400, { ora_type => 1 });
>$sth->bind_param_inout(':s', \$status, 20, { ora_type => 1 });
> 
> Michael Fox
> 
> 
> 
> Australia Post is committed to providing our customers with excellent service. If we 
>can assist you in any way please either telephone 13 13 18 or visit our website 
>www.auspost.com.au.
> 
> CAUTION
> 
> This e-mail and any files transmitted with it are privileged and confidential 
>information intended for the use of the addressee. The confidentiality and/or 
>privilege in this e-mail is not waived, lost or destroyed if it has been transmitted 
>to you in error. If you have received this e-mail in error you must (a) not 
>disseminate, copy or take any action in reliance on it; (b) please notify Australia 
>Post immediately by return e-mail to the sender; and (c) please delete the original 
>e-mail.



DBI compilation errors on hp-ux

2002-11-26 Thread Paul . Chan
Hi DBI users,


I run out of ideas to compile DBI in hp-ux.

1. I did the following
perl Makefile.PL   (do a make realclean first)
make
and I got the following errors
(See attached file: DBImake.err)(See attached file: Makefile)
2. [/opt/tuxedo/dbi2/DBI-1.30]$ perl -v

This is perl, v5.6.1 built for PA-RISC1.1

Copyright 1987-2001, Larry Wall

Perl may be copied only under the terms of either the Artistic License or
the
GNU General Public License, which may be found in the Perl 5 source kit.

Complete documentation for Perl, including FAQ lists, should be found on
this system using `man perl' or `perldoc perl'.  If you have access to the
Internet, point your browser at http://www.perl.com/, the Perl Home Page.

3. [/opt/tuxedo/dbi2/DBI-1.30]$ uname -a
HP-UX lascs100 B.11.00 U 9000/800 138901517 unlimited-user license



Regards,

Paul Chan
Oracle DBA
Business Solutions 2
Group IT&T
NRMA Insurance Limited
Level 30, 580 George St.
Sydney, NSW 2000
Telephone: (02) 9260 8388 (ext 48388)
Mobile: 0411 013 136
email:  [EMAIL PROTECTED]

**
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.com
**




DBImake.err
Description: Binary data


Makefile
Description: Binary data


DBI drivers for Oracle on Windows NT - PLEASE HELP!!

2002-11-26 Thread Sree Bammidipati
Dear Perl friends,

I have installed Perl 5.6 and it is working like a champ, as expected. 
I am encountering a problem in installing the perl DBI modules.  I have
downloaded DBI-1.30.tar.gz.  I have followed the instructions in the
README file.  However, very less or infact nothing is mentioned about
installing on WINDOWS platform.

Per Readme document, I tried to do the following
perl Makefile.PL
make   #  this fails because I do not have
"make" in windows
make test # this failed
make install  # this failed

I have downloaded "dmake" utility from the internet and this did not
work.

Can someone please give me direction???
Thanks a bunch in advance.
-Sree