Forum Stats

  • 3,824,844 Users
  • 2,260,430 Discussions
  • 7,896,328 Comments

Discussions

Utility for executing and Accessing output of piped or filtered OS Commands

vansul
vansul Member Posts: 438
edited Jan 11, 2016 5:44PM in Database Ideas - Ideas

Utility for executing and Accessing output of piped or filtered OS Commands can help a lot for

dynamic data exchange with operating system by executing any OS command and accessing the output of OS command.

The requirement is more in windows OS rather than Linux Environment.

If direct access of environment variables of OS and commands output and input re directions can make a strong step to make the oracle database the OS friendly.

Even Registry key values or data can also be a great achievement.

vansulgarvitactriebabhinivesh.jainuser7904656berx
16 votes

Active · Last Updated

«1

Comments

  • top.gun
    top.gun Member Posts: 3,666 Gold Crown

    What will the tool do, that you can't do from the command line?

    Here is a simple example:

    (

    echo select * from v$instance;

    echo select * from v$database;

    ) | sqlplus / as sysdba

    vansul
  • vansul
    vansul Member Posts: 438

    What will the tool do, that you can't do from the command line?

    Here is a simple example:

    (

    echo select * from v$instance;

    echo select * from v$database;

    ) | sqlplus / as sysdba

    so great of you!!!

    very good piping and re directions!!!

    i got a nice solution, waiting since last decade!!!

    these types of solutions should be included in manuals as well as documentations too..

    i was not aware of such simple examples.

    Thanks a tones

  • top.gun
    top.gun Member Posts: 3,666 Gold Crown

    so great of you!!!

    very good piping and re directions!!!

    i got a nice solution, waiting since last decade!!!

    these types of solutions should be included in manuals as well as documentations too..

    i was not aware of such simple examples.

    Thanks a tones

    I'd agree this sort of thing would be helpful in the Oracle manuals.

  • top.gun
    top.gun Member Posts: 3,666 Gold Crown

    so great of you!!!

    very good piping and re directions!!!

    i got a nice solution, waiting since last decade!!!

    these types of solutions should be included in manuals as well as documentations too..

    i was not aware of such simple examples.

    Thanks a tones

    You can also do this kind of thing to query the registry:

    reg query HKLM\SOFTWARE\ORACLE\KEY_OraDb11g_home1 /v ORACLE_HOME

  • the provision of running a command in database objects can enhance a lot in the oracle field

    vansul
  • William Robertson
    William Robertson Member Posts: 9,567 Bronze Crown
  • ctrieb
    ctrieb Member Posts: 314 Gold Trophy

    Yes, tis can help to make work easier.

    vansul
  • yes, it will be really helpful

    vansul
  • Sven W.
    Sven W. Member Posts: 10,535 Gold Crown

    Such a tool exists already.

    In fact there are two tools.

    1) dbms_scheduler running a job of type EXTERNAL (needs an external agent) or EXTERNAL_SCRIPT (new since 12c - needs OS credentials set up) .

    2) External table with the preprocessor option (since 10.2.0.5 - needs an oracle directory).

    3) run some java process in the JVM that accesses the OS - I do not consider that a proper tool

    What should the proposed tool do differently then the two tools that are available already?

    Also environment variables were mentioned. Which environment variables specifically, and why do you need to know them? Some information is available via the USERENV sys_context.

    Billy Verreynne
  • Billy Verreynne
    Billy Verreynne Software Engineer Member Posts: 28,816 Red Diamond

    the provision of running a command in database objects can enhance a lot in the oracle field

    And will open a HUGE security issue, and potential flaw, as user and applications can now run o/s commands on the server. A technique I used to hack and lockout a colleague from his own PC, after he proclaimed Windows NT so secure - courtesy of xp_cmdshell.

    vansul