本站用于记录日常工作内容,虚拟化云计算,系统运维,数据库DBA,网络与安全。
Oracle启动监听报错:The listener supports no services解决 $ lsnrctl start报错提示:The listener supports no services
The command completed successfully
如图所示:
这样启动后远程连接会报错:
oracle ORA-12514:TNS:listener does not currently know of service requested in connect descriptor
问题原因:数据库实例没注册到listener
解决方法一:
在listener.ora里面添加了一行
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = orcl)
(SID_NAME = orcl)
)
)
注:里面的orcl根据你安装的数据库实例名确定,我用此法解决了这个报错。
解决方法二:
登录数据库:
$sqlplus / as sysdba
显示服务名:
SQL>show parameter service_names
强制注册服务:
SQL>alter system register;
查看监听状态:
$lsnrctl status
告警日志介绍 告警日志文件是一类特殊的跟踪文件(trace file)。告警日志文件命名一般为alert_<SID>.log,其中SID为ORACLE数据库实例名称。数据库告警日志是按时间顺序记录message和错误信息。 告警日志位置 在ORACLE 10g中,BACKGROUND_DUMP_DEST参数确定了告警日志的位置,但是告警日志的文件名无法修改,告警日志的名称为:alert_<SID>.log ,其中<SID>是实例的名称。BACKGROUND_DUMP_DEST参数是动态的。 SQL> show parameter background_dump_dest; NAME TYPE VALUE--------------------- ----------- ------------------------------background_dump_dest string /u01/app/oracle/admin/GSP/bdumpSQL> 告警日志以及所有后台跟踪文件都会被写至BACKGROUND_DUMP_DEST参数所指定的目录。 在ORACLE 11g 以及ORACLE 12c中,告警日志文件的位置有了变化。主要是因为引入了ADR(Automatic Diagnostic Repository:一个存放数据库诊断日志、跟踪文件的目录),关于ADR对应的目录位置可以通过查看v$diag_info系统视图。如下所示(ORACLE 12c ) SQL> select * from v$diag_info; INST_...
Centos Oracle 10g 系统巡查脚本比较简单,可以自行添加内容以下是详细命令: #!/bin/bash echo "You are logged in as `whoami`"; if [ `whoami` != root ]; then echo "Must be logged on as root to run this script." exit fi CHECK_DATE=`date +%F.txt` echo "Running script. at `date`" CHECK_REPORT_PATH=/data ls -d $CHECK_REPORT_PATH if [ $? -gt 0 ] then mkdir $CHECK_REPORT_PATH fi chmod -R 777 $CHECK_REPORT_PATH CURRENT_DIR=`pwd` echo "#################### Check Start ####################" #网络地址配置信息 echo "********主机IP地址********" >>$CHECK_REPORT_PATH/Report_$CHECK_DATE ifconfig|grep inet|grep -v 127.0.0.1|sed -n '/inet addr/s/^[^:]*:\([0-9.]\{7,15\}\) .*/\1/p' >>$CHECK_REPORT_PA...
解决ORA-00060: Deadlock detected小例 数据库版本:?12345678SQL > select * from v$version;BANNER----------------------------------------------------------------Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64biPL/SQL Release 10.2.0.5.0 - ProductionCORE 10.2.0.5.0 ProductionTNS for Linux: Version 10.2.0.5.0 - ProductionNLSRTL Version 10.2.0.5.0 - Production 事件:数据库产生死锁: ORA-00060: Deadlock detected alert 日志如下:?123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263ORA-00060: Deadlock detected. More info in file /u01/app/oracle/admin/xezf/udump/xezf_ora_13794.trc.Wed Jul 10 12:39:00 CST 2013ORA-00060: Deadlock detected. More info in file /u01/app/oracle/admin/xezf/udump/xezf_ora_13792.trc.Wed Jul 10 12:40:02 CST 2013ORA-00060: Deadlock detected. More info in file /u01/app/oracle/admin/xezf/udump/xezf_ora_13794.trc.Wed Jul 10 12:41:56 CST 2013ORA-00060: Deadlock detected....
ORA-19527与ORA-00312和db_recovery_file_dest_size of 2048 MB is 0.00% usedErrors in file d:\oracle\product\10.2.0\admin\billing\bdump\billing_mrp0_2216.trc:ORA-19527: 必须重命名物理备用重做日志ORA-00312: 联机日志 1 线程 1: 'E:\CZ\BILLING\REDO01.LOG'Clearing online redo logfile 1 completeMedia Recovery Waiting for thread 1 sequence 13364Tue Aug 21 13:41:52 2012Completed: alter database recover managed standby database disconnect from sessionTue Aug 21 13:55:58 2012db_recovery_file_dest_size of 2048 MB is 0.00% used. This is auser-specified limit on the amount of space that will be used by thisdatabase for recovery-related files, and does not reflect the amount ofspace available in the underlying filesystem or ASM diskgroup.这是10g以后,oracle为了加快swtichover的速度,在can become a primary之前就去clear the online logfiles了,而如果没有设置log_file_name_convert,这个时候oracle可能就不认识哪怕是你copy过来的一模一样的logfile了 这个说法也在taobao dba team的blog中得到...
oracle10G/11G官方下载地址集合 直接迅雷下载 Oracle Database 11g Release 2 (11.2.0.1.0) for Microsoft Windows (64-bit)http://download.oracle.com/otn/nt/oracle11g/112010/win64_11gR2_database_1of2.ziphttp://download.oracle.com/otn/nt/oracle11g/112010/win64_11gR2_database_2of2.ziphttp://download.oracle.com/otn/nt/oracle11g/112010/win64_11gR2_client.ziphttp://download.oracle.com/otn/nt/oracle11g/112010/win64_11gR2_grid.zipOracle Database 11g Release 2 (11.2.0.1.0) for Microsoft Windows (32-bit)http://download.oracle.com/otn/nt/oracle11g/112010/win32_11gR2_database_1of2.ziphttp://download.oracle.com/otn/nt/oracle11g/112010/win32_11gR2_database_2of2.ziphttp://download.oracle.com/otn/nt/oracle11g/112010/win32_11gR2_client.zipOracle Database 11g Release 2 (11.2.0.1.0) for Linux x86http://download.oracle.com/otn/linux/oracle11g/R2/linux_11gR2_database_1of2.ziphttp://download.oracle.com/otn/linux/oracle11g/R2/linux_11gR2_database_2of2.ziphttp://download.orac...
数据库在非归档模式下丢失数据文件恢复 在非归档模式下,保证归档没有切换过就可以恢复具体如下:SQL> create tablespace test datafile '/app/oracle/oradata/ORCL/test01.dbf' size 50M;Tablespace created.SQL> archive log list;Database log mode No Archive ModeAutomatic archival DisabledArchive destination /app/oracle/arch1Oldest online log sequence 9Current log sequence 11SQL> select * from v$version;BANNER----------------------------------------------------------------Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - ProdPL/SQL Release 10.2.0.1.0 - ProductionCORE 10.2.0.1.0 ProductionTNS for Linux: Version 10.2.0.1.0 - Productio...
向表中插入数据有很多办法,但是方法不同,性能差别很大.----1.原始语句 drop table t1 purge;create table t1 ( sid number, sname varchar2(20) ) tablespace test; create or replace procedure proc01 ( sname varchar2 ) as begin for i in 1..10000000 loop execute immediate 'insert into t1(sid,sname) values('||i||','''||sname||''')'; commit; end loop; end; / alter system flush shared_pool;set timing on;exec proc01('ocpyangtest');已用时间: 02: 02: 54.12 ----2.绑定变量 drop table t1 purge;create table t1 ( sid number, sname varchar2(20) ) tablespace test;create or replace procedure proc02 ( sname varchar2 ) as begin for i in 1..10000000 loop execute immediate 'insert into t1(sid,sname) values(:no'||','''||sname||''')' using i; commit; end loop; end; / alter system flush shared_pool;set timing on;exec proc02('ocpyangtest');已用时间: 00: 22: 59.79select count(*) from t1;----3.静态语句 drop table t1 purge;create table t1 ( sid number, sname varchar2(20) ) tablespace ...
最新评论