【问题标题】:ORA-06550 and PLS-00103ORA-06550 和 PLS-00103
【发布时间】:2010-11-24 19:39:12
【问题描述】:

嗨,

我正在使用 UNIX 操作系统并使用 oracle。我收到以下错误消息

E ORA-06550: line 1, column 8:
PLS-00103: Encountered the symbol "" when expecting one of the following:

   begin function package pragma procedure subtype type use
   <an identifier> <a double-quoted delimited-identifier> form
   current cursor
The symbol "" was ignored.
ORA-06550: line 2, column 27:
PLS-00103: Encountered the symbol "" when expecting one of the following:

   begin function package pragma procedure subtype type use
   <an identifier> <a double-quoted delimited-identifier> 

在谷歌上搜索,我发现 “问题似乎与换行符上的 Windows CRLF 字符有关。Oracle 不会将此视为空白,而是将其视为空字符串。为了解决此问题,请将 CRLF 字符转换为 LF 字符,Oracle 应该开心点。”

有人知道为什么它会在 UNIX/ksh shell 中发生吗?

【问题讨论】:

  • 您运行的脚本是在 Windows 系统上创建的吗?
  • 就像 JOTN 建议的那样,我最好的猜测是这个脚本是在 Windows 系统上创建的,并以二进制模式传输到 UNIX(这将保存 CRLF 作为行终止符,而不是仅转换为 LF)。
  • 请建议如何克服这个问题
  • 在许多 Unix 系统上寻找一个名为“dos2unix”的命令。它会为您转换该文件。
  • 我不认为 Windows CRLF 会导致这个问题,至少在过去 15 年多的时间里我从未遇到过。许多人在 Windows 机器上编写脚本并在 Unix 上运行它们。

标签: oracle unix ora-06550 pls-00103


【解决方案1】:

正如@JOTN 所说,dos2unix 命令是您的朋友。应该调用类似

dos2unix the_file_you_want_converted > another_file_to_hold_the_unix_version

分享和享受。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2018-04-12
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-01-18
    • 2015-03-18
    相关资源
    最近更新 更多