资讯

精准传达 • 有效沟通

从品牌网站建设到网络营销策划,从策略到执行的一站式服务

oracle怎么关帐期 oracle日期处理

oracle如何快速关闭数据库

如果想正常关闭,那么最好是:先手动断开所有数据库连接(外部链接,比如访问等),关闭监听(防止再次产生外部链接),然后杀掉所有正在执行的数据库进程(数据库内部的一些,比如正在执行的执行计划等,主进程别杀啊),然后关闭外围服务,最后再用immediate关闭数据库。这样能快一些,而且相对而言数据库会正常,不会因为断开外部链接,等待进程结束等问题等待时间超长。,当然也只是快一些而已,如果数据库很大,那么还是会很慢。

创新互联坚持“要么做到,要么别承诺”的工作理念,服务领域包括:成都网站制作、网站设计、企业官网、英文网站、手机端网站、网站推广等服务,满足客户于互联网时代的无为网站设计、移动媒体设计的需求,帮助企业找到有效的互联网解决方案。努力成为您成熟可靠的网络建设合作伙伴!

其他的shutdown abort,也是一个关闭数据库的方法,不过oracle本身也不推荐,因为每次abort后数据库可能会有这样那样的问题。

再baoli一些的,就是直接关机器,关电源了。

linux关闭oracle服务需要关闭1521

linux 查看1521端口状态,linux防火墙开放1521端口

2022-06-28 18:09:29阅读 5770

大家好,又见面了,我是你们的朋友全栈君。

问题描述:使用plsql连接数据库发现TNS报错,登录服务器发现防火墙开放,如果直接关闭防火墙,所有的端口都可以连接,但是实际中可能会遇到开启防火墙的库,这时候需要开放单一端口对某一服务器或者某一网段

1.开放1521端口对所有服务器

vi /etc/sysconfig/iptables

-A INPUT -m state –state NEW -m tcp -p tcp –dport 1521 -j ACCEPT

这句要放在 -A INPUT -m state –state NEW -m tcp -p tcp –dport 22 -j ACCEPT 后面,要不然不生效

重启防火墙

[root@orcl ~]# service iptables restart

iptables: Setting chains to policy ACCEPT: filter [ OK ]

iptables: Flushing firewall rules: [ OK ]

iptables: Unloading modules: [ OK ]

iptables: Applying firewall rules: [ OK ]

[root@orcl~]# service iptables status

Table: filter

Chain INPUT (policy ACCEPT)

num target prot opt source destination1 ACCEPT all — 0.0.0.0/0 0.0.0.0/0state RELATED,ESTABLISHED2 ACCEPT icmp — 0.0.0.0/0 0.0.0.0/0

3 ACCEPT all — 0.0.0.0/0 0.0.0.0/0

4 ACCEPT tcp — 0.0.0.0/0 0.0.0.0/0 state NEW tcp dpt:22

5 ACCEPT tcp — 0.0.0.0/0 0.0.0.0/0 state NEW tcp dpt:1521

6 REJECT all — 0.0.0.0/0 0.0.0.0/0 reject-with icmp-host-prohibited

Chain FORWARD (policy ACCEPT)

num target prot opt source destination1 REJECT all — 0.0.0.0/0 0.0.0.0/0 reject-with icmp-host-prohibited

Chain OUTPUT (policy ACCEPT)

num target prot opt source destination

2.开放1521端口给指定网段,添加的指定IP,但是识别的是子网内的所有IP,其他同网段的IP都可以访问。如果去掉/24,指定IP的话,就访问不了。怎么指定单一端口给某一服务器?

-A INPUT -s 192.168.163.6/24 -p tcp -m tcp –dport 1521 -j ACCEPT

[root@orcl ~]# vi /etc/sysconfig/iptables

[root@orcl~]# service iptables restart

iptables: Setting chains to policy ACCEPT: filter [ OK ]

iptables: Flushing firewall rules: [ OK ]

iptables: Unloading modules: [ OK ]

iptables: Applying firewall rules: [ OK ]

[root@orcl~]# service iptables status

Table: filter

Chain INPUT (policy ACCEPT)

num target prot opt source destination1 ACCEPT all — 0.0.0.0/0 0.0.0.0/0state RELATED,ESTABLISHED2 ACCEPT icmp — 0.0.0.0/0 0.0.0.0/0

3 ACCEPT all — 0.0.0.0/0 0.0.0.0/0

4 ACCEPT tcp — 0.0.0.0/0 0.0.0.0/0 state NEW tcp dpt:22

5 ACCEPT tcp — 192.168.163.0/24 0.0.0.0/0 tcp dpt:1521

6 REJECT all — 0.0.0.0/0 0.0.0.0/0 reject-with icmp-host-prohibited

Chain FORWARD (policy ACCEPT)

num target prot opt source destination1 REJECT all — 0.0.0.0/0 0.0.0.0/0 reject-with icmp-host-prohibited

Chain OUTPUT (policy ACCEPT)

num target prot opt source destination

发布者:全栈程序员栈长,转载请注明出处:原文链接:

本文参与 腾讯云自媒体分享计划 ,欢迎热爱写作的你一起参与!

本文分享自作者个人站点/博客

复制

如有侵权,请联系 cloudcommunity@tencent.com 删除。

TCP/IP

文章来自专栏

全栈程序员必看

55.1K 篇文章157 人关注

订阅

评论 (0)

写评论

暂无人发表评论

相关文章

linux1521端口不通,Linux开放1521端口允许网络连接Oracle Listene「建议收藏」

-A INPUT -p tcp -m state –state NEW -m tcp –dport 1521 -j ACCEPT

Linux 设置oracle1521端口[通俗易懂]

centos5 安装oracle实现其他机器连接,oracle server与其他机器可以ping通,但由于linux防火墙默认是不开启1521端口的,应此需设...

Linux查看防火墙状态,查看开放端口

重启一个服务:systemctl restart firewalld.service

开启1521端口监听_Oracle数据库常用命令、Linux监听配置、Oracle linux下开放1521端口…

$ sqlplus system/manager @ file.sql 执行sql脚本文件

linux下开放oracle1521端口以便于远程连接

1,利用root账号登录linux,输入命令 :service iptables stop(先把oracle防火墙给关闭)。

Linux查看开放端口_linux查看对外端口

想通过防火墙打开8080端口登录tomcat却发现提示 /etc/rc.d/init.d/iptable.找不到文件, 最后发现因为于CentOS7不用ipt...

浅析linux查看防火墙状态和对外开放的端口状态

查询已开放的端口 netstat -ntulp | grep 端口号:可以具体查看某一个端口号

Linux开放防火墙端口_linux防火墙打开端口

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内...

linux 防火墙开放端口_防火墙放行端口

显示success表示成功 –zone=public表示作用域为公共的 –add-port=443/tcp添加tcp协议的端口端口号为443 –perma...

Linux查看端口使用状态、关闭端口方法

首先,端口不是独立存在的,它是依附于进程的。某个进程开启,那么它对应的端口就开启了,进程关闭,则该端口也就关闭了。下次若某个进程再次开启,则相应的端口也再次开启...

Linux关闭防火墙端口_防火墙开放端口设置

Linux关闭防火墙命令 下面是red hat/CentOs7关闭防火墙的命令!

Linux 查看对外开放端口

linux查看端口状态相关命令

netstat 命令应用是比较频繁的,比如查看端口占用啦,查看端口进程啦,这些时候都是有必要的。

Linux 防火墙开放特定端口 (iptables)

查看状态: iptables -L -n 下面添加对特定端口开放的方法: 使用iptables开放如下端口 /sbin/iptables -I INPU...

linux udp端口怎么打开_debian防火墙开放端口

iptables是linux下的防火墙,同时也是服务名称。那么你知道Linux防火墙怎么开放端口么?接下来是小编为大家收集的Linux防火墙开放端口,欢迎大家阅...

Linux强制释放占用端口以及Linux防火墙端口开放方法详解

在安装nginx,mysql,tomcat等等服务的时候,我们会遇到需要使用的端口莫名其妙被占用,下面介绍如何解决这类问题。

Linux 防火墙开放特定端口 (iptables)

iptables是linux下的防火墙,同时也是服务名称。 service iptables status 查看防火墙状态 service ...

linux查看端口是否开放的方法总结

Linux下用netstat查看网络状态、端口状态

在linux一般使用netstat 来查看系统端口使用情况步。 netstat命令是一个监控TCP/IP网络的非常有用的工具,它可以显示路由表...

如何启动或关闭oracle的归档模式

修改成归档模式步骤:关闭数据库

SQL shutdown immediate

启动数据库到mount

SQLstartup mount;

修改成归档模式

SQL alter database archivelog;

打开数据库

SQL alter database open;

修改成非归档模式:

步骤基本如上,只是将第三步中的命令改成如下:

SQL alter database noarchivelog;

注意事项:oracle数据库归档模式的的修改需要关闭数据库,所以在生产系统中修改时,需要考虑数据库启停时间。

如何开启和关闭oracle数据库中的审计功能

在oracle11g中,数据库的审计功能是默认开启的(这和oracle10g的不一样,10g默认是关闭的),

oracle11gr2的官方文档上写的是错的,当上说default是none,而且是审计到db级别的,这样就会

往aud$表里记录统计信息。

1.如果审计不是必须的,可以关掉审计功能;

sql

show

parameter

audit_trail;

name

type

value

------------------------------------

-----------

------------------------------

audit_trail

string

db

sql

alter

system

set

audit_trail=none

scope=spfile;

sql

shut

immediate;

sqlstartup

2.删除已有的审计信息

可以直接truncate表aud$,

truncate

table

sys.aud$;

3.或者将aud$表移到另外一个表空间下,以减少system表空间的压力和被撑爆的风险。

附:11g中有关audit_trail参数的设置说明:

audit_trail

property

description

parameter

type

string

syntax

audit_trail

=

{

none

|

os

|

db

[,

extended]

|

xml

[,

extended]

}

default

value

none

modifiable

no

basic

no

audit_trail

enables

or

disables

database

auditing.

values:

none

disables

standard

auditing.

this

value

is

the

default

if

the

audit_trail

parameter

was

not

set

in

the

initialization

parameter

file

or

if

you

created

the

database

using

a

method

other

than

database

configuration

assistant.

if

you

created

the

database

using

database

configuration

assistant,

then

the

default

is

db.

os

directs

all

audit

records

to

an

operating

system

file.

oracle

recommends

that

you

use

the

os

setting,

particularly

if

you

are

using

an

ultra-secure

database

configuration.

db

directs

audit

records

to

the

database

audit

trail

(the

sys.aud$

table),

except

for

records

that

are

always

written

to

the

operating

system

audit

trail.

use

this

setting

for

a

general

database

for

manageability.

if

the

database

was

started

in

read-only

mode

with

audit_trail

set

to

db,

then

oracle

database

internally

sets

audit_trail

to

os.

check

the

alert

log

for

details.

db,

extended

performs

all

actions

of

audit_trail=db,

and

also

populates

the

sql

bind

and

sql

text

clob-type

columns

of

the

sys.aud$

table,

when

available.

these

two

columns

are

populated

only

when

this

parameter

is

specified.

if

the

database

was

started

in

read-only

mode

with

audit_trail

set

to

db,

extended,

then

oracle

database

internally

sets

audit_trail

to

os.

check

the

alert

log

for

details.

xml

writes

to

the

operating

system

audit

record

file

in

xml

format.

records

all

elements

of

the

auditrecord

node

except

sql_text

and

sql_bind

to

the

operating

system

xml

audit

file.

xml,

extended

performs

all

actions

of

audit_trail=xml,

and

populates

the

sql

bind

and

sql

text

clob-type

columns

of

the

sys.aud$

table,

wherever

possible.

these

columns

are

populated

only

when

this

parameter

is

specified.

you

can

use

the

sql

audit

statement

to

set

auditing

options

regardless

of

the

setting

of

this

parameter.

Oracle数据库关闭问题

正常shutdown是normal模式,也就是要等所有的连接用户都自愿的断开了才会down库,所以等待的时间比较长。由于不允许新用户连接,你实在想登的话就杀掉库进程然后重启吧

如何关闭Oracle11g数据库的审计功能?

在oracle11g中,数据库的审计功能是默认开启的(这和oracle10g的不一样,10g默认是关闭的),\x0d\x0aoracle11gR2的官方文档上写的是错的,当上说default是none,而且是审计到DB级别的,这样就会\x0d\x0a往aud$表里记录统计信息。\x0d\x0a \x0d\x0a1.如果审计不是必须的,可以关掉审计功能;\x0d\x0a\x0d\x0aSQL show parameter audit_trail;\x0d\x0a\x0d\x0aNAME TYPE VALUE\x0d\x0a------------------------------------ ----------- ------------------------------\x0d\x0aaudit_trail string DB\x0d\x0a\x0d\x0aSQL alter system set audit_trail=none scope=spfile;\x0d\x0aSQL shut immediate;\x0d\x0aSQLstartup\x0d\x0a2.删除已有的审计信息\x0d\x0a可以直接truncate表aud$,\x0d\x0atruncate table SYS.AUD$;\x0d\x0a\x0d\x0a3.或者将aud$表移到另外一个表空间下,以减少system表空间的压力和被撑爆的风险。\x0d\x0a \x0d\x0a附:11g中有关audit_trail参数的设置说明:\x0d\x0aAUDIT_TRAIL\x0d\x0aProperty Description\x0d\x0aParameter type String\x0d\x0aSyntaxAUDIT_TRAIL = { none | os | db [, extended] | xml [, extended] }\x0d\x0aDefault valuenone\x0d\x0aModifiable No\x0d\x0aBasic No\x0d\x0aAUDIT_TRAIL enables or disables database auditing.\x0d\x0aValues:\x0d\x0anone\x0d\x0aDisables standard auditing. This value is the default if the AUDIT_TRAIL parameter was not set \x0d\x0ain the initialization parameter file or if you created the database using a method other than \x0d\x0aDatabase Configuration Assistant. If you created the database using Database Configuration \x0d\x0aAssistant, then the default is db.\x0d\x0aos\x0d\x0aDirects all audit records to an operating system file. Oracle recommends that you use the os \x0d\x0asetting, particularly if you are using an ultra-secure database configuration.\x0d\x0adb\x0d\x0aDirects audit records to the database audit trail (the SYS.AUD$ table), except for records \x0d\x0athat are always written to the operating system audit trail. Use this setting for a general \x0d\x0adatabase for manageability.\x0d\x0aIf the database was started in read-only mode with AUDIT_TRAIL set to db, then Oracle Database \x0d\x0ainternally sets AUDIT_TRAIL to os. Check the alert log for details.\x0d\x0adb, extended\x0d\x0aPerforms all actions of AUDIT_TRAIL=db, and also populates the SQL bind and SQL text CLOB-type \x0d\x0acolumns of the SYS.AUD$ table, when available. These two columns are populated only when this \x0d\x0aparameter is specified.\x0d\x0aIf the database was started in read-only mode with AUDIT_TRAIL set to db, extended, then Oracle \x0d\x0aDatabase internally sets AUDIT_TRAIL to os. Check the alert log for details.\x0d\x0axml\x0d\x0aWrites to the operating system audit record file in XML format. Records all elements of the \x0d\x0aAuditRecord node except Sql_Text and Sql_Bind to the operating system XML audit file.\x0d\x0axml, extended\x0d\x0aPerforms all actions of AUDIT_TRAIL=xml, and populates the SQL bind and SQL text CLOB-type columns\x0d\x0a of the SYS.AUD$ table, wherever possible. These columns are populated only when this parameter \x0d\x0ais specified.\x0d\x0aYou can use the SQL AUDIT statement to set auditing options regardless of the setting of this \x0d\x0aparameter.


本文题目:oracle怎么关帐期 oracle日期处理
本文地址:http://cdkjz.cn/article/hjiipc.html
多年建站经验

多一份参考,总有益处

联系快上网,免费获得专属《策划方案》及报价

咨询相关问题或预约面谈,可以通过以下方式与我们联系

大客户专线   成都:13518219792   座机:028-86922220