Total Pageviews

2013/09/03

SP2-0734: unknown command beginning "alter tab..." - rest of line ignored.

Problem
I would like to execute a SQL script file with simple alter table script  as follows:

But it showed this error message:
1:  SQL*Plus: Release 11.2.0.2.0 Production on Tue Sep 3 08:03:36 2013  
2:  Copyright (c) 1982, 2010, Oracle. All rights reserved.  
3:  Connected to:  
4:  Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production  
5:  With the Partitioning, Oracle Label Security and Oracle Database Vault options  
6:  SP2-0734: unknown command beginning "alter tab..." - rest of line ignored.  
7:  SQL> Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.2.0  
8:  - 64bit Production  


With the Partitioning, Oracle Label Security and Oracle Database Vault options

Root Cause
It resulted from the SQL file has BOM character:
Solution
What you need to do is to convert the encoding of SQL file to UTF-8 without BOM and execute again, then this problem will be resolved.

No comments: