Question

Asked on 2000-09-27 at 12:34:15ID: 25454648

Calling a Text File from SQL Plus

by: tomhigh50

Rating9.4Excellent

I am trying to delete a bunch of tables from an Oracle databse using SQL Plus.  

I have written the following script into a text file:

DROP TABLE test1;
/
DROP TABLE test2;
/

This file is saved directly to the root. (c:drop.sql).  To call this file from SQL Plus I have been advized to use the following script:

SQL> @drop.sql;

But...  i am getting an error:
SP2-0310: Unable to Open File "DROP.SQL"

Have i missed something in the text file or when calling it from the script?


  1. Calling a Text File from SQL Plus
    I am trying to delete a bunch of tables from an Oracle databse using SQL Plus. I have written the following script into a text file: DROP TABLE test1; / DROP TABLE test2; / This file is saved directly to the root. (c:drop.sql). To call this file from SQL Plus I have been advized to use the following script: SQL>…
  2. How do I call an Oracle stored procedure from S…
    Hi, I'm trying to call an Oracle stored procedure from SQL server using a linked server and can't get this working. What I've done so far is the following: 1. I created a store procedure SQL_SP1 on SQL server which is on Window server . Then I created a store procedure on Oracle which is on Unix server (Oracle_SP1) 2.…
  3. How to call SQL*Plus script from Oracle DBMS…
    Hi We currently have a number of SQL*Plus scripts which are executed from CSH scripts under Unix. We are moving these to Windows 2000, so the question is, how can I call a SQL*Plus script from an Oracle JOB ?? Thanks!
  4. Call a PL/SQL Package Procedure from a Anony…
    Hi, I want to be able to call a Anonymous block of PL/SQL and within this block there is a loop which asks the user whether they want to add a new record or not... If the user wants to add a new record there are seven values they need to supplied so i want to disply seven questions and each time a user types in a value this is stored within the …
  5. Spool SQL Plus to create a file name
    Hi All, I will need to spool the result of a 2 queris to two different .txt file The name of the file should be: C:\Temp\file1YYYYMMDD.txt (where YYYYMMDD is 20100126 for today) so for todays file the name of the file should be: C:\Temp\file120100126.txt The other one C:\Temp\sample220100126…

Solution

Sign up now to view this solution! It's quick, easy, and secure to subscribe. We will return you to this solution, unlocked, when you’re done.

About this Solution
View This Solution - Start Your 30 Day Free Trial
Zone
General
Tags
file open plus sql
Participating Experts
2
Solution Grade
A

Replies

 by: geotiger

Posted on 2000-09-27 at 12:41:58ID: 28210070

All comments and solutions are available to Premium Service Members only. Sign up to view the solution to this question. Already a member? Log in to view this solution.

 by:

Posted on 2000-09-27 at 12:42:29ID: 28210071

All comments and solutions are available to Premium Service Members only. Sign up to view the solution to this question. Already a member? Log in to view this solution.

 by: tomhigh

Posted on 2000-09-27 at 13:34:39ID: 28210072

All comments and solutions are available to Premium Service Members only. Sign up to view the solution to this question. Already a member? Log in to view this solution.

 by: markgeer

Posted on 2000-09-28 at 04:50:57ID: 28210073

All comments and solutions are available to Premium Service Members only. Sign up to view the solution to this question. Already a member? Log in to view this solution.

 by: tomhigh

Posted on 2000-09-28 at 05:43:45ID: 28210074

All comments and solutions are available to Premium Service Members only. Sign up to view the solution to this question. Already a member? Log in to view this solution.

Stay Connected

Oracle Around the Web

The latest Oracle news, tips, and tricks

Oracle Unveils Netra SPARC T3 Servers

New Carrier-Grade Blade and Rackmount Servers Deliver Better Performance, Density and Power Efficiency for the Communications Industry ...

read more

Oracle fixes 21 flaws in Java SE, Java for Business

Oracle is fixing 21 flaws in its Java SE and Java for Business products in its February critical patch update issued this week ...

read more

Obama’s Silicon Valley “Tech Supper”

Why was he there? Who wasn’t invited and why? What did they talk about? Why was he really there? These are the questions being debated ...

read more

Featured Oracle Experts

slightwv

slightwv has answered more than 2,000 Oracle questions and oversees database management within the U.S. Government. Slightwv

sdstuber

A regular presenter at the Collaborate conference, Oracle developer sdstuber is a top expert in PL/SQL and Oracle 9, 10 and 11. sdstuber

Testimonials

What users are saying about our experts

"The Oracle gurus provide answers, solutions and valuable workarounds"

User: schwertner

"Wow! Excellent, valuable explanation. Hats off to you"

User: aseshu70

"Solution worked fantastic and performs excellent! Thanks heaps"

User: klausbrandlhuber

Top Experts

  1. slightwv

    2,000

    0 points yesterday

    Profile

BrowseBecome an Expert