Hi,
I want to have an alias for the command "alter database datafile <id> resize <size>". So I created such
alias dfrz=alter database datafile :file_id resize :file_size;
But using this one fails with strange errors:
SQL> dfrz 3 1G;
Error starting at line : 1 File @ /ALIAS/dfrz
In command -
alter database datafile :file_id resize :file_size
Error report -
ORA-02236: Ungültiger Dateiname
02236. 00000 - "invalid file name"
*Cause: A character string literal was not used in the filename list
of a LOGFILE, DATAFILE, or RENAME clause.
*Action: Use correct syntax.
SQL>
What I imagined was that the parameter may be given as strings instead of numbers, but that would mean that the alias would be translated into
alter database datafile '3' resize '1G';
but this produces ORA-02237 instead of ORA-02236.
So, how to make this alias work? What is wrong with it?