当前位置:网站首页>Common operations of oracle under linux and daily accumulation of knowledge points (functions, timed tasks)
Common operations of oracle under linux and daily accumulation of knowledge points (functions, timed tasks)
2022-08-05 10:17:00 【qingfengvssuibian】
oracle startup and shutdown
#Login as dba
sqlplus / nolog conn / as sysdba
#start
startup
#close
shutdown immediate
Monitor start:
#Listening to start
lsnrctl start
#Monitoring status
lsnrctl status
#Monitoring stop
lsnrctl stop
Trunk function: intercept date or number
--Intercept dateselect trunc(sysdate,'yyyy') from dual union all --accurate to the year, showing the first day of the current yearselect trunc(sysdate,'mm') from dual union all --monthselect trunc(sysdate,'dd') from dual union all --daysselect trunc(sysdate,'hh') from dual union all --hourselect trunc(sysdate,'mi') from dual union all -- pointsselect trunc(sysdate) from dual union all -- as accurate as day ddselect sysdate from dual union allSELECT (sysdate + 1) FROM dual; -- next day 1 means 1 day, +1 means the next day +1/24 means add an hour
--Truncate the numerical value without rounding, which can be used to retain valid digitsselect trunc(155.555) from dual union all -- keep three significant digitsselect trunc(155.555,3) from dual union allselect trunc(155.555,2) from dual union allselect trunc(155.555,0) from dual union allselect trunc(155.555,-2) from dual; --reserve -2 significant digits
forupdate and rowid modify data
It appears that the data cannot be modified (read-only readonly mode), you can try to modify only one table.It is generally recommended to use rowid.
Scheduled tasks
Perform a task at regular intervals.Not much to say, just go to the operation.
Create new table
create table testDsrw(name varchar2(50),riqi date);Create a stored procedure
create or replace procedure testPro isbegininsert into testdsrw(name,riqi)values('tie',sysdate);commit;end testPro;Visually create a scheduled task job
Create a new job under DBMS_JOBS, and configure the red part, where the name of the stored procedure is written (it must be followed by a semicolon, otherwise an error will be reported), and the next execution time is written in the interval, such as TRUNC(sysdate,'mi') + 1/(24*60), representing the next minute.So far, a simple timed task has been created.

Startup
Click Apply

stop
Click Disconnect and apply again to stop the scheduled task

At this point, the introduction of the scheduled task interface version is completed.
边栏推荐
- Pycharm 常用外部工具
- Advanced usage of C language
- 基于MindSpore高效完成图像分割,实现Dice!
- Pytorch Deep Learning Quick Start Tutorial -- Mound Tutorial Notes (3)
- 数分面试(一)----与业务相关
- 牛刀小试基本语法,Go lang1.18入门精炼教程,由白丁入鸿儒,go lang基本语法和变量的使用EP02
- [Unity] [UGUI] [Display text on the screen]
- STM32+ULN2003 drives 28BYJ4 stepper motor (forward and reverse according to the number of turns)
- STM32+ULN2003驱动28BYJ4步进电机(根据圈数正转、反转)
- Oracle temporary table space role
猜你喜欢

这份阿里强推的并发编程知识点笔记,将是你拿大厂offer的突破口

电竞、便捷、高效、安全,盘点OriginOS功能的关键词

The JVM collection that Alibaba's top architects have summarized for many years, where can't I check it!

Pycharm 常用外部工具

dotnet OpenXML 解析 PPT 图表 面积图入门

什么是CRM决策分析管理?

Jenkins使用手册(2) —— 软件配置

High-quality DeFi application building guide to help developers enjoy DeFi Summer

SQL外连接之交集、并集、差集查询

茄子科技CEO仇俊:以用户为中心,做用户真正需要的产品
随机推荐
Getting started with Polkadot parachain development, this article is enough
What is the function of the regular expression replaceAll() method?
QSS 选择器
linux下oracle常见操作以及日常积累知识点(函数、定时任务)
【Office】Microsoft Office下载地址合集(微软官方原版离线安装下载)
5. Deploy the web project to the cloud server
牛刀小试基本语法,Go lang1.18入门精炼教程,由白丁入鸿儒,go lang基本语法和变量的使用EP02
Why are RELTABLESPACE values 0 for many tables displayed in sys_class?
Custom filters and interceptors implement ThreadLocal thread closure
语音社交软件开发——充分发挥其价值
什么是CRM决策分析管理?
Huawei's lightweight neural network architecture GhostNet has been upgraded again, and G-GhostNet (IJCV22) has shown its talents on the GPU
第七章,activiti个人任务分配,动态指定和监听器指定任务委派人「建议收藏」
企业的数字化转型到底是否可以买来?
First Decentralized Heist?Loss of nearly 200 million US dollars: analysis of the attack on the cross-chain bridge Nomad
Egg framework usage (2)
Bias lock/light lock/heavy lock lock is healthier. How is locking and unlocking accomplished?
2022华数杯数学建模思路分析交流
入门 Polkadot 平行链开发,看这一篇就够了
JS introduction to reverse the recycling business network of learning, simple encryption mobile phone number