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

Home -> Community -> Usenet -> c.d.o.misc -> How to use svrmgrl commands in Perl CGI

How to use svrmgrl commands in Perl CGI

From: James Liang <james_at_guangzhou.sgi.com>
Date: Tue, 1 Jun 1999 10:27:31 -0000
Message-ID: <7ivgf2$hur9s@fido.engr.sgi.com>


Hi,

We have a problem trying to use svrmgrl commands in a Perl CGI script:

#! /usr/bin/perl5

print "Content-type: text/html\n\n";
$ENV{'ORACLE_HOME'} = '/ora7/app/oracle/product/7.3.4';
$ENV{'ORACLE_SID'} = 'mydb';

`/ora7/app/oracle/product/7.3.4/bin/svrmgrl <<EOF > /tmp/log10

          connect internal;
          select * from dba_users;

EOF`;
print "SUCCESS!";

This script runs correctly from command-line, but if we try to run it as CGI, the following error is logged in /tmp/log10:

Oracle Server Manager Release 2.3.4.0.0 - Production

Copyright (c) Oracle Corporation 1994, 1995. All rights reserved.

Oracle7 Server Release 7.3.4.0.0 - Production PL/SQL Release 2.3.4.0.0 - Production

SVRMGR> MGR-11401: input error, unable to read input line MGR-01508: unable to close the current file

It seems that svrmgrl cannot get the input. How can I make it work as a CGI program ?

We are using Perl 5.005_02 for irix-n32, Oracle 7.3.4, and Netscape SuiteSpot Enterprise server 3.5.1 on SGI Irix 6.2. The web server runs as nobody (we've added nobody to DBA group temporarily for the testing).

Regards,

James Liang Received on Tue Jun 01 1999 - 05:27:31 CDT

Original text of this message

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