Home » SQL & PL/SQL » Client Tools » Unable to open file
Unable to open file [message #551012] Sat, 14 April 2012 15:22 Go to next message
Anil09
Messages: 8
Registered: April 2012
Location: Pune
Junior Member
when i run the script file 1.sql
It throws me following error
SQL> @/c/temp/1.sql
SP2-0310: unable to open file "/c/temp/1.sql"
How this is resolved
thank you
Anil Kumar
Re: oracle 10g Express Edition [message #551013 is a reply to message #551012] Sat, 14 April 2012 15:26 Go to previous messageGo to next message
Littlefoot
Messages: 21331
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Not familiar with DOS, eh? Try
SQL> @c:\temp\1.sql

Or, even better, start SQL*Plus from a directory that contains your SQL scripts - it will be much easier for you. For example:
C:\>cd temp

C:\temp>sqlplus scott/tiger

SQL*Plus: Release 11.2.0.2.0 Production on Sub Tra 14 22:26:48 2012

Copyright (c) 1982, 2010, Oracle.  All rights reserved.


Connected to:
Oracle Database 11g Express Edition Release 11.2.0.2.0 - Production

SQL> @p

    DEPTNO DNAME          LOC
---------- -------------- -------------
        10 ACCOUNTING     NEW YORK
        20 RESEARCH       DALLAS
        30 SALES          CHICAGO
        40 OPERATIONS     BOSTON

SQL>
Re: Unable to open file [message #551026] Sat, 14 April 2012 22:59 Go to previous messageGo to next message
Anil09
Messages: 8
Registered: April 2012
Location: Pune
Junior Member
Hi
It throws me following error
SQL> @1
SP2-0042: unknown command " ■c" - rest of line ignored.
Re: Unable to open file [message #551029 is a reply to message #551026] Sat, 14 April 2012 23:04 Go to previous messageGo to next message
BlackSwan
Messages: 25796
Registered: January 2009
Location: SoCal
Senior Member
post content of 1.sql file
Re: Unable to open file [message #551030] Sat, 14 April 2012 23:13 Go to previous message
Anil09
Messages: 8
Registered: April 2012
Location: Pune
Junior Member
Hi All
SQL> ed
Wrote file afiedt.buf

1 create or replace procedure p as
2 x varchar2(12);
3 begin
4 dbms_output.put_line('Message '||x);
5* end;
SQL> /

Procedure created.

SQL> exec p
Message

PL/SQL procedure successfully completed.

Now My problem is solved
thank you again for helping me out of this.
Shocked
Previous Topic: Help in getting the results correctly
Next Topic: Schema Broswer
Goto Forum:
  


Current Time: Fri Jan 19 16:40:09 CST 2018

Total time taken to generate the page: 0.03064 seconds