Re: DBI with ORACLE encryption
[moved to [EMAIL PROTECTED] I can't help unless you, or someone, can indicate what OCI calls the driver needs to make (assuming that is the problem). Tim. On Wed, Mar 10, 2004 at 02:05:49PM +0530, [EMAIL PROTECTED] wrote: Hi, We are using Oracle version 8.1.7.4 as the database running on the solaris 2.8 operating system. We are trying to connect to the database using a perl script on the same solaris server. With the tnsnames.ora settings, it works fine. The moment we enable the oracle encryption using SQLNET.ORA, when we try to connect to the database via the perl script using DBI, we get the following error. ORA-12649: Unknown encryption or data integrity algorithm (DBD ERROR: OCIServerAttach) The version of the perl and the DBI version is Perl: version 5.005_03 built for sun4-solaris DBI : DBI.pm,v 10.10 thks Regards Jayashree Ability is what you're capable of doing...Motivation determines what you do...Attitude determines how well you do it. This e-Mail may contain proprietary and confidential information and is sent for the intended recipient(s) only. If by an addressing or transmission error this mail has been misdirected to you, you are requested to delete this mail immediately. You are also hereby notified that any use, any form of reproduction, dissemination, copying, disclosure, modification, distribution and/or publication of this e-mail message, contents or its attachment other than by its intended recipient/s is strictly prohibited. Visit Us at http://www.polaris.co.in
Re: Span a database transaction across multiple CGI scripts
Hello, Sagara Wijetunga [EMAIL PROTECTED] wrote: Is it possible to span a database transaction across multiple CGI scripts? That is, start transaction and lock some records in one CGI script and update and commit in another CGI script. RJK One possible approach is to set up a separate process that runs in the RJK background, perhaps as a daemon, and handles all the actual database RJK requests. You would use some sort of session identifier in your CGI RJK scripts, passing it to the background process so it could manage the RJK requests appropriately. Each session would get its own connection to the RJK database so that the transaction locking would be effective. AFAIK It is possible if the CGI script is run by a process that is never ending. You can do that with Apache/mod_perl. But be careful HTTP is stateless. You never know that the user will not close the brower instead of clicking next. The better way is to collect the infos e.g. in hidden input fields and access the database only with the last page. But you want locking. So you need some kind of timeout for your transaction. How about not using database locking but user implemented locking? HTH Wielandmailto:[EMAIL PROTECTED]
RE: Trying to make DBI work for me
We ran into this same problem on multiple machines. The solution that worked for us was to completely remove the perl installation directory after uninstalling it. For whatever reason the uninstall process is leaving something behind that conflicts with the new installation. Everything worked fine if we unstalled perl 5.6, removed the perl directory, installed perl 5.8, and reloaded the DBI and DBD modules. Good Luck Mark -Original Message- From: Laurie Vien [mailto:[EMAIL PROTECTED] Sent: Monday, March 08, 2004 3:15 PM To: '[EMAIL PROTECTED]'; '[EMAIL PROTECTED]' Subject: Trying to make DBI work for me I followed Hardy's example below by uninstalling/reinstalling the same 3 DBI components (first I upgraded from Perl 5.6 to Perl 5.8.0). Then I ran Hardy's little test script; but I got the following error in a popup window: The procedure entry point Perl_Ilockhook_ptr could not be located in the dynamic link library perl58.dll. When I dismissed that error popup, I got these additional messages: install_driver(Oracle) failed: Can't load 'C:/Perl/site/lib/auto/DBD/Oracle/Oracle.dll' for module DBD::Oracle:load_file:The specified procedure could not be found at C:/Perl/lib/DynaLoader.pm line 229. at (eval 1) line 3 Compilation failed in require at (eval 1) line 3. Perhaps a required shared library or dll isn't installed where expected at test_dbi.pl line 5 What should I do to resolve this? (Also, how do I find out what version of Perl I actually have installed?) Thanks very much-- Laurie -Original Message- From: Hardy Merrill [mailto:[EMAIL PROTECTED] Sent: Friday, March 05, 2004 9:12 AM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: Accessing oracle from windows 2000 Just wanted to let people know what worked for me for connecting to an Oracle database on a Windows XP platform, using both DBD::ODBC *AND* DBD::Oracle. Thanks to Jeff Urlwin for all the help - see Jeff's suggestions below for reference. NOTE that my version of ActiveState Perl is 5.8.2. 1. Using 'ppm uninstall DBD::ODBC' I uninstalled DBD::ODBC. 2. Using 'ppm uninstall DBD::Oracle' I uninstalled DBD::Oracle. 3. Using 'ppm uninstall DBI' I uninstalled DBI. 4. Did 'ppm install ftp://ftp.esoftmatic.com/outgoing/DBI/5.8.2/DBI.ppd ' to install the DBI binary for AS Perl 5.8.2 from Jeff's repository 5. Did 'ppm install ftp://ftp.esoftmatic.com/outgoing/DBI/5.8.2/DBD-ODBC.ppd ' to install the DBD::ODBC binary for AS Perl 5.8.2 from Jeff's repository. 6. Did 'ppm install ftp://ftp.esoftmatic.com/outgoing/DBI/5.8.2/DBD-Oracle.ppd ' to install the DBD::Oracle binary for AS Perl 5.8.2 from Jeff's repository. Then for the DBD::Oracle test, I created this small test script: #!C:\Perl\bin use strict; use DBI; my $dbh = DBI-connect('dbi:Oracle:host=MY_HOST;sid=MY_SID', 'my_user', 'my_password', { RaiseError = 1, PrintError = 1 } ) || die Can't connect: $dbi::errstr; print Successful Connect: \$dbh=[$dbh]\n; And it worked. Hardy Merrill Jeff Urlwin [EMAIL PROTECTED] 03/04/04 03:46PM Jeff, I still don't know what my problem is - maybe you can help me. How do I know if I have the Oracle client libraries installed on this WinXP machine? I have a C:\Oracle\Ora81 directory which contains a bunch of folders, so I'm guessing I have at least the client installed. I do have a C:\Oracle\Ora81\network\ADMIN\tnsnames.ora file. Do you know why I keep getting this error: Error: no suitable installation target found for package DBD-Oracle8. Yep. That's a PPM error, not an oracle error. when I do 'ppm install DBD-Oracle8.ppd' ?? Is it because I'm using an Activestate DBD-Oracle8.zip from the ActivePerl 6xx folder when I actually have ActivePerl 5.8.2 (ActivePerl 8xx) ?? Would your DBI and DBD::Oracle binaries solve my problem? I'm guessing they would ;-) Probably. The best thing to do is let me know which version of Perl. If you have 5.8.2 perl (build 808?), then you should be able to do (hmmm...forgot the URL...ah, there it is): ppm install ftp://ftp.esoftmatic.com/outgoing/DBI/5.8.2/DBI.ppd ppm install ftp://ftp.esoftmatic.com/outgoing/DBI/5.8.2/DBD-ODBC.ppd ppm install ftp://ftp.esoftmatic.com/outgoing/DBI/5.8.2/DBD-Oracle.ppd Thanks for any input you can give. Np Jeff Hardy Merrill Jeff Urlwin [EMAIL PROTECTED] 03/04/04 12:32PM Ok -- I thought I'd chime in here. I *humbly* consider myself knowledgeable about this topic ;). You can choose to use either DBD::ODBC or DBD::Oracle under windows platforms (with caveats and issues that will be outlined below. Both will/should work under most circumstances. However, as the *developer* of DBD::ODBC, I use DBD::Oracle when using an Oracle data source. It's not that I couldn't use DBD::ODBC, but... a) DBD::Oracle is the
RE: Trying to make DBI work for me
I did this very thing yesterday (uninstalled 5.6, installed 5.8, and then reloaded the DBI/DBD stuff), and you're right--it worked. Thanks to everyone who responded. Laurie -Original Message- From: Andrews, Mark [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 10, 2004 7:56 AM To: [EMAIL PROTECTED] Subject: RE: Trying to make DBI work for me We ran into this same problem on multiple machines. The solution that worked for us was to completely remove the perl installation directory after uninstalling it. For whatever reason the uninstall process is leaving something behind that conflicts with the new installation. Everything worked fine if we unstalled perl 5.6, removed the perl directory, installed perl 5.8, and reloaded the DBI and DBD modules. Good Luck Mark -Original Message- From: Laurie Vien [mailto:[EMAIL PROTECTED] Sent: Monday, March 08, 2004 3:15 PM To: '[EMAIL PROTECTED]'; '[EMAIL PROTECTED]' Subject: Trying to make DBI work for me I followed Hardy's example below by uninstalling/reinstalling the same 3 DBI components (first I upgraded from Perl 5.6 to Perl 5.8.0). Then I ran Hardy's little test script; but I got the following error in a popup window: The procedure entry point Perl_Ilockhook_ptr could not be located in the dynamic link library perl58.dll. When I dismissed that error popup, I got these additional messages: install_driver(Oracle) failed: Can't load 'C:/Perl/site/lib/auto/DBD/Oracle/Oracle.dll' for module DBD::Oracle:load_file:The specified procedure could not be found at C:/Perl/lib/DynaLoader.pm line 229. at (eval 1) line 3 Compilation failed in require at (eval 1) line 3. Perhaps a required shared library or dll isn't installed where expected at test_dbi.pl line 5 What should I do to resolve this? (Also, how do I find out what version of Perl I actually have installed?) Thanks very much-- Laurie -Original Message- From: Hardy Merrill [mailto:[EMAIL PROTECTED] Sent: Friday, March 05, 2004 9:12 AM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: Accessing oracle from windows 2000 Just wanted to let people know what worked for me for connecting to an Oracle database on a Windows XP platform, using both DBD::ODBC *AND* DBD::Oracle. Thanks to Jeff Urlwin for all the help - see Jeff's suggestions below for reference. NOTE that my version of ActiveState Perl is 5.8.2. 1. Using 'ppm uninstall DBD::ODBC' I uninstalled DBD::ODBC. 2. Using 'ppm uninstall DBD::Oracle' I uninstalled DBD::Oracle. 3. Using 'ppm uninstall DBI' I uninstalled DBI. 4. Did 'ppm install ftp://ftp.esoftmatic.com/outgoing/DBI/5.8.2/DBI.ppd ' to install the DBI binary for AS Perl 5.8.2 from Jeff's repository 5. Did 'ppm install ftp://ftp.esoftmatic.com/outgoing/DBI/5.8.2/DBD-ODBC.ppd ' to install the DBD::ODBC binary for AS Perl 5.8.2 from Jeff's repository. 6. Did 'ppm install ftp://ftp.esoftmatic.com/outgoing/DBI/5.8.2/DBD-Oracle.ppd ' to install the DBD::Oracle binary for AS Perl 5.8.2 from Jeff's repository. Then for the DBD::Oracle test, I created this small test script: #!C:\Perl\bin use strict; use DBI; my $dbh = DBI-connect('dbi:Oracle:host=MY_HOST;sid=MY_SID', 'my_user', 'my_password', { RaiseError = 1, PrintError = 1 } ) || die Can't connect: $dbi::errstr; print Successful Connect: \$dbh=[$dbh]\n; And it worked. Hardy Merrill Jeff Urlwin [EMAIL PROTECTED] 03/04/04 03:46PM Jeff, I still don't know what my problem is - maybe you can help me. How do I know if I have the Oracle client libraries installed on this WinXP machine? I have a C:\Oracle\Ora81 directory which contains a bunch of folders, so I'm guessing I have at least the client installed. I do have a C:\Oracle\Ora81\network\ADMIN\tnsnames.ora file. Do you know why I keep getting this error: Error: no suitable installation target found for package DBD-Oracle8. Yep. That's a PPM error, not an oracle error. when I do 'ppm install DBD-Oracle8.ppd' ?? Is it because I'm using an Activestate DBD-Oracle8.zip from the ActivePerl 6xx folder when I actually have ActivePerl 5.8.2 (ActivePerl 8xx) ?? Would your DBI and DBD::Oracle binaries solve my problem? I'm guessing they would ;-) Probably. The best thing to do is let me know which version of Perl. If you have 5.8.2 perl (build 808?), then you should be able to do (hmmm...forgot the URL...ah, there it is): ppm install ftp://ftp.esoftmatic.com/outgoing/DBI/5.8.2/DBI.ppd ppm install ftp://ftp.esoftmatic.com/outgoing/DBI/5.8.2/DBD-ODBC.ppd ppm install ftp://ftp.esoftmatic.com/outgoing/DBI/5.8.2/DBD-Oracle.ppd Thanks for any input you can give. Np Jeff Hardy Merrill Jeff Urlwin [EMAIL PROTECTED] 03/04/04 12:32PM Ok -- I thought I'd chime in here. I *humbly* consider myself knowledgeable about this topic ;). You can
varchar2 4000
Is anyone having trouble inserting or updating 4000 characters in oracle 9i using perl?
RE: varchar2 4000
I had no problems inserting a string of 4000 numbers or characters into a varchar2(4000). -Original Message- From: Bretz, Ellen [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 10, 2004 10:56 AM To: [EMAIL PROTECTED] Subject: varchar2 4000 Is anyone having trouble inserting or updating 4000 characters in oracle 9i using perl?
Re: Span a database transaction across multiple CGI scripts
I was thinking of a different approach to doing it off to the side, such as using a separate (buffer) table where the processing is done, then moving it in to your primary table at the end. This provides for a bit more auditting than the hidden fields do, but is more expensive. If you don't care about auditting the user session, then I'd say (IMHO) that hidden fields is probably the best, safest way to go. Jeff Seger Fairchild Semiconductor [EMAIL PROTECTED] Wieland Pusch [EMAIL PROTECTED] 03/10/2004 08:18 AM Please respond to Wieland Pusch To: [EMAIL PROTECTED] cc: Subject:Re: Span a database transaction across multiple CGI scripts Hello, Sagara Wijetunga [EMAIL PROTECTED] wrote: Is it possible to span a database transaction across multiple CGI scripts? That is, start transaction and lock some records in one CGI script and update and commit in another CGI script. RJK One possible approach is to set up a separate process that runs in the RJK background, perhaps as a daemon, and handles all the actual database RJK requests. You would use some sort of session identifier in your CGI RJK scripts, passing it to the background process so it could manage the RJK requests appropriately. Each session would get its own connection to the RJK database so that the transaction locking would be effective. AFAIK It is possible if the CGI script is run by a process that is never ending. You can do that with Apache/mod_perl. But be careful HTTP is stateless. You never know that the user will not close the brower instead of clicking next. The better way is to collect the infos e.g. in hidden input fields and access the database only with the last page. But you want locking. So you need some kind of timeout for your transaction. How about not using database locking but user implemented locking? HTH Wielandmailto:[EMAIL PROTECTED]
DBD::mysql iThreads
I have a chain of queries on which I'm computing. Each query has an overhead of 15-20 seconds (since the results are sorted by the server). Now it takes me a good 30 seconds to process the results of each query, so I'd really like to be executing the next query while processing the results of the first. After the first, each iteration will only take 30 seconds rather than 50. I can't compute on any query results until I'm done computing on the last query. I could shuffle data back and forth, but that is awfully cumbersome. I want to do something very simple like (unrolled the loop for clarity): my ($sth1,$sth2)=($dbh1-prepare(...), $dbh2-prepare(...)); my $pending=async{$sth2-execute()}; $sth1-execute(); while (my $row=$sth1-fetchrow_arrayref()) { ... # do my thing - takes about ~30 seconds } $pending-join();# wakes up when sth2 is finished ~20 seconds while (my $row=$sth2-fetchrow_arrayref()) { ...# go to town again } However, when I try anything like this I get a complaint: thread failed to start: DBD::mysql::db prepare failed: handle 2 is owned by thread 813fee8 not current thread 82fcdd0 (handles can't be shared between threads and your driver may need a CLONE method added) at bob.pl line 21. I've done a ldd on my mysql.so it's compiled and pointing at the reentrant mysqlclient library libmysqlclient_r.so. Everything is fine if I perform my queries one at a time. Or create the connection, prepare, execute fetch all within the thread. But really, all I want the async{} to do is take the 20 second hit on the -execute() call. Any help/advice would be most gratefully received. Even just a mention that it's not possible to do this and my only option is to shuffle data through a shared variable By the way, I'm using DBI 1.41, DBD::mysql 2.9003 perl 5.8.2 (compiled multithreaded). -- This message is intended only for the personal and confidential use of the designated recipient(s) named above. If you are not the intended recipient of this message you are hereby notified that any review, dissemination, distribution or copying of this message is strictly prohibited. This communication is for information purposes only and should not be regarded as an offer to sell or as a solicitation of an offer to buy any financial product, an official confirmation of any transaction, or as an official statement of Lehman Brothers. Email transmission cannot be guaranteed to be secure or error-free. Therefore, we do not represent that this information is complete or accurate and it should not be relied upon as such. All information is subject to change without notice.
make DBD-Oracle-1.15 problem
Hi! Per your suggestion I have used: -lcl -lpthread +z == it's warning that there is +Z already Same errors I got when used: perl Makefile.PL -l -g -v == see log at the end I have tried to run use makefile from README.hpux/APPENDIX A, no success either. Any suggestions? Thank you, Leonard $ cd /invmttmp/DBD-Oracle-1.15 $ $ perl Makefile.PL Using DBI 1.41 (for perl 5.008003 on PA-RISC1.1) installed in /home/l2m/opt/perl5/lib/site_perl/5.8.3/PA-RISC1.1/auto/DBI Configuring DBD::Oracle ... Remember to actually *READ* the README file! Especially if you have any problems. Using Oracle in /triton_ora0/oracle 7.3.4.0.0Oracle Common RDBMS Libraries and Utilities 7.3.4.0.0ORACLE PL/SQL Libraries 7.3.4.0.0ORACLE Common Precomp Libraries 2.3.4.3.1PL/SQL V2 7.3.4.3.1Oracle7 Server (RDBMS) 7.3.4.0.0Precomp 2.2.4.0.0Pro*C Oracle version 7.3.4 (7.304) Found /triton_ora0/oracle/rdbms/demo/oracle.mk Found /triton_ora0/oracle/otrace/demo/atmoci.mk Found /triton_ora0/oracle/precomp/demo/proc/proc.mk Using /triton_ora0/oracle/rdbms/demo/oracle.mk Reading /triton_ora0/oracle/rdbms/demo/oracle.mk Reading /triton_ora0/oracle/rdbms/lib/env_rdbms.mk Deleting ORA_NLS = $(ORACLE_HOME)/ocommon/nls/admin/data because it is not already set in the environment and it can cause ORA-01019 errors. Attempting to discover Oracle OCI build rules cc -c -I/triton_ora0/oracle/rdbms/demo -I/triton_ora0/oracle/rdbms/public -I. -I/triton_ora0/oracle/rdbms/demo -I/triton_ora0/oracle/rdbms/demo -I/home/l2m/opt/perl5/lib/site_perl/5.8.3/PA-RISC1.1/auto/DBI +z -Ae -D_HPUX_SOURCE -Wl,+vnocompatwarnings -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 +O2 +Onolimit-DVERSION=\1.15\ -DXS_VERSION=\1.15\ +Z -I/home/l2m/opt/perl5/lib/5.8.3/PA-RISC1.1/CORE -DUTF8_SUPPORT DBD_ORA_OBJ.c cc: warning 429: +Z and +z are mutually exclusive. +z ignored. by executing: [make -f /triton_ora0/oracle/rdbms/demo/oracle.mk build ECHODO=echo ECHO=echo GENCLNTSH='echo genclntsh' CC=echo OPTIMIZE= CCFLAGS= EXE=DBD_ORA_EXE OBJS=DBD_ORA_OBJ.o] Oracle oci build command: [] Unable to interpret Oracle build commands from /triton_ora0/oracle/rdbms/demo/oracle.mk. (Will continue by using fallback approach.) Please report this to [EMAIL PROTECTED] See README for what to include. Warning: Oracle is built with multi-threading libraries You will most likely need to rebuild perl from sources with the following libraries: -lcl -lpthread Warning: perl was not built with +z or +Z in compiler flags. You may need to rebuild perl from sources. See instructions in README.hpux Found header files in rdbms/demo. *** *** Warning: If you have trouble, see README.hpux... you may have to build your own perl, or go hunting for libraries *** Warning: If you have trouble, try perl Makefile.PL -l *** Checking for functioning wait.ph System: perl5.008003 hp-ux omdevadm b.10.20 u 9000800 166851311 unlimited-user license Compiler: cc +O2 +Onolimit +z -Ae -D_HPUX_SOURCE -Wl,+vnocompatwarnings -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 Linker: /usr/bin/ld Sysliblist: -lcma -lcl -lm -lcl -lnsl_s -L/usr/lib -ldce -L/usr/lib -ldld Oracle makefiles would have used these definitions but we override them: CC: cc CFLAGS: $(GFLAG) $(OPTIMIZE) $(CDEBUG) $(CCFLAGS) $(QACCFLAGS) $(PFLAGS) $(SHARED_CFLAG) $(ENV_FLAGS) [$(GFLAG) +O2 $(CDEBUG) -Ae -DHPUX +Z -z -DSLXMX_ENABLE -DSLTS_ENABLE -D_REENTRANT +Ofastaccess +Oentrysched +Onolimit +ESlit +Oprocelim +DA1.0 +DS2.0 $(QACCFLAGS) -I/triton_ora0/oracle/rdbms/demo -I/triton_ora0/oracle/rdbms/public -I. $(LPFLAGS) $(SHARED_CFLAG) $(ENV_FLAGS)] CLIBS:$(LOCALLIBS) $(EXOSLIBS) $(LIBBSD) $(OTHERLIBS) $(SECLIBS) $(M6LIBS) [ -l:libcma.sl -lcl -lm -l:libcl.a -lnsl_s -L/usr/lib -l:libdce.sl -L/usr/lib -l:libdld.sl -L/usr/lib ] build: @if [ $(ORA_CLIENT_LIB) = shared ]; then $(ECHO) $(CC) $(LDFLAGSSHARED) -o $(EXE) $(OBJS) $(LIBHOME)/libclntsh.sl `cat $(ORACLE_HOME)/rdbms/lib/sysliblist `; else if [ $(NONDEFER) = true -o $(NONDEFER) = TRUE ] ; then $(ECHO) $(CC) $(CCFLAGS) $(LDFLAGS) -o $(EXE) $? $(NDFOPT) $(OCILDLIBS) $(CLIBS); else $(ECHO) $(CC) $(CCFLAGS) $(LDFLAGS) -o $(EXE) $? $(OCILDLIBS) $(CLIBS); fi fi Using value of ORA_CLIENT_LIB from environment: shared [ @if [ shared = shared ]; then /triton_ora0/oracle/bin/echodo cc -Wl,-Bimmediate -o $(EXE) $(OBJS) $(LIBHOME)/libclntsh.sl -l:libcma.sl -lcl -lm -l:libcl.a -lnsl_s -L/usr/lib -l:libdce.sl -L/usr/lib -l:libdld.sl ; else if [ false = true -o false = TRUE ] ; then /triton_ora0/oracle/bin/echodo cc -Ae -DHPUX +Z -z -DSLXMX_ENABLE -DSLTS_ENABLE -D_REENTRANT +Ofastaccess +Oentrysched
Compiling invalid objects using perl DBI
DBD::Oracle::db do failed: ORA-24344: success with compilation error (DBD SUCCESS_WITH_INFO: error possibly near * indicator at char 1326 in 'alter VIEW APT_V53R2.V_NOP_PRESUM compile) [for Statement alter VIEW APT_V53R2.V_NOP_PRESUM compile] at D:/main_source/olf/bin/recompile line 113, DATA line 8. DBD::Oracle::db do failed: ORA-24344: success with compilation error (DBD SUCCESS_WITH_INFO: error possibly near * indicator at char 350 in 'alter VIEW APT_V53R2.V_NOP_STD_REP compile) [for Statement alter VIEW APT_V53R2.V_NOP_STD_REP compile] at D:/main_source/olf/bin/recompile line 113, DATA line 8. How can supress the above messages while running the program and I am not seeing those messages if I use perl 5.6 ...I am using perl 5.8.2 build 808 and DBI 1.40 and DBD-Oracle 1.15. Any help is greatly appreciated .. --NVP © 2003 OpenLink Financial Copyright in this message and any attachments remains with us. It is confidential and may be legally privileged. If this message is not intended for you it must not be read, copied or used by you or disclosed to anyone else. Please advise the sender immediately if you have received this message in error. Although this message and any attachments are believed to be free of any virus or other defect that might affect any computer system into which it is received and opened, it is the responsibility of the recipient to ensure that it is virus free and no responsibility is accepted by Open Link Financial, Inc. for any loss or damage in any way arising from its use.
Avoiding coding username/password directly into perl script
Hi there, I figured this would be a pretty common problem, but I didn't see anything in the FAQ or docs. We've got a script that uses DBI to connect to SQL Server. There is a system DSN set up and this already has the username and password. So do we really need to pass them again, as shown below? my $db = DBI-connect(dbi:ODBC:$dsn,$db_user_name,$db_password); We tried the following (removing the username/password parameters), but we got a connection error. my $db = DBI-connect(dbi:ODBC:$dsn); It would be nice (for maintenance) and obviously more secure if we could pass only the DSN name. Thanks, - ML
RE: Avoiding coding username/password directly into perl script
well, if your database requires a username/password, then you can't just pass it the path (DSN). Not even sure how you expect anyone to do that. I believe certain ODBC clients might have the capability to embed that either inside the DSN and/or somewhere else on the system, so that when a certain DSN is recognized, that username/password is used, but not sure what clients and/or version do that. Thanks. Ilya -Original Message- From: News Reader [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 10, 2004 1:36 PM To: [EMAIL PROTECTED] Subject: Avoiding coding username/password directly into perl script Hi there, I figured this would be a pretty common problem, but I didn't see anything in the FAQ or docs. We've got a script that uses DBI to connect to SQL Server. There is a system DSN set up and this already has the username and password. So do we really need to pass them again, as shown below? my $db = DBI-connect(dbi:ODBC:$dsn,$db_user_name,$db_password); We tried the following (removing the username/password parameters), but we got a connection error. my $db = DBI-connect(dbi:ODBC:$dsn); It would be nice (for maintenance) and obviously more secure if we could pass only the DSN name. Thanks, - ML
Re: Avoiding coding username/password directly into perl script
Hello Try passing them in as blanks. my $db = DBI-connect(dbi:ODBC:$dsn, '', ''); Peter News Reader wrote: Hi there, I figured this would be a pretty common problem, but I didn't see anything in the FAQ or docs. We've got a script that uses DBI to connect to SQL Server. There is a system DSN set up and this already has the username and password. So do we really need to pass them again, as shown below? my $db = DBI-connect(dbi:ODBC:$dsn,$db_user_name,$db_password); We tried the following (removing the username/password parameters), but we got a connection error. my $db = DBI-connect(dbi:ODBC:$dsn); It would be nice (for maintenance) and obviously more secure if we could pass only the DSN name. Thanks, - ML
Re: Avoiding coding username/password directly into perl script
You _do_ need to include the user name and password in the DBI connect statement, but the way to make it more secure is to not hardcode those in your scripts - create a Perl module in which you place variables that _do_ contain the hardcoded values, but place that perl module in a secure place on your filesystem that is not accessible by regular users. Then use that module in your script so that you have access to the variables in the module that contain the actual values of the user name and password. At a command prompt do perldoc perl to get started. Note that there are several perldoc's that refer to perl modules - the one you probably want to start with is perlmod, which you can view by doing perldoc perlmod at a command prompt. HTH. Hardy Merrill News Reader [EMAIL PROTECTED] 03/10/04 01:35PM Hi there, I figured this would be a pretty common problem, but I didn't see anything in the FAQ or docs. We've got a script that uses DBI to connect to SQL Server. There is a system DSN set up and this already has the username and password. So do we really need to pass them again, as shown below? my $db = DBI-connect(dbi:ODBC:$dsn,$db_user_name,$db_password); We tried the following (removing the username/password parameters), but we got a connection error. my $db = DBI-connect(dbi:ODBC:$dsn); It would be nice (for maintenance) and obviously more secure if we could pass only the DSN name. Thanks, - ML
RE: Avoiding coding username/password directly into perl script
If the user\pass is already in the DSN you should be able to just... my $db = DBI-connect(dbi:ODBC:$dsn,,); -Original Message- From: Sterin, Ilya (I.) [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 10, 2004 12:43 PM To: [EMAIL PROTECTED] Subject: RE: Avoiding coding username/password directly into perl script well, if your database requires a username/password, then you can't just pass it the path (DSN). Not even sure how you expect anyone to do that. I believe certain ODBC clients might have the capability to embed that either inside the DSN and/or somewhere else on the system, so that when a certain DSN is recognized, that username/password is used, but not sure what clients and/or version do that. Thanks. Ilya -Original Message- From: News Reader [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 10, 2004 1:36 PM To: [EMAIL PROTECTED] Subject: Avoiding coding username/password directly into perl script Hi there, I figured this would be a pretty common problem, but I didn't see anything in the FAQ or docs. We've got a script that uses DBI to connect to SQL Server. There is a system DSN set up and this already has the username and password. So do we really need to pass them again, as shown below? my $db = DBI-connect(dbi:ODBC:$dsn,$db_user_name,$db_password); We tried the following (removing the username/password parameters), but we got a connection error. my $db = DBI-connect(dbi:ODBC:$dsn); It would be nice (for maintenance) and obviously more secure if we could pass only the DSN name. Thanks, - ML ** This email and any files transmitted with it are confidential and intended solely for the individual or entity to whom they are addressed. If you have received this email in error destroy it immediately. ** Wal-Mart Stores, Inc. Confidential **
Re: TeraNews: RE: Avoiding coding username/password directly into perl script
On Wed, 10 Mar 2004 12:50:59 -0600, Brad Fike [EMAIL PROTECTED] said: Thanks for the ideas. I did try entering them in as blanks, but I still got this error: DBI-connect(BWEB) failed: [Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection. (SQL-28000)(DBD: db_login/SQLConnect err=-1) at test.pl line 18 I know the username/password is in the system DSN somewhere. In reply to the suggestions about putting the username/password into another [more secure] file, this is not a bad idea, and I can certainly do this. It would address the security issue and it would address the maintenance issue to some extent (at least we wouldn't have to modify several scripts), but it still means the info is in two places (this new file as well as the system DSN, which other non-perl things use). If the user\pass is already in the DSN you should be able to just... my $db = DBI-connect(dbi:ODBC:$dsn,,); -Original Message- From: Sterin, Ilya (I.) [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 10, 2004 12:43 PM To: [EMAIL PROTECTED] Subject: RE: Avoiding coding username/password directly into perl script well, if your database requires a username/password, then you can't just pass it the path (DSN). Not even sure how you expect anyone to do that. I believe certain ODBC clients might have the capability to embed that either inside the DSN and/or somewhere else on the system, so that when a certain DSN is recognized, that username/password is used, but not sure what clients and/or version do that. Thanks. Ilya -Original Message- From: News Reader [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 10, 2004 1:36 PM To: [EMAIL PROTECTED] Subject: Avoiding coding username/password directly into perl script Hi there, I figured this would be a pretty common problem, but I didn't see anything in the FAQ or docs. We've got a script that uses DBI to connect to SQL Server. There is a system DSN set up and this already has the username and password. So do we really need to pass them again, as shown below? my $db = DBI-connect(dbi:ODBC:$dsn,$db_user_name,$db_password); We tried the following (removing the username/password parameters), but we got a connection error. my $db = DBI-connect(dbi:ODBC:$dsn); It would be nice (for maintenance) and obviously more secure if we could pass only the DSN name. Thanks, - ML
Re: Avoiding coding username/password directly into perl script
[EMAIL PROTECTED] wrote: Hi there, I figured this would be a pretty common problem, but I didn't see anything in the FAQ or docs. We've got a script that uses DBI to connect to SQL Server. There is a system DSN set up and this already has the username and password. So do we really need to pass them again, as shown below? my $db = DBI-connect(dbi:ODBC:$dsn,$db_user_name,$db_password); We tried the following (removing the username/password parameters), but we got a connection error. my $db = DBI-connect(dbi:ODBC:$dsn); It would be nice (for maintenance) and obviously more secure if we could pass only the DSN name. Thanks, - ML One approach is to subclass DBI and override the connect method. Put in a password/userid retrieval mechanism and then change all your code to call your new subclass. Chuck
Re: TeraNews: RE: Avoiding coding username/password directly into perl script
I see in 'perldoc DBD::ODBC' that the user id and password _is_ required when using DBD::ODBC to connect to an ODBC data source. I looked up a few of my ODBC 'System' data sources, and although they do contain the user id, they do _NOT_ contain the password. So I'll stick with my previous recommendation of locating the database login parameters in their own Perl module in a safe place, and then useing that module to give your scripts access to those login parameter variables. Hardy News Reader [EMAIL PROTECTED] 03/10/04 02:06PM On Wed, 10 Mar 2004 12:50:59 -0600, Brad Fike [EMAIL PROTECTED] said: Thanks for the ideas. I did try entering them in as blanks, but I still got this error: DBI-connect(BWEB) failed: [Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection. (SQL-28000)(DBD: db_login/SQLConnect err=-1) at test.pl line 18 I know the username/password is in the system DSN somewhere. In reply to the suggestions about putting the username/password into another [more secure] file, this is not a bad idea, and I can certainly do this. It would address the security issue and it would address the maintenance issue to some extent (at least we wouldn't have to modify several scripts), but it still means the info is in two places (this new file as well as the system DSN, which other non-perl things use). If the user\pass is already in the DSN you should be able to just... my $db = DBI-connect(dbi:ODBC:$dsn,,); -Original Message- From: Sterin, Ilya (I.) [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 10, 2004 12:43 PM To: [EMAIL PROTECTED] Subject: RE: Avoiding coding username/password directly into perl script well, if your database requires a username/password, then you can't just pass it the path (DSN). Not even sure how you expect anyone to do that. I believe certain ODBC clients might have the capability to embed that either inside the DSN and/or somewhere else on the system, so that when a certain DSN is recognized, that username/password is used, but not sure what clients and/or version do that. Thanks. Ilya -Original Message- From: News Reader [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 10, 2004 1:36 PM To: [EMAIL PROTECTED] Subject: Avoiding coding username/password directly into perl script Hi there, I figured this would be a pretty common problem, but I didn't see anything in the FAQ or docs. We've got a script that uses DBI to connect to SQL Server. There is a system DSN set up and this already has the username and password. So do we really need to pass them again, as shown below? my $db = DBI-connect(dbi:ODBC:$dsn,$db_user_name,$db_password); We tried the following (removing the username/password parameters), but we got a connection error. my $db = DBI-connect(dbi:ODBC:$dsn); It would be nice (for maintenance) and obviously more secure if we could pass only the DSN name. Thanks, - ML
Re: Compiling invalid objects using perl DBI
On Wed, Mar 10, 2004 at 01:43:43PM -0500, Veera Prasad wrote: DBD::Oracle::db do failed: ORA-24344: success with compilation error (DBD SUCCESS_WITH_INFO: error possibly near * indicator at char 1326 in 'alter VIEW APT_V53R2.V_NOP_PRESUM compile) [for Statement alter VIEW APT_V53R2.V_NOP_PRESUM compile] at D:/main_source/olf/bin/recompile line 113, DATA line 8. DBD::Oracle::db do failed: ORA-24344: success with compilation error (DBD SUCCESS_WITH_INFO: error possibly near * indicator at char 350 in 'alter VIEW APT_V53R2.V_NOP_STD_REP compile) [for Statement alter VIEW APT_V53R2.V_NOP_STD_REP compile] at D:/main_source/olf/bin/recompile line 113, DATA line 8. How can supress the above messages while running the program and I am not seeing those messages if I use perl 5.6 ...I am using perl 5.8.2 build 808 and DBI 1.40 and DBD-Oracle 1.15. The next version of DBD::Oracle will probably treat those as Warnings and not Errors. Will work best with the latest version of the DBI. Tim. Any help is greatly appreciated .. --NVP © 2003 OpenLink Financial Copyright in this message and any attachments remains with us. It is confidential and may be legally privileged. If this message is not intended for you it must not be read, copied or used by you or disclosed to anyone else. Please advise the sender immediately if you have received this message in error. Although this message and any attachments are believed to be free of any virus or other defect that might affect any computer system into which it is received and opened, it is the responsibility of the recipient to ensure that it is virus free and no responsibility is accepted by Open Link Financial, Inc. for any loss or damage in any way arising from its use.
DBD::Oracle to Oracle9i problem with Database link
Hello Everyone, I have Perl 5.8.1 on Sun Solaris 9 and it has Oracle 9.2I have build latest DBI(v1.41) and DBD::Oracle(v1.15) from tarred files, and I did not see any major problems on those builds...I wrote a simple script(select stament) to test Database and it ran fine. But when I try to use Database link(which is link to another Oracle8i database ), it errors out end-of-communication Channel..I could not figure it out, whether it is DBD::Oracle bug for Oracle9i or Oracle 9i OCI problem. The scripts also errors out when i try to use views or Synonyms(But in this case, it is saying view/table doesnot exist) But I don't have problem, on any Client machine(NT OR LINUX) having running the same script against Oracle 9.2 Database and its Database link(to 8.1), or views or synonyms.. Any Suggestion, to get around that problem... I am thinking of having Oralce8i Client on that box and build those modules against that Client...Is that a GOOD idea? Any suggestion will be appreciated.. Thanks. __ Do you Yahoo!? Yahoo! Search - Find what youre looking for faster http://search.yahoo.com
Re: DBD::Oracle to Oracle9i problem with Database link
Shail, We had problems using database links with 9.2.0.1.0 and 9.2.0.2.0, after going to 9.2.0.3.0 the problems went away. I should mention that this was in the context of links used outside perl/DBI, and were rather aleatory. Rafael Caceres On Wed, 2004-03-10 at 15:49, Shail Dahal wrote: Hello Everyone, I have Perl 5.8.1 on Sun Solaris 9 and it has Oracle 9.2I have build latest DBI(v1.41) and DBD::Oracle(v1.15) from tarred files, and I did not see any major problems on those builds...I wrote a simple script(select stament) to test Database and it ran fine. But when I try to use Database link(which is link to another Oracle8i database ), it errors out end-of-communication Channel..I could not figure it out, whether it is DBD::Oracle bug for Oracle9i or Oracle 9i OCI problem. The scripts also errors out when i try to use views or Synonyms(But in this case, it is saying view/table doesnot exist) But I don't have problem, on any Client machine(NT OR LINUX) having running the same script against Oracle 9.2 Database and its Database link(to 8.1), or views or synonyms.. Any Suggestion, to get around that problem... I am thinking of having Oralce8i Client on that box and build those modules against that Client...Is that a GOOD idea? Any suggestion will be appreciated.. Thanks. __ Do you Yahoo!? Yahoo! Search - Find what youre looking for faster http://search.yahoo.com
Re: DBI with ORACLE encryption
I assume you have enabled Oracle Advanced Security. There are client and server specific settings as well as the CRYPTO SEED which must be the same on both. I'm sure you can find this on google or the free Oracle forums. Hope it helps. Kevin Tim Bunce wrote: [moved to [EMAIL PROTECTED] I can't help unless you, or someone, can indicate what OCI calls the driver needs to make (assuming that is the problem). Tim. On Wed, Mar 10, 2004 at 02:05:49PM +0530, [EMAIL PROTECTED] wrote: Hi, We are using Oracle version 8.1.7.4 as the database running on the solaris 2.8 operating system. We are trying to connect to the database using a perl script on the same solaris server. With the tnsnames.ora settings, it works fine. The moment we enable the oracle encryption using SQLNET.ORA, when we try to connect to the database via the perl script using DBI, we get the following error. ORA-12649: Unknown encryption or data integrity algorithm (DBD ERROR: OCIServerAttach) The version of the perl and the DBI version is Perl: version 5.005_03 built for sun4-solaris DBI : DBI.pm,v 10.10 thks Regards Jayashree Ability is what you're capable of doing...Motivation determines what you do...Attitude determines how well you do it. This e-Mail may contain proprietary and confidential information and is sent for the intended recipient(s) only. If by an addressing or transmission error this mail has been misdirected to you, you are requested to delete this mail immediately. You are also hereby notified that any use, any form of reproduction, dissemination, copying, disclosure, modification, distribution and/or publication of this e-mail message, contents or its attachment other than by its intended recipient/s is strictly prohibited. Visit Us at http://www.polaris.co.in
FW: CPAN Upload: J/JU/JURL/DBD-ODBC-1.09.tar.gz
Sorry about that folks. Forgot about adding the dbivport.h to the Manifest. Should avoid anyone with build errors. Regards, Jeff The uploaded file DBD-ODBC-1.09.tar.gz has entered CPAN as file: $CPAN/authors/id/J/JU/JURL/DBD-ODBC-1.09.tar.gz size: 93117 bytes md5: 884f828eaf8d13e935a8d8b9752a07c0 No action is required on your part Request entered by: JURL (Jeff Urlwin) Request entered on: Wed, 10 Mar 2004 18:14:31 GMT Request completed: Wed, 10 Mar 2004 18:15:02 GMT Thanks, -- paused, v460