RE: Automatng import

From: Iman Mayes (Mayes-Iman_at_Aramark.com)
Date: 12/29/03


Date: Mon, 29 Dec 2003 09:05:26 -0500
To: <sc00170@cc.uoi.gr>,	"dbi-users" <dbi-users@perl.org>

Hi,

Here is a little something I do to execute sqlplus commands from shell scripts. This is just a snippet from a database startup script, so you'll have to season to taste. This should get you started in the right direction.

sqlplus /nolog <<EOF
connect / as sysdba
startup
EOF

Hope this helps

Iman

-----Original Message-----
From: John [mailto:John@cc.uoi.gr]
Sent: Friday, December 26, 2003 3:38 PM
To: dbi-users
Subject: Re: Automatng import

Quoting Kevin Moore <kmoore@esntech.com>:

> Try "drop user jim cascade"
>
> John wrote:
>
> >Hi all
> >
> >I am planning to make a cronjob so i would like to know if tht can be
> achived through a perl script.
> >
> >To be more specific, i have an Oracle RDBMS and i want to execute some
> commands in the shell
> >
> >.....
> >system("sqlplus system/password");
> >system("drop jim cascade");
> >........
> >
> >
> >can be the above done? To execute internal commands as the sqlplus programs
> provides?
> >
> >
>
>

I am afraid that this trick isn't going to work as far as system() will be
waiting until the sqlplus command ends.

What do you say?



Relevant Pages

  • RE: Automatng import
    ... Do you really need to execute your commands via SQL*Plus? ... Here is a little something I do to execute sqlplus commands from shell ... This is just a snippet from a database startup script, ...
    (perl.dbi.users)
  • Re: Will Linux become as vulnerable as MS ??
    ... > beeing vulnerable to viruses. ... > that they know are executable, and execute intentionally. ... >> Linux, each distro is a little different, and even within the distro, ... > Since clicking on a script is easier than typing it's name, ...
    (comp.os.linux.security)
  • Re: [Full-Disclosure] ColdFusion cross-site scripting security vulnerability of an error page
    ... > execute the arbitrary javascript and HTML code which the attacker ... > It is possible to display the contents transmitted from the client ... > cross-site scripting attack can be executed. ... the script will be executed when the script for an attack ...
    (Full-Disclosure)
  • CGIscript.net - csMailto.cgi - Remote Command Execution
    ... CGIscript.net - csMailto.cgi - Remote Command ... csMailto is a perl cgi formmail script developed by ... execute command on server and mail output to anyone ...
    (Bugtraq)
  • Re: Extracting data from an XML to put into a constant
    ... ExecuteGlobal "Const cnUB = 9" ... The following script causes the same error. ... Ordinary variables and constants defined with execute statements have ... no value until their defining statement is executed at run time. ...
    (microsoft.public.scripting.vbscript)