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

THE SCRIPT:
===================================
set serveroutput on
DECLARE
cursor cur is select name from v$datafile_header;
v_name sys.v$datafile_header.name%type;
BEGIN
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 ;
END;
/
===================================

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: 64139
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

Regards
Michel
Previous Topic: submit a process without waiting
Next Topic: cross tab query problem
Goto Forum:
  


Current Time: Thu Dec 08 12:44:03 CST 2016

Total time taken to generate the page: 0.05243 seconds