如何启动Oracle的监听日志启动监听日志oracle日志如何开启的步骤如下oracle日志如何开启:
1.首先查看当前监听的状态
[oracle@oel ~]$ lsnrctl status
LSNRCTL for Linux: Version 11.2.0.3.0 – Production on 01-JUL-2012 13:29:58
Copyright (c) 1991, 2011, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=oel)(PORT=1521)))
STATUS of the LISTENER
————————
Alias listener
Version TNSLSNR for Linux: Version 11.2.0.3.0 – Production
Start Date 01-JUL-2012 13:12:51
Uptime 0 days 0 hr. 17 min. 7 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/product/11.2.0/db_1/network/admin/listener.ora
Listening Endpoints Summary…
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=oel)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
Services Summary…
Service “orcl” has 1 instance(s).
Instance “orcl”, status READY, has 1 handler(s) for this service…
Service “orclXDB” has 1 instance(s).
Instance “orcl”, status READY, has 1 handler(s) for this service…
The command completed successfully
从上面显示信息来看oracle日志如何开启,我们监听正常 。并且没有看到Listener Log File的信息 。
2.进入监听配置oracle日志如何开启,查看监听详细信息
[oracle@oel ~]$ lsnrctl–进入监听配置
LSNRCTL for Linux: Version 11.2.0.3.0 – Production on 01-JUL-2012 13:35:00
Copyright (c) 1991, 2011, Oracle. All rights reserved.
Welcome to LSNRCTL, type “help” for information.
LSNRCTL show–查看监听参数信息
The following operations are available after show
An asterisk (*) denotes a modifier or extended command:
rawmode displaymode
rules trc_file
trc_directory trc_level
log_file log_directory
log_status current_listener
inbound_connect_timeout startup_waittime
snmp_visible save_config_on_stop
dynamic_registration enable_global_dynamic_endpoint
oracle_home pid
connection_rate_limit
LSNRCTL show log_status–查看监听日志状态
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=oel)(PORT=1521)))
LISTENER parameter “log_status” set to OFF
The command completed successfully
上面信息显示Listener parameter “log_status” set to OFF说明监听日志是关闭的 。这是时候我们需要启动监听日志 。
3.设置当前监听,如果有多个监听,在修改监听配置的时候需要指定某个具体的监听,我这里只有一个默认的Listener , 所以不需要设置 。我这里还是演示一下 。
LSNRCTL show current_listener
Current Listener is LISTENER
LSNRCTL set current_listener Listener
Current Listener is Listener
LSNRCTL show current_listener
Current Listener is Listener
4.启动监听日志,并且保存配置信息
LSNRCTL set log_status on–设置监听日志状态为on
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=oel)(PORT=1521)))
LISTENER parameter “log_status” set to ON
The command completed successfully
LSNRCTL save_config–保存监听配置
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=oel)(PORT=1521)))
Saved listener configuration parameters.
Listener Parameter File /u01/app/oracle/product/11.2.0/db_1/network/admin/listener.ora
Old Parameter File /u01/app/oracle/product/11.2.0/db_1/network/admin/listener.bak
The command completed successfully
5.在查看监听状态
[oracle@oel ~]$ lsnrctl status
LSNRCTL for Linux: Version 11.2.0.3.0 – Production on 01-JUL-2012 13:44:32
Copyright (c) 1991, 2011, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=oel)(PORT=1521)))
STATUS of the LISTENER
————————
Alias listener
Version TNSLSNR for Linux: Version 11.2.0.3.0 – Production
Start Date 01-JUL-2012 13:12:51
Uptime 0 days 0 hr. 31 min. 41 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/product/11.2.0/db_1/network/admin/listener.ora
Listener Log File /u01/app/oracle/diag/tnslsnr/oel/listener/alert/log.xml
Listening Endpoints Summary…
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=oel)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
Services Summary…
Service “orcl” has 1 instance(s).
Instance “orcl”, status READY, has 1 handler(s) for this service…
Service “orclXDB” has 1 instance(s).
Instance “orcl”, status READY, has 1 handler(s) for this service…
The command completed successfully
通过上述配置之后 , 看到oracle日志如何开启了Listener Log File /u01/app/oracle/diag/tnslsnr/oel/listener/alert/log.xml
最后我们可以通过监听日志来查询里面的详细信息
[oracle@oel ~]$ grep ‘2012-07-01T13:45:40′ /u01/app/oracle/diag/tnslsnr/oel/listener/alert/log.xml|more
msg time=’2012-07-01T13:45:40.302 08:00′ org_id=’oracle’ comp_id=’tnslsnr’
oracleRAC--归档日志的开启方法 oracle RAC——归档日志oracle日志如何开启的开启方法
==================================
g R要修改cluster_database参数G R 和以后oracle日志如何开启的版本就不需要oracle日志如何开启了
例子( g R 或之前) srvctl stop database d RAC节点 sqlstartup mount SQL alter system set log_archive_dest_ = location=/racdb _arch scope=spfile sid= RAC SQL alter system set log_archive_dest_ = location=/racdb _arch scope=spfile sid= RAC SQL alter system set log_archive_dest_ = service=rac scope=spfile sid= RAC SQL alter system set log_archive_dest_ = service=rac scope=spfile sid= RAC SQL alter system setstandby_archive_dest= /racdb _arch scope=spfile sid= RAC SQL alter system setstandby_archive_dest= /racdb _arch scope=spfile sid= RAC sqlalter system set cluster_database=false scope=spfile sqlshutdown immediate sqlstartup mount sqlalter database archivelog sqlalter database open sqlalter system set cluster_database=true scope=spfile sqlshutdown immediate srvctl start database d RAC
例子( g R 或之后) 节点 SQLstartup mount SQL alter system set log_archive_dest_ = location=/racdb _arch scope=spfile sid= RAC SQL alter system set log_archive_dest_ = location=/racdb _arch scope=spfile sid= RAC SQL alter system set log_archive_dest_ = service=rac scope=spfile sid= RAC SQL alter system set log_archive_dest_ = service=rac scope=spfile sid= RAC SQL alter system setstandby_archive_dest= /racdb _arch scope=spfile sid= RAC SQL alter system setstandby_archive_dest= /racdb _arch scope=spfile sid= RAC srvctl stop database d RAC节点 SQL startup mount SQL alter database archivelog srvctl start database d RAC
测试归档日志的切换
节点一 二上分别执行切换日志操作如下 SQL alter system switch logfile 操作执行这条语句 次
节点一查询 SQL !ls l /racdb* /racdb _arch total rw r—— oracle oinstallOct_ _ dbf rw r—— oracle oinstall Oct_ _ dbf rw r—— oracle oinstallOct_ _ dbf rw r—— oracle oinstallOct_ _ dbf rw r—— oracle oinstallOct_ _ dbf /racdb _arch total rw rw—— oracle oinstall Oct_ _ dbf rw rw—— oracle oinstall Oct_ _ dbf rw rw—— oracle oinstallOct_ _ dbf rw rw—— oracle oinstallOct_ _ dbf rw rw—— oracle oinstallOct_ _ dbf
节点二查询
SQL !ls l /racdb* /racdb _arch total rw rw—— oracle oinstallOct_ _ dbf rw rw—— oracle oinstall Oct_ _ dbf rw rw—— oracle oinstallOct_ _ dbf rw rw—— oracle oinstallOct_ _ dbf rw rw—— oracle oinstallOct_ _ dbf /racdb _arch total rw r—— oracle oinstall Oct_ _ dbf rw r—— oracle oinstall Oct_ _ dbf rw r—— oracle oinstallOct_ _ dbf rw r—— oracle oinstallOct_ _ dbf rw r—— oracle oinstallOct_ _ dbf
节点一 SQL show parameter archive_dest NAMETYPEVALUE
log_archive_deststring log_archive_dest_stringlocation=/racdb _arch log_archive_dest_string log_archive_dest_stringservice=rac log_archive_dest_string log_archive_dest_string log_archive_dest_string log_archive_dest_string log_archive_dest_string log_archive_dest_string log_archive_dest_string log_archive_dest_state_stringenable log_archive_dest_state_stringenable log_archive_dest_state_stringenable log_archive_dest_state_stringenable log_archive_dest_state_stringenable log_archive_dest_state_stringenable log_archive_dest_state_stringenable log_archive_dest_state_stringenable log_archive_dest_state_stringenable log_archive_dest_state_stringenable standby_archive_deststring/racdb _arch
节点二
SQL show parameter archive_dest NAMETYPEVALUE
log_archive_deststring log_archive_dest_stringlocation=/racdb _arch log_archive_dest_string log_archive_dest_stringservice=rac log_archive_dest_string log_archive_dest_string log_archive_dest_string log_archive_dest_string log_archive_dest_string log_archive_dest_string log_archive_dest_string log_archive_dest_state_stringenable log_archive_dest_state_stringenable log_archive_dest_state_stringenable log_archive_dest_state_stringenable log_archive_dest_state_stringenable log_archive_dest_state_stringenable log_archive_dest_state_stringenable log_archive_dest_state_stringenable log_archive_dest_state_stringenable log_archive_dest_state_stringenable standby_archive_deststring/racdb _arch
lishixinzhi/Article/program/Oracle/201311/18379
在ORACLE 中怎么查看SQL 执行日志1、首先打开oracle sql developer工具,没有此工具的可以去百度浏览器下载安装即可 , 鼠标点击查看菜单 。
2、在二级菜单中,选择SQL历史记录选项,或者按快捷键F8打开窗口 。
3、默认打开是会显示在最下方的小窗口,在标题栏双击鼠标左键 , 即可最大化窗口,再次双击左键还原窗口 。
4、最大化窗口之后 , 便于更好的查询记录结果,可以看到,以往执行的sql记录都显示出来了可以往下翻动,查询自己需要的日志 。
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
编辑本段配置数据库oracle日志如何开启的.归档模式
1.改变非归档模式到归档模式:
1)SQL conn / as sysdba (以DBA身份连接数据库)
2)SQL shutdown immediate;(立即关闭数据库)
3)SQL startup mount (启动实例并加载数据库oracle日志如何开启,但不打开)
4)SQL alter database archivelog; (更改数据库为归档模式)
5)SQL alter database open; (打开数据库)
6)SQL alter system archive log start; (启用自动归档)
7)SQL exit (退出)
做一次完全备份,因为非归档日志模式下产生oracle日志如何开启的备份日志对于归档模式已经不可用oracle日志如何开启了.这一步非非常重要!
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日志如何开启 oracle10g日志在哪】oracle日志如何开启的介绍就聊到这里吧,感谢你花时间阅读本站内容,更多关于oracle10g日志在哪、oracle日志如何开启的信息别忘了在本站进行查找喔 。
推荐阅读
- 手机u盘在手机上怎么存储,u盘在手机上怎么存文件
- 成都网站制作开发,成都制作网页
- 电视直播抓包工具,电视直播抓包工具怎么用
- 软件测试用代码java java测试代码怎么写
- 智能手机的三个功能是什么,你了解智能手机有哪些功能
- 包含恋爱游戏不要作死攻略的词条
- 隐藏鼠标vb.net 隐藏鼠标光标
- 修复win7无法安装net的简单介绍
- 路由器断网没有开关怎么弄,无线路由器断开后连接不上怎么办