有什么方法可以判断Oracle导出是否仍在运行?(Any way to tell if an Oracle export is still running?)
我有一个已经运行了近2天的Oracle导出。
导出文件显示今天早上5点的修改时间,并且似乎没有增长。
日志文件不显示任何错误。
我认为它被卡住了,我需要重新启动它,但我不想取消它只是为了发现它仍在继续,我只是没有等待足够长的时间。
有什么方法可以肯定地知道出口是否还在运行?
I've got an Oracle export that's been running for almost 2 days now.
The export file shows a modification time of 5 am this morning and does not appear to be growing.
The log file does not show any errors.
I think it's stuck and I need to restart it, but I'd hate to cancel it only to find out it was still going and I simply didn't wait long enough.
Any way to definitely know if the export is still running?
原文:https://stackoverflow.com/questions/1549150
最满意答案
它取决于您的后端(DB2或Oracle)您使用的语法。 另外,你想要“昨天”相对于用户,还是服务器? 假设后者,因为这听起来像服务器上的工作。
我认为您正在寻找的是:DB2的
CURRENT DATE
和Oracle的SYSDATE
这些相当于服务器日期和时间的“今天”。 这份工作会在午夜后运行吗? 它可能就像添加
-1
一样简单,但如果作业有时在午夜之前运行,并且在其他时间午夜之后运行,则可能会遇到麻烦(不知道如果作业在午夜运行会发生什么)。It depends on your backend (DB2 or Oracle) which syntax you use. Also, do you want "yesterday" relative to the user, or to the server? Assuming the latter, because this sounds like a job on the server.
I think what you're looking for is:
CURRENT DATE
for DB2 andSYSDATE
for OracleThese are the equivalent of "today" relative to the server's date and time. Will the job run after midnight? It might be as simple as adding
-1
but you could run into trouble if the job runs before midnight sometimes, and after midnight other times (don't know what would happen if the job ran through midnight).
相关问答
更多-
DB2和oracle的空值转换[2023-07-18]
VALUE(?,0), NVL(?,0) 是这个? 还是coalesce -
在db2中,您可以使用表函数:AUTH_LIST_AUTHORITIES_FOR_AUTHID select authority, d_user, d_group, d_public, role_group, role_user, role_public, d_role from table (sysproc.auth_list_authorities_for_authid ('sapbw','U')) as t order by authority" 有关更多信息,请访问: http : //pic.d ...
-
如何在db2中使用递归查询(How to use Recursive query in db2)[2022-05-26]
使用REPEAT而不是LPAD更正db2的查询 with x(id,val) as ( select 1, REPEAT('*',1) from sysibm.sysdummy1 union all select id+1, REPEAT('*',id+1) from x where id < 20 ) select val from x with x(id,val) as ( select 20, REPEAT('*',20) from sysibm.sysdummy1 union all ... -
最好不要对列进行操作,因此使用索引。 您可以对当前日期进行类型转换以适合您的数据,如下所示: WHERE extd1h = INTEGER(VARCHAR_FORMAT(CURRENT DATE,'YYYYMMDD')) It's best not to do operations on the columns, so the indexes are used. You can typecast the current date to fit your data as follows: WHERE ext ...
-
Hyperion报告 - 前一天的查询(DB2和Oracle)(Hyperion Reporting - Query for prior day (DB2 and Oracle))[2022-03-06]
它取决于您的后端(DB2或Oracle)您使用的语法。 另外,你想要“昨天”相对于用户,还是服务器? 假设后者,因为这听起来像服务器上的工作。 我认为您正在寻找的是:DB2的CURRENT DATE和Oracle的SYSDATE 这些相当于服务器日期和时间的“今天”。 这份工作会在午夜后运行吗? 它可能就像添加-1一样简单,但如果作业有时在午夜之前运行,并且在其他时间午夜之后运行,则可能会遇到麻烦(不知道如果作业在午夜运行会发生什么)。 It depends on your backend (DB2 or ... -
因为extd2d不是实际的日期数据类型。 所以你可以在那里有空格,或者'20180219'... 就个人而言,我会改变看表来使用日期数据类型。 但那通常不是快捷或容易的。 在这种情况下,我会为转换创建一个UDF,如果数据无效,则返回NULL。 或者从这里下载Alan Campin的iDate 然后,您可以使用UDF查找具有错误数据的行。 转换字面值,而不是表格中的数据也更好。 这样可以使用extd2d上的任何索引... select framec, covr1c, colr1c, sum(o ...
-
UNION查询与hyperion Reporting Studio 9.3(BRIO)(UNION Query with hyperion Reporting Studio 9.3 (BRIO))[2022-12-24]
答案是您在第一个选项卡上删除表A 和 B而没有它们之间的连接但在第一个选项卡上,只将表A的列拖动为“请求”字段。 同样,在选项卡B上,将表B中的列拖到“请求”列。 将其添加到我说BRIO不直观的原因列表中,只需3天的经验就可以获得很长的清单。 The answer is that you drop table A AND B on the first tab without a join between them but on the first tab, to only drag the columns ... -
也许正确使用to_char? SQL> select to_char(sysdate,'dd-Mon-yyyy hh24:mi:ss') full_date, 2 to_char(sysdate,'yyyy-mm-dd') date_only, 3 to_char(sysdate,'hh24:mi:ss') time_only 4 from dual; FULL_DATE DATE_ONLY TIME_ONL -------------------- -- ...
-
任何交易都需要正确终止 - 您为什么认为这只适用于插入和更新? 考虑以交易方式运行“从b中选择a,其中c> 12”,然后“从b中选择a,其中c <= 12”; 在一个事务中,数据库必须保证每一个从第一次或第二次select返回,而不是两次(假设c不会是null ;-))。 如果没有事务性,某些a可能会陷入裂缝之中,或者如果它们的对应c被另一个事务更改,则返回两次,而这不仅仅是ACID! - ) 所以,当你不需要单独的SELECT查询彼此交易时,告诉数据库! 你说的方式是在每次选择后终止事务(通常提交是你为此 ...
-
在DB2 CLP脚本中,您可以使用SET TERMINATOR指令“动态”更改语句终止符: --#SET TERMINATOR ; select * from sysibm.sysdummy1; --#SET TERMINATOR / create or replace trigger t1 ... begin ... end / 然后,您将其称为db2 -tf myscript.sql 。 请注意,SET TERMINATOR指令必须为大写。 我认为没有选择在Oracle SQL * Plus脚本中 ...