怎么开或关闭oracle,关了怎么开-成都创新互联网站建设

关于创新互联

多方位宣传企业产品与服务 突出企业形象

公司简介 公司的服务 荣誉资质 新闻动态 联系我们

怎么开或关闭oracle,关了怎么开

Linux下如何启动、关闭Oracle以及打开关闭监听

1、以oracle用户登录系统,如果是root用户,使用su - oracle切换用户。

成都创新互联公司专业为企业提供盐湖网站建设、盐湖做网站、盐湖网站设计、盐湖网站制作等企业网站建设、网页设计与制作、盐湖企业网站模板建站服务,十余年盐湖做网站经验,不只是建网站,更提供有价值的思路和整体网络服务。

2、以oracle用户cd到oracle的bin目录,cd $ORACLE_HOME/bin。

3、以nolog方式运行sqlplus。

4、以sysdba连接数据库,如下SQL conn /as sysdba。

5、输入用户名sys 和密码。

6、启动数据库实例,SQL startup;等待片刻,等到database opened就是打开数据库实例成功了。

7、使用命令shutdown abort  ;或者  shutdown immediate ; 关闭数据库。

如何开启和关闭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服务?

在服务中直接停止即可。

1、以windows10为例,右键“此电脑”,选择“管理”。

2、然后选择“服务和应用程序”——“服务”。

3、找到oracle的服务,一般名称为oracleservice+实例名。

4  、右键,选择停止,等待执行完毕即可。

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

本文将介绍oracle 归档日志的关闭打开方法,需要了解的朋友可以参考下

查看oracle数据库是否为归档模式

SQL select name,log_mode from V$database;

NAME LOG_MODE

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

TEST NOARCHIVELOG

SQL archive log list

Database log mode No Archive Mode

Automatic archival Disabled

Archive destination USE_DB_RECOVERY_FILE_DEST

Oldest online log sequence 80157

Current log sequence 80163

编辑本段配置数据库的归档模式

1.改变非归档模式到归档模式:

1)SQL conn / as sysdba (以DBA身份连接数据库)

2)SQL shutdown immediate;(立即关闭数据库)

3)SQL startup mount (启动实例并加载数据库,但不打开)

4)SQL alter database archivelog; (更改数据库为归档模式)

5)SQL alter database open; (打开数据库)

6)SQL alter system archive log start; (启用自动归档)

7)SQL exit (退出)

做一次完全备份,因为非归档日志模式下产生的备份日志对于归档模式已经不可用了.这一步非非常重要!

2.改变归档模式到非归档模式:

1)SQLSHUTDOWN NORMAL/IMMEDIATE;

2)SQLSTARTUP MOUNT;

3)SQLALTER DATABASE NOARCHIVELOG;

4)SQLALTER DATABASE OPEN;

3.归档相关命令

archive log stop;

archive log start;

archive log list;

show parameters;

show parameters log_archive_start;

show parameters log_archive_max_process; #归档进程数

alter system set log_archive_max_process=5; #将归档进程数改为5

select * from v$bgprocess; #检察后台进程

如何实现Oracle数据库库服务的启动和关闭?

可以在系统的服务管理中进行管理,也可以通过命令行进行数据库服务的启动和关闭

启动数据库服务

net

start

"OracleServiceORACLEORCL"

net

start

"OracleOraDb11g_home1TNSListener"

关闭数据库服务

net

stop

"OracleOraDb11g_home1TNSListener"

net

stop

"OracleServiceORACLEORCL"

使用SQLPLUS也可以达到相同的效果

sqlplus

/

as

sysdba

startup

shutdown

immediate

通常数据库停止以后,对系统资源的占用基本可以忽略。

怎样启动和关闭oracle数据库

一般采用登录到服务系统上,运行sqlplus ,进行数据库的开启和关闭操作(非远程),如:

$  sqlplus /nolog

启动

SQL conn /as sysdba

SQL startup

关闭

SQL shutdown immediate


分享题目:怎么开或关闭oracle,关了怎么开
当前路径:http://kswsj.cn/article/hsdggs.html

其他资讯