How Can I use ssh in my perl code

2008-05-19 Thread mohammed.mustafa
Hi Dear Friends, I want to connect to remote m/c through ssh to do the testing at remote m/c, which we can do with ssh ( but I have not done). And my question is, How can we interface the ssh to our perl script so that our perl will take care of all things, like 1) connecting to remote

Re: How Can I use ssh in my perl code

2008-05-19 Thread Matthew Joyce
I suggest not using net::ssh. It is slower than molasses. System calls? Not very secure... but it would work... I would say perl is probably the wrong tool for this job. But that's just my opinion. -Matt On May 19, 2008, at 9:12 AM, [EMAIL PROTECTED] wrote: Hi Dear Friends,

Re: How Can I use ssh in my perl code

2008-05-19 Thread Jeffrey Seger
What is not clear is how this is dbi related. Unless there is a dbi related question, I'd suggest that you'd be better served if you asked this question over at perl monks. On Mon, May 19, 2008 at 9:12 AM, [EMAIL PROTECTED] wrote: Hi Dear Friends, I want to connect to remote m/c

Re: How Can I use ssh in my perl code

2008-05-19 Thread David Goodman
ssh is a secure replacement for rlogin/telnet. You probably mean ssl (secure sockets layer) for your database connections. Assuming that you have the correct software installed, it should be transparent to your perl/DBI/DBD code. regards, David --- Jeffrey Seger [EMAIL PROTECTED] wrote: What

RE: How Can I use ssh in my perl code

2008-05-19 Thread mohammed.mustafa
Hi Matt, Thanks a lot for your kind suggestion, but it is my requirement so I don't have any choice here. I request you to guide me how can I achieve this. And if possible please send me a code example. It will be a great help for me, if you send some link as well. Thanks, Mustafa

RE: How Can I use ssh in my perl code

2008-05-19 Thread Matthew Ramadanovic
to be more descriptive but everything you need to be able to do this is at www.stunnel.org -M -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Monday, May 19, 2008 10:27 AM To: [EMAIL PROTECTED] Cc: dbi-users@perl.org Subject: RE: How Can I use ssh in my perl code Hi

Re: How Can I use ssh in my perl code

2008-05-19 Thread Tim Bunce
, but it is my requirement so I don't have any choice here. I request you to guide me how can I achieve this. And if possible please send me a code example. It will be a great help for me, if you send some link as well. Thanks, Mustafa -Original Message- From: Matthew Joyce

Re: How can I...

2005-06-07 Thread Michael A Chase
On 06/06/2005 02:06 PM, Peter Rabbitson said: On Mon, Jun 06, 2005 at 01:11:30PM -0700, Vergara, Michael (TEM) wrote: I want to connect to an Oracle database and test for the existence of a table. My first thought was to SELECT COUNT(*) FROM TABLE, but DBI catches the ORA-942 error and I

RE: How can I...

2005-06-07 Thread Steven Lembark
-- Reidy, Ron [EMAIL PROTECTED] The data dictionary is your friend ... SELECT 'x' FROMall_tables WHERE table_name = UPPER(:name); Depending on access you might be better off selecting from user_tables: less likely to fail and the table name is more likely to be useful in the current

How can I...

2005-06-06 Thread Vergara, Michael \(TEM\)
Title: How can I... Hi Everyone: I want to connect to an Oracle database and test for the existence of a table. My first thought was to SELECT COUNT(*) FROM TABLE, but DBI catches the ORA-942 error and I don't know how to catch that. It throws the error during the $dbh-execute step; how

RE: How can I...

2005-06-06 Thread Reidy, Ron
-users@perl.org Subject: How can I... Hi Everyone: I want to connect to an Oracle database and test for the existence of a table. My first thought was to SELECT COUNT(*) FROM TABLE, but DBI catches the ORA-942 error and I don't know how to catch that. It throws the error during the $dbh

RE: How can I...

2005-06-06 Thread Reidy, Ron
); dbi-users@perl.org Subject: RE: How can I... The data dictionary is your friend ... SELECT 'x' FROMall_tables WHERE table_name = UPPER(:name); - Ron Reidy Lead DBA Array BioPharma, Inc. -Original Message- From: Vergara, Michael (TEM) [mailto:[EMAIL PROTECTED

Re: How can I...

2005-06-06 Thread Peter Rabbitson
On Mon, Jun 06, 2005 at 01:11:30PM -0700, Vergara, Michael (TEM) wrote: Hi Everyone: I want to connect to an Oracle database and test for the existence of a table. My first thought was to SELECT COUNT(*) FROM TABLE, but DBI catches the ORA-942 error and I don't know how to catch that. It

how can I extract String as UTF-8 under UNIX, my data was in SQL Server Database and stored as Unicode data

2004-12-09 Thread Yonghui Wang
when I simply use perl DBI, DBD::ODBC to connect to the database and try to extract the Unicode string( there is Chinese, Japanese, Korea) string stored in it, the return value is unreadable. I wish to get UTF-8 string so that those double byte language can be readable. so, what configuration

RE: how can I extract String as UTF-8 under UNIX, my data was in SQL Server Database and stored as Unicode data

2004-12-09 Thread Jeff Urlwin
DBD::ODBC has not even been tested with UTF-8 data. Patches/tests most welcome!! Regards, Jeff -Original Message- From: Yonghui Wang [mailto:[EMAIL PROTECTED] Sent: Thursday, December 09, 2004 4:09 PM To: [EMAIL PROTECTED] Subject: how can I extract String as UTF-8 under

Re: How can I connect from a FreeBSD box to a Windows machine?

2003-07-23 Thread stan
On Tue, Jul 22, 2003 at 09:19:21PM -0400, Alex wrote: Look into the dbi::proxy I think that is what you need But that requires that I run a perl script on the windows end, doesn't it? I'd prefer not to do this, if possible, -- They that would give up essential liberty for temporary safety

RE: How can I connect from a FreeBSD box to a Windows machine?

2003-07-23 Thread Jeff Urlwin
On Tue, Jul 22, 2003 at 09:19:21PM -0400, Alex wrote: Look into the dbi::proxy I think that is what you need But that requires that I run a perl script on the windows end, doesn't it? I'd prefer not to do this, if possible, There are other ways, such as commercial products like

Re: How can I connect from a FreeBSD box to a Windows machine?

2003-07-22 Thread Alex
Look into the dbi::proxy I think that is what you need On Tue, 22 Jul 2003, stan wrote: I need to be able to get some data out of a microsoft Access fatabase intot a perl script that will run on a FreeBSD machine. Can I do this using DBD::ODBC? If so what does the syntax of teh

Re: i know it's utf-8, how can i force perl to see it that way

2003-06-19 Thread Tim Bunce
[moved to dbi-users] On Wed, Jun 18, 2003 at 02:48:29PM +0200, Brigitte Jellinek wrote: On Mon, Jun 16, 2003 at 10:10:52AM -0400, Nathaniel W. Turner wrote: The crux of the problem is that mysql thinks it knows what it's doing, and is assuming incoming data is latin1*, and thus storing your

RE: How can I fetch column names?

2003-06-11 Thread Herbold, John W.
Nickolayev Cc: [EMAIL PROTECTED] Sent: 6/10/2003 10:37 PM Subject: Re: How can I fetch column names? Try this (I use mysql - thus your mileage can vary): $column_list = $connect-prepare(LISTFIELDS $oppanel_table) ; $column_list-execute() ; $column_list_numrows = $column_list

Re: How can I fetch column names?

2003-06-11 Thread Tim Bunce
Of course these kinds of things should all be done using the standard DBI metadata methods if the driver supports them, or else by fixing the driver to support them so everyone gains :-) Tim. On Wed, Jun 11, 2003 at 09:14:22AM -0500, Brian P. Millett wrote: This is a function that works for

How can I fetch column names?

2003-06-10 Thread Anthony Nickolayev
Greetings. Maybe the answer for my question will be RTFM, but i still cant find it myself. The problem is: i need to fetch just list, contains column names - and i dont know how to do it. I didnt find it in DBI manual page, and anywhere else. Thanks anyway, and sorry for my english.

Re: How can I fetch column names?

2003-06-10 Thread Paul Boutros
Two basic ways. Either way, start with code like this: my $dbh = DBI-connect('db:ODBC:dbname', 'username', 'password'); my $sql = 'SELECT * FROM Table1'; my $sth = $dbh-prepare($sql); $sth-execute(); Method #1: The -{NAME} attribute = while (my @row =

RE: How can I fetch column names?

2003-06-10 Thread Jones Robert Contr TTMS Keesler
::errstr\n; -Original Message- From: Anthony Nickolayev [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 10, 2003 3:34 AM To: [EMAIL PROTECTED] Subject: How can I fetch column names? Greetings. Maybe the answer for my question will be RTFM, but i still cant find it myself. The problem is: i need

Re: How can I fetch column names?

2003-06-10 Thread Hardy Merrill
Do perldoc DBI and searach(using the forward slash /) for the section titled Statement Handle Attributes, and once you find that, page down and find all the NAME* attributes. HTH. -- Hardy Merrill Red Hat, Inc. Anthony Nickolayev [EMAIL PROTECTED] wrote: Greetings. Maybe the answer for my

Re: How can I fetch column names?

2003-06-10 Thread David N Murray
Which database? It usually varies. On Jun 10, Anthony Nickolayev scribed: Greetings. Maybe the answer for my question will be RTFM, but i still cant find it myself. The problem is: i need to fetch just list, contains column names - and i dont know how to do it. I didnt find it in DBI manual

RE: How can I fetch column names?

2003-06-10 Thread Igor Korolev
, June 10, 2003 4:30 PM To: Anthony Nickolayev Cc: [EMAIL PROTECTED] Subject: Re: How can I fetch column names? Which database? It usually varies. On Jun 10, Anthony Nickolayev scribed: Greetings. Maybe the answer for my question will be RTFM, but i still cant find it myself. The problem is: i

Re: How can I fetch column names?

2003-06-10 Thread Henri Asseily
Nickolayev Cc: [EMAIL PROTECTED] Subject: Re: How can I fetch column names? Which database? It usually varies. On Jun 10, Anthony Nickolayev scribed: Greetings. Maybe the answer for my question will be RTFM, but i still cant find it myself. The problem is: i need to fetch just list, contains

Re: How can I fetch column names?

2003-06-10 Thread Vinnie Lima
: @rwl.buryatia.ru Subject: How can I fetch column names

Re: How can I check the DB handle?

2003-03-16 Thread Bob X
Gary fung [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] How can I check which DB handle that is not finished or destroyed before disconnection of the DB? The error message told me that I still have 1 active statement handle before disconnection. However, I 've checked that I 've

How can I check the DB handle?

2003-03-15 Thread Gary Fung
How can I check which DB handle that is not finished or destroyed before disconnection of the DB? The error message told me that I still have 1 active statement handle before disconnection. However, I 've checked that I 've forced all opened DB handle to finish before disconnection. How can I

How can I connect to MS SQL Server from HPUX

2002-03-18 Thread Adam Schwartz
Hi, I need to write a perl script that will run on HPUX 11, make a dbi connection to Microsoft SQL server running on W2000, and create a file on the HP using the rows I've retrieved. Can anyone help me out on this? I'm not sure what perl packages to install? Do I need to install some things

Re: How can I connect to MS SQL Server from HPUX

2002-03-18 Thread Roland Lammel
Hi, You definitly need a driver package on HP-UX 11 to connect to your M$-SQL Server. I've read in previous posts that unixodbc might me a good solution (http://www.unixodbc.org). From what I've read from unixodbc you'll need a odbc-odbc bridge, like the one below.

RE: How can I effeciently use Prepared Statement ?

2001-07-30 Thread Steve Sapovits
To: [EMAIL PROTECTED] Subject: How can I effeciently use Prepared Statement ? Hi All, I am dumping more than 4 Millions of records from Database file to RDBMS. Here is the thing that I am doing. 1. Connecting to RDBMS and getting the $dbh 2. Opening the Database and reading all

RE: How can I effeciently use Prepared Statement ?

2001-07-30 Thread Sterin, Ilya
-prepare(insert into foo (bar1, bar2, bar3) values (?,?,?)); while (condition) { $sth-execute($val1, $val2, $val3); } Ilya -Original Message- From: Chouda, Prem To: [EMAIL PROTECTED] Sent: 7/30/01 1:07 PM Subject: How can I effeciently use Prepared Statement ? Hi All, I am dumping more

RE: How can I effeciently use Prepared Statement ?

2001-07-30 Thread Chouda, Prem
. It will be much appreciated if you focus some light on this. :-) Thanks, Prem -Original Message- From: Rajanath Tadikonda [mailto:[EMAIL PROTECTED]] Sent: Monday, July 30, 2001 3:33 PM To: Chouda, Prem; [EMAIL PROTECTED] Subject: Re: How can I effeciently use Prepared Statement ? Hi

RE: How can I effeciently use Prepared Statement ?

2001-07-30 Thread Wilson, Doug
Still, it will probably go faster if you write to a text file, and then use SQL Loader. -Original Message- From: Chouda, Prem [mailto:[EMAIL PROTECTED]] Sent: Monday, July 30, 2001 2:03 PM To: 'Rajanath Tadikonda'; [EMAIL PROTECTED] Subject: RE: How can I effeciently use Prepared

Re: How can I effeciently use Prepared Statement ?

2001-07-30 Thread Rajanath Tadikonda
PROTECTED] Subject: How can I effeciently use Prepared Statement ? Hi All, I am dumping more than 4 Millions of records from Database file to RDBMS. Here is the thing that I am doing. 1. Connecting to RDBMS and getting the $dbh 2. Opening the Database and reading all its records in LOOP -- Creating

Re: How can I get insert_id from DBD::Oracle?

2001-06-20 Thread Tim Bunce
But for minimal app code change I'd suggest a using a PL/SQL trigger that implements the auto increment functionality and saves the last value into a per-session package variable. If you, or anyone, does the latter then I'd be very interested in having a copy as I'll need to do

RE: How can I speed it up?

2001-06-15 Thread Williams Andy - anwill
, 2001 5:34 PM To: [EMAIL PROTECTED] Subject: How can I speed it up? Hello all, I'm just new to DBI, it's my first working DBI script so please don't laugh too hard at me. The script below works fine (AFAIK) but is slow - inserting 10 records into the table takes ~1 hour 20 minutes. I think

RE: How can I speed it up?

2001-06-15 Thread Steve Sapovits
Cell: 610-574-7706 Pager: 877-239-4003 -Original Message- From: Greg Wardawy [SMTP:[EMAIL PROTECTED]] Sent: Friday, June 15, 2001 12:34 PM To: [EMAIL PROTECTED] Subject: How can I speed it up? Hello all, I'm just new to DBI, it's my first working DBI script so

Re: How can I speed it up?

2001-06-15 Thread Greg Wardawy
- inserting 10 records into the table takes ~1 hour 20 minutes. I think that's because I placed $sth = $dbh-prepare in the while loop inside the for block. I tried to place it outside the for block but some data was missing and some wasn't correct. How can I improve my script? How can I speed it up

Re: How can I speed it up?

2001-06-15 Thread Greg Wardawy
Thanks a lot. It's much better now - inserting 100K records takes just 26 min. Greg

RE: How can I speed it up?

2001-06-15 Thread Sterin, Ilya
which you correctly pointed out. Ilya Sterin -Original Message- From: Mitch Helle-Morrissey To: 'Greg Wardawy'; [EMAIL PROTECTED] Sent: 06/15/2001 11:10 AM Subject: RE: How can I speed it up? Here are a few ways you can speed it up: 1. Read the placeholder info from the other posts

RE: How can I speed it up?

2001-06-15 Thread Sterin, Ilya
What exactly did you change. Just used placeholders? If yes, we can use this as an example for anyone else here, since this is a tremendous time change. Ilya -Original Message- From: Greg Wardawy To: [EMAIL PROTECTED] Sent: 06/15/2001 12:32 PM Subject: Re: How can I speed it up

RE: How can I speed it up?

2001-06-15 Thread Greg Wardawy
did you change. Just used placeholders? If yes, we can use this as an example for anyone else here, since this is a tremendous time change. Ilya -Original Message- From: Greg Wardawy To: [EMAIL PROTECTED] Sent: 06/15/2001 12:32 PM Subject: Re: How can I speed it up? Thanks a lot. It's

RE: How can I speed it up?

2001-06-15 Thread Steve Sapovits
-Original Message- From: Greg Wardawy [SMTP:[EMAIL PROTECTED]] Sent: Friday, June 15, 2001 3:33 PM To: [EMAIL PROTECTED] Subject: RE: How can I speed it up? Yes, using placeholders dramatically increased the speed. I had no time to apply and test all Mitch's suggestions except

RE: How can I get insert_id from DBD::Oracle?

2001-06-14 Thread Rich Buckley
All, Using a sequence and trigger as discussed will allow the following to work : INSERT INTOtab (value) VALUES ('foo'); SELECT MAX(id) FROM tab; as long as these two statements are within the same transaction block. I do however like the Oracle 8 returning clause a

RE: How can I get insert_id from DBD::Oracle?

2001-06-11 Thread Steven Baldwin
I apologize if it doesn't mean much to you. Hope this helps, Steve -Original Message- From: Jim Spath [mailto:[EMAIL PROTECTED]] Sent: Saturday, June 09, 2001 5:22 AM To: Gregory; [EMAIL PROTECTED] Subject: Re: How can I get insert_id from DBD::Oracle? There is no DBD::Oracle

How can I get insert_id from DBD::Oracle?

2001-06-08 Thread Gregory
I'm migrating from MySQL to Oracle. When I'm executing INSERT... with DBD::mysql I could get the id of inserted row with DBH-{mysql_insertid}. Is there any way to do the same thing with Oracle (DBD::Oracle)? Thanks. Grisha.

RE: How can I get insert_id from DBD::Oracle?

2001-06-08 Thread Kokarski, Anton
PROTECTED] Subject: How can I get insert_id from DBD::Oracle? I'm migrating from MySQL to Oracle. When I'm executing INSERT... with DBD::mysql I could get the id of inserted row with DBH-{mysql_insertid}. Is there any way to do the same thing with Oracle (DBD::Oracle)? Thanks. Grisha.

RE: How can I get insert_id from DBD::Oracle?

2001-06-08 Thread Sterin, Ilya
Yes there is one, as a matter effect mysql prides itself on that one. Ilya Sterin -Original Message- From: Kokarski, Anton To: 'Gregory'; [EMAIL PROTECTED] Sent: 6/8/01 1:24 PM Subject: RE: How can I get insert_id from DBD::Oracle? Greg, Look around on mysql.com I've seen

Re: How can I get insert_id from DBD::Oracle?

2001-06-08 Thread Tim Bunce
On Fri, Jun 08, 2001 at 12:24:33PM -0700, Kokarski, Anton wrote: Greg, Look around on mysql.com I've seen a mentioning of the utility that allows you to port MySQL to oracle. I think it comes from Oracle. And is a mostly hopeless marketing tick box gimmick. I'm migrating from MySQL to

Re: How can I get insert_id from DBD::Oracle?

2001-06-08 Thread Rob Fugina
On Fri, Jun 08, 2001 at 11:23:07PM +0100, Tim Bunce wrote: For maximum perfomance I'd suggest selecting from an Oracle 'sequence' before you do the insert. Done that plenty of times... But for minimal app code change I'd suggest a using a PL/SQL trigger that implements the auto increment

RE: How can I get a directory listing of the server's current directory

2001-05-31 Thread Duncan, Mike
. Mike Duncan Web Master/Developer Sonopress, LLC (Weaverville) (828)658-6082 [EMAIL PROTECTED] -Original Message- From: shahn [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 31, 2001 12:49 AM To: [EMAIL PROTECTED] Subject: How can I get

How can I get a directory listing of the server's current directory

2001-05-30 Thread shahn
Dear all, Using the Net::FTP, how can I get a directory listing of the server's current directory ? ftp-ls() methode does not return a directory listing, just ARRAY.. Thanks a lot. -shahn

Re: How can I get a directory listing of the server's current directory

2001-05-30 Thread Reinke Bonte
Please ask your question on a general perl list. This list only answers DBI related questions. Thank you Reinke - Original Message - From: shahn [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, May 31, 2001 12:48 PM Subject: How can I get a directory listing of the server's

how can i set

2001-04-04 Thread Aguztyn Garcia-Cruz
How can i set this variables POSTGRES_LIB POSTGRES_INCLUDE I need them to compile DBD::Pg module.

Re: How can i execute a Oracle function from Perl code.

2001-03-05 Thread Mark Vandenbroeck
ot; [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, March 05, 2001 11:22 AM Subject: How can i execute a Oracle function from Perl code. Hi there. My question is very easy. How can i execute a Oracle Function (into ORacle package body) from perl code (Cgi), and catch the return code after