Home » SQL & PL/SQL » SQL & PL/SQL » plsql pb
plsql pb [message #262353] Sun, 26 August 2007 08:18 Go to next message
Messages: 95
Registered: July 2003
Hello folks,
The little script bellow was made by me in order to alter the datafiles of my database "AMR" to not autoextensible:

set serveroutput on
cursor cur is select name from v$datafile_header;
v_name sys.v$datafile_header.name%type;
open cur ;
fetch cur into v_name;
while cur%found loop
execute immediate 'alter database amr datafile '||v_name||' autoextend off';
dbms_output.put_line('Datafile= '|| v_name ||' ... OK.');
fetch cur into v_name;
End loop;
Close cur ;

But i receive a message error saying the following:

ERREUR la ligne 1 :
ORA-02236: nom de fichier non valide
ORA-06512: ligne 9

Could you help me to solve this problem.. Thank you.
Re: plsql pb [message #262356 is a reply to message #262353] Sun, 26 August 2007 08:24 Go to previous messageGo to next message
Mohammad Taj
Messages: 2412
Registered: September 2006
Location: Dubai, UAE
Senior Member

ORA-02236: invalid file name 
Cause: A character string literal was not used in the filename list of a LOGFILE, DATAFILE, or RENAME clause. 
[b]Action: Use correct syntax. [/b]
Re: plsql pb [message #262359 is a reply to message #262353] Sun, 26 August 2007 08:39 Go to previous message
Michel Cadot
Messages: 65146
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
File name must be enclosed between ': http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_1004.htm#i2188492

Previous Topic: Dynamically controlling the flow of the script
Next Topic: Grant previlages
Goto Forum:

Current Time: Mon Aug 21 03:35:20 CDT 2017

Total time taken to generate the page: 0.01532 seconds