sys用户使用@连接符提示无效权限的错误ORA-01031:
问题:有同事反映,新安装的数据库使用 conn sys/oracle@xxxx as sysdba登录不上去,提示ORA-01031: insufficient privileges,而用户名密码都是完全正确的,不使用@xxx连接符conn / as sysdba登录正常。 过程: 首先判断当前系统采用的是操作系统认证,再使用system/manager@xxxx登录时没有问题,只有使用sysdba权限的用户登录才会报这种错误。接下来进行 grant sysdba to scott; 报错,ORA-01994: GRANT failed: password file missing or disabled。注意,问题就在这里,系统提示密码文件问题。查找$ORACLE_HOME/dbs下的orapwSID文件,
再谈ORA-01031 when sqlplus '/as sysdba'
HB-BSS-TEST>sqlplus '/as sysdba'SQL*Plus: Release 10.2.0.4.0 - Production on Wed Aug 11 13:20:04 2010Copyright (c) 1982, 2007, Oracle. All Rights Reserved.ERROR:ORA-01031: insufficient privileges================================The config.o file may not have been properly generated from the config.s (or config.c) file. There may have been OS user or other changes since the initial install, and hence the ORA-1031 error occurred.The 'OSDBA' and 'OSOPER' groups are chosen at installation time a
resetlogs
很多人说,resetlogs就是不完全恢复,这是不对的,做不完全恢复必须使用resetlogs,但resetlogs也可以做完全恢复。而noresetlogs则是必须做完全恢复时使用。resetlogs会重置日志序列号强制清空或重建REDO,而noresetlogs则不会这么做。第一种情况,我们假设仅仅控制文件丢失,而其他文件没有丢失(主要是归档和REDO),那么恢复的时候如果选择从备份中恢复控制文件。恢复后,控制文件会去读数据文件头中与CHECKPOINT SCN对应的RBA信息来确定从那个序列的归档日志开始恢复,一直推进恢复到NEXT SCN是无穷大的那个REDOLOG,此时恢复是完全恢
CONTROL_FILE_RECORD_KEEP_TIME参数 和 retention policy 的关系 (转郝总)
CONTROL_FILE_RECORD_KEEP_TIME参数 和 retention policy 的关系 1、CONTROL_FILE_RECORD_KEEP_TIME参数 determines how long information that can be used by RMAN is kept in the control file. The default value for this parameter is 7 days and can be as many as 365 days. The greater the number, the larger the control file becomes to store more information. 2、retention policy configure retention policy to recovery window of 30 days; 1: 控制文件中对于 备份相关的信息的保留的时间长度。 2: 备份的过期策略。需
SYS远程连接出错ORA-01031:Insufficient privileges
一日,PL/SQL DEVELOPER工具用sys用户连接数据库报ORA-1031,在本地验证sys密码没错。网上说于passwordfile有关,很多人都关闭数据库后,重建密码文件。我在10.2.0.1的环境中,直接修改密码文件的名字,v$pwfile_users就能识别了。不晓得他们为什么要停掉库重建passwordfile。passwordfile在ORACLE_HOME/dbs下,格式为orapwSID。注意:1.是orapw而不是orapwd 2.是orapwSID而不是orapwSID.ora[@more@]
dump systemstate遇到ora-07445 kgldmp()+1177
sqlplus / as sysdbaSQL*Plus: Release 10.2.0.1.0 - Production on Wed Oct 21 00:39:50 2009Copyright 1982, 2005, Oracle. All rights reserved.SQL> oradebug setmypidStatement processed.SQL> oradebug unlimit;Statement processed.SQL> oradebug dump systemstate 266ORA-03113: end-of-file on communication channelORA-24323: value not allowedalert:ORA-07445: exception encountered: core dump [kgldmp()+1177] [SIGSEGV] [Address not mapped to object] [0x18] [] []----- Call Stack Trace -----calling
supplemental logging
Question: What is supplemental logging, and how does supplemental logging work? Answer: When Supplemental Logging is enabled, either some selected columns or all columns are specified for extra logging. They are called a supplemental log group and consist of nothing but a set of additional columns that are being logged. When the supplemental logging is active on a database, the redo logs contain other columns from tables to uniquely identify a row. If the table has a primary key or unique inde
create view with check option
手册介绍:WITH CHECK OPTION Specify WITH CHECK OPTION to indicate that OracleDatabase prohibits any changes to the table or view that would produce rows that arenot included in the subquery. When used in the subquery of a DML statement, youcan specify this clause in a subquery in the FROM clause but not in subquery in theWHERE clause.with check option可以这么解释:通过视图进行的修改,必须也能通过该视图看到修改后的结果。比如你insert,那么加的这条记录在刷新视图后必须可以看到;如果修改,修改完的结果
ORA-00600 [kcrfr_update_nab_2]
SQL> startupORACLE instance started.Total System Global Area 2248146944 bytesFixed Size 2074448 bytesVariable Size 452987056 bytesDatabase Buffers 1778384896 bytesRedo Buffers 14700544 bytesDatabase mounted.ORA-00600: internal error code, arguments: [kcrfr_update_nab_2],[0x7000000905969E8], [2], [], [], [], [], []call stack:ksedmp kgerinv kgeasnmierr kcrfr_update_nab kcrfr_read kcrfr_read_buffer kcrfrgv kcratr1 kcratr kctrec kcvcrv kcfopd
UNIX下@符号报SP2-0734错误
Subject: SP2-0734 and/or SP2-0042 Error Immediately When Attempting To Run catpatch.sql Doc ID: 336920.1SymptomsAfter applying a patchset, the post install documentation instructs you to run the $ORACLE_HOME/rdbms/admin/catpatch.sql script. The script does not run and instead produces the error below:SQL> @catpatch.sqlSP2-0734: unknown command begining "catpatch.s..." ....CauseThis is due to the display terminal keyboard configuration of the kill character. SolutionThe problem is w
直接路径插入
直接加载操作为直接加载大量数据提供了一个高效的机制。其通过绕过标准的空闲列表或者assm识别可用来插入的空间。直接加载操作直接到hwm以上的未格式化块,直接将数据加载到这些块上并写入磁盘,绕过缓冲。通过这么做,跳过空闲列表或assm机制快速的找到完全为空的块。另外这些操作不会产生撤销,因此不需要写undo。产生的重做也因此减少,因为undo也会产生重做。直接路径DML的例子最主要的包括:INSERT /*+ APPEND */,仅适用于堆表,并且如果包含索引,索引不会使用直接路径加载;CREATE TABLE AS SELECT;CREATE INDEX;ALTER INDEX RE
session_cached_cursors,cursor_space_for_time
http://blog.chinaunix.net/u/3380/showart_190946.htmlsession_cached_cursors:设置pga端的cache list的长度,当session_cached_cursors设置为0时,pga的cache list长度为0,这时候当sga中的cursor关闭的时候它相关的library cache handle的lock位被清0,从v$open_cursor里看不到这个被关闭的cursor,它服从于shared pool的lru机制,当shared pool需要新的buffer空间时,它将会被flush出shared pool。当session_cached_cursors设置为非0值时,pga的cache list长度为session_cached_cursors值的大小,同时pga cache list将会保留一份拷贝,
Parallel 并行技术
Parallel技术对于一个大的任务,一般的做法是利用一个进程,串行的执行,如果系统资源足够,可以采用parallel技术,把一个大的任务分成若干个小的任务,同时启用n个进程/线程,并行的处理这些小的任务,这些并发的进程称为并行执行服务器(parallel executeion server),这些并发进程由一个称为并发协调进程的进程来管理。启用Parallel前的忠告:只有在需要处理一个很大的任务,如需要几十分钟,几个小时的作业中,并且要有足够的系统资源的情况下(这些资源包括cpu,内存,io),您才应该考虑使用parallel。否则,在一个多并发用户下,系统本
SCN
control中有三种SCN分别为,system SCN、datafile SCN、last SCN,数据文件头中有一种SCN start SCNsystem scn从视图v$database中获得,对应checkpoint_change#字段,datafile scn、last scn分别对应视图v$datafile中的checkpoint_change#,last_change#,而 start scn则从v$datafile_header中checkpoint_change#得到。数据库在正常启动后下,system scn,datafile scn,start scn会相等,而last scn会被置于无穷大,这里为null。正常关闭后(immediate,noraml,translate),上面四个scn会应执行full checkpoint 而相等。当系统在非正常关闭
记住这个错误PLS-00103: 出现符号
SQL> DECLARE 2 devtype varchar2(256); 3 done boolean; 4 BEGIN 5 devtype:=sys.dbms_backup_restore.deviceAllocate (type=>'',ident=>'t1'); 6 sys.dbms_backup_restore.restoreSetDatafile; 7 sys.dbms_backup_restore.restoredatafileto(dfnumber=>01,toname=>'D:ORACLEORADATAORA9ISYSTEM01.DBF'); 8 sys.dbms_backup_restore.restoredatafileto(dfnumber=>02,toname=>'d:oracleoradataora9iUNDOTBS1.DBF'); 9 sys.dbms_backup_restore.restoredatafileto(dfnumber=>03,toname=>'d:ora
Oracle10g的FAST DUAL执行计划
FAST DUAL执行计划是Oracle10g的新特性。对于利用DUAL进行的计算,可以不用真正的访问表,从而快速的得到结果。在实际系统中,由于中间件采用了WEBLOGIC,中间件为了确保数据库连接没有问题,需要在每个SQL前面执行一个SELECT 1 FROM DUAL语句,通过这个执行过程来检测数据库连接是否正常。SQL> SET AUTOT ONSQL> SELECT 1 FROM DUAL;1----------1已选择 1 行。执行计划----------------------------------------------------------Plan hash value: 1546270724-----------------------------------------------------------------|
select hang住等待SQL*Net message from Client
如果你不知道什么叫诡异,那么请往下看。一个select语句,在10.2.0.1 for linux平台跑着好好的,到了10.2.0.4一执行就hang住,等待SQL*Net message from Client,而且非常消耗CPU资源。很奇怪吧,看似是等待客户端的请求,但是却消耗了大量CPU,似乎很矛盾。在山穷水尽之时,老熊横空出世,抓到了call stack,并且在metalink上找到了相似的BUG。我的call stack:lnxfpr ()lnxn2coptg ()lnxn2copt ()lnxn2c ()evastr ()evaopn2 ()evaopn2 ()evacat ()evaopn2 ()evareo ()expeqkesEval_Int ()qkesEvalPred ()qsmeeopt_evaluate_opt ()kkqsev
events和event
events内存生效,event是静态参数,重启生效.记录之.[@more@]e
enqueue种类
select distinct ksqsttyp,ksqstexpl from x$ksqst order by ksqsttyp;[@more@]
管理表空间(表空间的属性)转贴
一些注意点概述:--- 一个tablespace可以有0或者多个segments--- 一个segment可以有1或者多个extent--- 除了SYSTEM表空间和包含获得undo段(an active undo segment)的表空间以外,表空间可以被tablen offline,而数据库仍照常运行--- 在数据库运行时,可以把表空间brought online--- 一个segment可以跨越属于同一个表空间的多个数据文件,但是不能跨越多个表空间--- 一个extent不能跨越多个数据文件系统表空间(SYSTEM)与非系统表空间(NON-SYSTEM):--- 在创建数据库的时候创建--- 包含数据字典--- 包含SYSTEM undo segment--- 9i中还