[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

SQL in CSH script

Posted on 1999-01-26
3
Medium Priority
?
368 Views
Last Modified: 2013-12-23
How can incorporate some sql commands in a .csh file.
for example I want to run sqlplus and the desc a table.
thanks,
m3
0
Comment
Question by:m3
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 51

Accepted Solution

by:
ahoffmann earned 150 total points
ID: 1583285
#! /bin/csh -f -b

echo "descr table;"  > /tmp/sql.cmd
echo "exit;"            >> /tmp/sql.cmd
sqlplus -s user/passwd @/tmp/sql.cmd
rm  /tmp/sql.cmd
0
 

Author Comment

by:m3
ID: 1583286
Could you explain what are the options -f -b for the cshell and -s for sqlplus? Thanks.
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 1583287
man csh sqlplus  ;-)

          [-s[ilent]]
          Suppress all SQL*Plus information and prompt messages.

         [ -f]
         Starts without searching for or running commands from the
        .cshrc file in your home directory.

         [-b]
         End of option passed to csh itself. Allows passing options to
         the shell script itself (like -f or -c).
0

Featured Post

Veeam Task Manager for Hyper-V

Task Manager for Hyper-V provides critical information that allows you to monitor Hyper-V performance by displaying real-time views of CPU and memory at the individual VM-level, so you can quickly identify which VMs are using host resources.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

WARNING:   If you follow the instructions here, you will wipe out your VTP and VLAN configurations.  Make sure you have backed up your switch!!! I recently had some issues with a few low-end Cisco routers (RV325) and I opened a case with Cisco TA…
This article explains the fundamentals of industrial networking which ultimately is the backbone network which is providing communications for process devices like robots and other not so interesting stuff.
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…

656 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question