【问题标题】:Purge RecycleBin statement does not work in SSISPurge RecycleBin 语句在 SSIS 中不起作用
【发布时间】:2014-06-02 15:36:38
【问题描述】:

我有一个 SSIS 包,可以对我的 Oracle 数据库进行维护工作。作为其中的一部分,我使用以下命令清除 RecycleBin:

Purge RecycleBin

此命令在 SQLDeveloper 中可以正常工作。但是,当我从 SSIS 发出相同的命令时(在 Execute SQL 内,它会失败并显示以下错误消息:

Executing the query "Purge RecycleBin" failed with the following error: "ORA-38302: Invalid Purge Option"

我该如何解决这个问题?

【问题讨论】:

    标签: oracle plsql ssis oracle11g sql-server-2012


    【解决方案1】:

    看起来你有一个错字。你的错误信息说

    执行查询“Purge RecyleBin”失败...

    检查您的查询,您是否拼错了RecycleBin

    根据您对错误消息的图像,它似乎是查询本身的拼写错误。

    尝试使用以下查询来提取错误消息的真实文本,而不是使用漂亮但无用的报告。

    -- Find all messages associated to the last failing run
    SELECT
        OM.operation_message_id
    ,   OM.operation_id
    ,   OM.message_time
    ,   OM.message_type
    ,   OM.message_source_type
    ,   OM.message
    FROM
        SSISDB.catalog.operation_messages AS OM
    WHERE
        OM.operation_id = 
        (  
            -- Find the last failing operation
            -- lazy assumption that biggest operation
            -- id is last. Could be incorrect if a long
            -- running process fails after a quick process
            -- has also failed
            SELECT 
                MAX(OM.operation_id)
            FROM
                SSISDB.catalog.operation_messages AS OM
            WHERE
                OM.message_type = 120
        );
    

    如果您知道您的操作 ID,您可以将其粘贴到子查询中

    【讨论】:

    • 这是我发布问题时的拼写错误。如果您查看错误消息的图片,它会显示正确的拼写。
    • 我确实看了错误信息的图片,得出了上述结论
    • SMH.. 首先是RecyleBin,然后是RecycelBin。我的 SQL 代码需要一个拼写检查器。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2017-05-22
    • 2018-08-11
    • 1970-01-01
    • 1970-01-01
    • 2019-01-17
    • 2015-05-12
    • 2016-04-25
    相关资源
    最近更新 更多