Oracle JOB问题解决汇总

Oracle停止job的正确方式 Oracle停止job的正确方式 1、改job状态broken由N为Y 2、删除job 阅读详情

一。job的运行频率设置

1.每天固定时间运行,比如早上8:10分钟:Trunc(Sysdate+1) + (8*60+10)/24*60

2.Toad中提供的:

每天:trunc(sysdate+1)

每周:trunc(sysdate+7)

每月:trunc(sysdate+30)

每个星期日:next_day(trunc(sysdate),'SUNDAY')

每天6点:trunc(sysdate+1)+6/24

半个小时:sysdate+30/1440

3.每个小时的第15分钟运行,比如:8:15,9:15,10:15...:trunc(sysdate,'hh')+75/1440。原先我设置的是trunc(sysdate,'hh')+15/1440,发现居然不行。

二。JOB为什么不运行?

1.先来了解一下JOB的参数说明:与job相关的参数一个是job_queue_processes,这个是运行JOB时候所起的进程数,当然系统里面JOB大于这个数值后,就会有排队等候的,最小值是0,表示不运行JOB,最大值是36,在OS上对应的进程时SNPn,9i以后OS上管理JOB的进程叫CJQn。可以使用下面这个SQL确定目前有几个SNP/CJQ在运行。

select * from v$bgprocess,这个paddr不为空的snp/cjq进程就是目前空闲的进程,有的表示正在工作的进程。

另外一个是job_queue_interval,范围在1--3600之间,单位是秒,这个是唤醒JOB的process,因为每次snp运行完他就休息了,需要定期唤醒他,这个值不能太小,太小会影响数据库的性能。

2.诊断:先确定上面这两个参数设置是否正确,特别是第一个参数,设置为0了,所有JOB就不会跑,确认无误后,我们继续向下。

3.使用下面的SQL察看JOB的的broken,last_date和next_date,last_date是指最近一次job运行成功的结束时间,next_date是根据设置的频率计算的下次执行时间,根据这个信息就可以判断JOB上次是否正常,还可以判断下次的时间对不对,SQL如下:

select * from dba_jobs

有时候我们发现他的next_date是4000年1月1日,说明job要不就是在running,要不就是状态是break(broken=Y),如果发现JOB的broken值为Y,找用户了解一下,确定该JOB是否可以broken,如果不能broken,那就把broken值修改成N,修改再使用上面的SQL察看就发现他的last_date已经变了,JOB即可正常运行,修改broken状态的SQL如下:

 declare

BEGIN

DBMS_JOB.BROKEN(<JOB_ID>,FALSE);

END;

4.使用下面的SQL查询是否JOB还在Running

select * from dba_jobs_running

如果发现JOB已经Run了很久了还没有结束,就要查原因了。一般的JOB running时会锁定相关的相关的资源,可以查看一下v$access和v$locked_object这两个view,如果发现其他进程锁定了与JOB相关的Object,包括PKG/Function/Procedure/Table等资源,那么就要把其他进程删除,有必要的话,把JOB的进程也删除,再重新跑看看结果。

5.如果上面都正常,但是JOB还不run,怎么办?那我们要考虑把JOB进程重启一次,防止是SNP进程死了造成JOB不跑,指令如下:

alter system set job_queue_processes=0 --关闭job进程,等待5--10秒钟

alter system set job_quene_processes=5 --恢复原来的值

6.Oracle的BUG

Oracle9i里面有一个BUG,当计数器到497天时,刚好达到它的最大值,再计数就会变成-1,继续计数就变成0了,然后计数器将不再跑了。如果碰到这种情况就得重启数据库,我们这边有一个生产型的数据库版本是9205,就发生过这样一次问题,后来和用户约时间重启后就没问题了。但是其他的Oracle7345和Oracle8i的数据库没有发现这个问题。

7.数据库上的检查基本上就这多,如果JOB运行还有问题,那需要配合用户察看一下是否是程序本身的问题,比如处理的资料量大,或者网络速度慢等造成运行时过长,那就需要具体情况具体分析了。我们可以通过下面的SQL手工执行一下JOB看看:

declare

begin

dbms_job.run(<job>_ID)

end;

如果发现JOB执行不正常,就要结合程序具体分析一下。 

【Oracle】Oracle JOB常用操作 【代码】Oracle job常用操作。 阅读详情

相关推荐

C# 与 TensorFlow.NET:深度神经网络构建与优化的终极指南

是一个由开源社区维护的 C# 库,它将 TensorFlow 框架的强大功能带到了 C# 开发者的手中。TensorFlow 本身是 Google 开发的一个机器学习框架,广泛应用于深度学习、强化学习等领域。通过 TensorFlow.NET,C# 开发者无需切换语言环境,可以直接在 C# 中构建、训练和优化深度神经网络模型。首先,我们需要定义一个神经网络。该网络将包含输入层、隐藏层和输出层。// 输入张量(XOR 输入,2 个特征)// 输出张量(标签,1 个输出)// 定义第一个隐藏层。

这里只有干货:从 Modbus 通信到 MES 对接,从 YOLO 训练到工控机部署,带你搞定工业软件开发全流程。 1456

trunc函数的使用

trunc函数的使用

m0_64979027的博客 1578

proteus仿真51单片机操作指南:串口通信仿真配置详解

深入讲解如何在proteus仿真51单片机中实现串口通信,涵盖虚拟串口设置、电路连接与调试技巧,帮助开发者高效完成通信仿真验证。

weixin_36197669的博客 570

Oracle——24定时任务

            我们有时候会这么一个需求:希望数据库能够定时的帮我们做某一件事。比如说我们希望数据库能够定期的把库里面某一张表、或某些表的数据汇总到另外一张汇总表里面。那么这个时候我们就可以通过使用数据库的定期任务来实现这么一个功能。             下面我们来举一个简单的例子,假如我们有如下两张表,t1和t2。 t1及其对应的sequence: create table...

Elim的博客 312

昇腾CANN实战:如何用DVPP+AIPP实现32路视频流毫秒级预处理(附性能对比)

本文深入探讨了昇腾CANN架构中DVPP和AIPP模块在32路视频流毫秒级预处理中的硬件加速技术。通过异构计算架构的优化,实现了从传统CPU方案的40.7毫秒到CANN方案3.4毫秒的显著性能提升,特别适用于智能安防领域的实时视频分析需求。文章详细解析了DVPP多通道并行设计和AIPP模型级预处理融合的技术细节,并提供了性能对比数据与实战调优经验。

alice7model的博客 919

阿里云网络架构设计

背景 一个企业上云,首先要考虑整个网络的规划,涉及到云上和云下的网络规划,云上VPC的规划,云上不同地域VPC的互通,云上可用区的选择等等,所以一定要提前规划好整体的网络架构,现在阿里云云上的虚拟化网络解决方案已经完全转向 了云企业网,所以所有使用阿里云的企业客户多多少少都会使用阿里云的CEN 支撑自己的业务。 云企业网介绍 云企业网(Cloud Enterprise Network)是承载在阿里云提供的高性能、低延迟的私有全球网络上的一张高可用网络。 IDC专线接入CEN 首先面临的是云上和云下打通,那么

修电脑的码农 4840

oracle创建job并执行job及JOB问题解决汇总

1、首先job要在command命令下执行才有效  DECLARE X NUMBER; BEGIN SYS.DBMS_JOB.SUBMIT ( job => X ,what => 'test;' ,next_date => to_date('05-02-2016 11:40:00', 'dd-mm-yyyy hh24:mi:ss') ,interval => 'sys

admin1973的专栏 1万+

FISCO-BCOS配置及使用控制台

如果因为网络问题长时间无法下载,请尝试:curl -#LO https://gitee.com/FISCO-BCOS/console/raw/master-2.0/tools/download_console.sh && bash download_console.sh。为了可以更加方便快捷,所以HelloWorld合约已经被内置了,位于控制台下面的contracts/solidity/HelloWorld.sol。用于获取和设置name的值,合约代码如下。部署成功会返回合约地址。

qq_51562644的博客 831

oracle job 4000 1 1,oracle創建job並執行job及JOB問題解決匯總

即可.4、查看job運行情況select * from user_jobs;select * from dba_jobs_running;select * from dba_jobs;JOB問題解決匯總:一。JOB為什么不運行?1.先來了解一下JOB的參數說明:與job相關的參數一個是job_queue_processes,這個是運行JOB時候所起的進程數,當然系統里面JOB大於這個數值后,就會有...

weixin_29123181的博客 345

深入SVT SPI VIP配置:如何灵活控制CS间隔、数据帧大小与时钟频率(含代码片段)

本文深入探讨了SVT SPI VIP的高级配置技巧,包括精确控制CS信号间隔、突破数据帧大小限制以及动态时钟频率切换。通过实战代码片段和详细配置步骤,帮助验证工程师灵活应对复杂SPI协议验证场景,提升验证效率和覆盖率。特别适合需要处理非标准SPI时序和特殊数据帧的芯片验证项目。

weixin_27014595的博客 280

数字孪生通信层开发:C#实现OPC UA到Unity3D的实时数据映射(2026年工业级实战指南)

(西门子数字孪生总监):“在产线上,50ms的延迟意味着1%的设备误操作率。2026年,通信层不是‘工具’,是数字孪生的‘生命线’。

这里只有干货:从 Modbus 通信到 MES 对接,从 YOLO 训练到工控机部署,带你搞定工业软件开发全流程。 182

oracle job 4000 1 1,oracle job解决问题汇总

一。job的运行频率设置1.每天固定时间运行,比如早上8:10分钟:Trunc(Sysdate+1) + (8*60+10)/24*602.Toad中提供的:每天:trunc(sysdate+1)每周:trunc(sysdate+7)每月:trunc(sysdate+30)每个星期日:next_day(trunc(sysdate),'SUNDAY')每天6点:trunc(sysdate+1)+6/...

weixin_35057850的博客 749

YOLOv11改进策略【独家融合改进】| 模型轻量化二次改进:StarNet + FreqFusion,极限降参,适用专栏内所有轻量化模型

FreqFusion是一种旨在解决密集图像预测任务中特征融合问题。

Limiiiing的博客 2125

Oracle job问题解决汇总

  一、job的运行频率设置 1.每天固定时间运行,比如早上8:10分钟:Trunc(Sysdate+1) + (8*60+10)/24*60 2.Toad中提供的: 每天:trunc(sysdate+1) 每周:trunc(sysdate+7) 每月:trunc(sysdate+30) 每个星期日:next_day(trunc(sysdate),'SUNDAY') 每天6点:t...

wang286480403的专栏 375

霍尼韦尔SoftMaster使用说明

霍尼韦尔SoftMaster使用说明

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

下一篇: Windows2000下手工安装数据库
木划离
博客等级 码龄19年 27粉丝 112原创
评论 2
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值