Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: Unable to run catalog.sql

RE: Unable to run catalog.sql

From: Ken Janusz <ken.janusz_at_sufsys.com>
Date: Wed, 28 Nov 2001 09:00:32 -0800
Message-ID: <F001.003CF27A.20011128084027@fatcity.com>

Kurt:

Thanks I'll give this a try.

Ken

 -----Original Message-----
Sent: Wednesday, November 28, 2001 10:06 AM

To:     Multiple recipients of list ORACLE-L
Subject:        RE: Unable to run catalog.sql

  Ken,
    I went out to metalink and did a search on SP2-0310; this is the result. I hope
it proves useful.  

Kurt Wiegand
IBM Global Services
Cable & Wireless Communications
703 760-3619       

Bookmark Fixed font Go to End  

Doc ID: Note:121371.1
Type: PROBLEM
Status: REVIEWED
 Content Type: TEXT/PLAIN
Creation Date: 04-OCT-2000
Last Revision Date: 02-FEB-2001    



This article is being delivered in Draft form and may contain errors. Please use the MetaLink "Feedback" button to advise Oracle of any issues related to this article.
 

Problem Description


 

You have created a SQL script and saved it to a directory on your PC hard drive (for example c:\script). You are able to execute this script in SQL*Plus by entering the following command:  

SQL>@C:\script\myscript.sql  

However, when you try to open the script file in the SQL*Plus session, via Top Menu Bar --> File --> Open --> you receive an error:  

SP2-0310: unable to open file "c:\script\myscript.sql"  

Solution Description


 

This error can be eliminated by doing one of the following workarounds:  

  1. Within the SQL*Plus window, enter the following command:

    SQL> set editfile C:\script (directory where scripts are saved)  

NOTE: This will allow you to open the myscript.sql file without encountering any errors, but the setting will only be retained for the current session. If
you would like to make this a permanent change, add the above command to the login.sql file on your PC.  

2. Update the Windows Registry to add, or edit, the SQLPATH variable:  

On Windows PC, go to Start --> Run --> Regedit --> HKEY_LOCAL_MACHINE --> Software ---> Oracle ---> desired Home (could be HOME0, HOME1, etc.) and add/modify new string value for SQLPATH. Once the string is added, you can edit it to specify the directory where your SQL scripts are stored. You can have multiple directories, but each directory must be separated by a semicolon (;).  

Explanation


 

The SP2-0310 is an abnormal error condition. In a default Windows installation,
this error should not occur when trying to open a file in the manner described.
By setting the editfile or SQLPATH, the errors is resolved.  

The SQLPATH variable is used as the search path when SQL*Plus executes scripts.
By default, SQL*Plus, will first search in the Oracle_Home\bin directory and then any directories specified in the SQLPATH variable.  

References


 

Other Related documents or causes for this error:  

Bug 883193, SP2-310 CANNOT SPECIFY A DIRECTORY WITH SPACES IN BETWEEN Bug 935869, SLDEXT FUNCTION DOES NOT RECOGNIZE "?" AS A ORACLE Note 105052.1, Does SQL*Plus not recognize files in directories with

               spaces in their names?  

Additional Search Words


 

path,plus80, script, plus81, SP2
.      



 

 Copyright (c) 1995,2000 Oracle Corporation. All Rights Reserved. Legal Notices and Terms of Use.    

-----Original Message-----
Sent: Wednesday, November 28, 2001 8:11 AM To: Multiple recipients of list ORACLE-L

I am connected as sys.  

Ken  

-----Original Message-----
Sent: Wednesday, November 28, 2001 4:05 AM To: Multiple recipients of list ORACLE-L  

the catalog.sql Must be run when connected to SYS or INTERNAL.

Is it true for ur case?
Nirmal.,

-----Original Message-----
Sent: Tuesday, November 27, 2001 10:00 PM To: Multiple recipients of list ORACLE-L

I have tried to run catalog.sql from the sql*plus command line and keep getting this error.
sp2-0310 unable to open file "catalog.sql". I've use the full path name with the same results.
catalog.sql is on my PC and the database is located on a server. I have run other commands from my client machine with no problems.

What appears to be the problem?

TIA Ken Janusz, CPIM
Database Conversion Lead
Sufficient System, Inc.
Minneapolis, MN

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
<http://www.orafaq.com>  
-- 
Author: Ken Janusz 
  INET: ken.janusz_at_sufsys.com 

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051 
San Diego, California        -- Public Internet access / Mailing Lists 
-------------------------------------------------------------------- 
To REMOVE yourself from this mailing list, send an E-Mail message 
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in 
the message BODY, include a line containing: UNSUB ORACLE-L 
(or the name of mailing list you want to be removed from).  You may 
also send the HELP command for other information (like subscribing). 

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Wiegand, Kurt
  INET: Kurt.Wiegand_at_CWUSA.COM

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Ken Janusz
  INET: ken.janusz_at_sufsys.com

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
Received on Wed Nov 28 2001 - 11:00:32 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US