Calling Sqlplus using shell script and saving the sqlplus output in Logfile

แชร์
ฝัง
  • เผยแพร่เมื่อ 31 ต.ค. 2024

ความคิดเห็น • 22

  • @Rakesh-nm2op
    @Rakesh-nm2op 2 ปีที่แล้ว +1

    Thanku v mch :)

  • @somnathbose7455
    @somnathbose7455 ปีที่แล้ว

    can we run multiple sql statements inside a single sqlplus -s command ? or for each statement we need to relogin into the db ?

  • @nnreddy22
    @nnreddy22 5 ปีที่แล้ว +1

    Can you please make a video on how to check database connectivity test for multiple database in a server.

  • @ramtaur7446
    @ramtaur7446 5 ปีที่แล้ว +1

    Can I use bind variable in shell script?
    if yes,how to use bind variable in shell script?

  • @srinivasua5798
    @srinivasua5798 2 ปีที่แล้ว

    How to modify the shall script

  • @learnomate
    @learnomate  5 ปีที่แล้ว

    Connect with me for oracle dba training.
    Email: ankush.thavali@gmail.com
    Mob no: +91 9960262955
    Website: www.orcldata.com

  • @Sidhukoushik
    @Sidhukoushik 4 ปีที่แล้ว

    If remove -s from sqlplus command the log file also displays select query. I don't want to use -s and also don't want to display select query. How can I do that?

  • @ShubhamRai06
    @ShubhamRai06 3 ปีที่แล้ว

    how to connect to teradata database and run sql query from unix.

  • @rajesha7184
    @rajesha7184 5 ปีที่แล้ว +1

    How to pass input from Unix shell script to .sql

    • @learnomate
      @learnomate  5 ปีที่แล้ว

      You can define your variable in Unix script and then call to that variable inside SQL script.

    • @rajesha7184
      @rajesha7184 5 ปีที่แล้ว

      @@learnomate how to call variable from Unix to .sql

  • @mohdqader8756
    @mohdqader8756 2 ปีที่แล้ว

    You are not providing scripts in description box its time wasting

  • @kabira__shaikh
    @kabira__shaikh 4 ปีที่แล้ว

    After connection with oracle DB from bash unix shell, I'm trying to INSERT few records in table but it is not working. No error and no insertion of record in the table. What could be the issue ?

  • @srinivasua5798
    @srinivasua5798 2 ปีที่แล้ว

    Hi bro

  • @SuperSriRanjani1
    @SuperSriRanjani1 5 ปีที่แล้ว +2

    ps -eflgrep pmon will show running process with PIDs
    ***************
    $ls -lrt --ls -ltr file* : This command just list the contents of the current directory in the long listing format ( -l ), sorted by modification time ( -t ) in reverse order ( -r ) of all files and directories beginning with file for files like dbcheck.sh
    ls --help
    *************************
    #!/bin/bash on the first line, meaning that the script should always be run with bash, rather than another shell.
    **************************************
    vi dbcheck.sh shows the following lines to edit
    current_date=$(date +%Y-%m-%d)
    sqlplus -s " / as sysdba " database_status is the file name and date is attached to that log file. Any wrong matters will be reported to this log file. here, one arrow will replace the content of log file. If you use EOF>> will append the log file. Two arrows.
    Save the file and comeout.
    $ ls -ltr file* : This command just list the contents of the current directory in the long listing format ( -l ), sorted by modification time ( -t ) in reverse order ( -r ) of all files and directories beginning including file .log
    $./dbcheck.sh --will run this shell. You have t use ./name of shell (to run a shell)
    $date will show current date and time
    $cat database_status_2018_11-21.log will show the contents dumped into this log file.
    $You can see the name of database and current status
    Name Open_mode
    ----------------------------------------
    ORCL READ WRITE
    READ WRITE MEANS it is currently up and running.

    • @axyytube
      @axyytube 4 ปีที่แล้ว

      col name for a30 -will check name of database.
      This is totally wrong.
      This is sqlplus command which just use to formating of column width while displaying value on command prompt.
      Full form of this command as per below.
      column name format a30.
      a30 is used to show column with width of Alphanumeric 30 characters.

  • @ArizuddinGulam
    @ArizuddinGulam 4 ปีที่แล้ว

    N