标签云
asm恢复 bbed bootstrap$ dul kcbzib_kcrsds_1 kccpb_sanity_check_2 kcratr_nab_less_than_odr MySQL恢复 obet ORA-00312 ORA-00704 ORA-00742 ORA-01110 ORA-01200 ORA-01555 ORA-01578 ORA-01595 ORA-600 2662 ORA-600 2663 ORA-600 3020 ORA-600 4000 ORA-600 4137 ORA-600 4193 ORA-600 4194 ORA-600 16703 ORA-600 kcbzib_kcrsds_1 ORA-600 KCLCHKBLK_4 ORA-600 kcratr_nab_less_than_odr ORA-15042 ORA-15196 ORACLE 12C oracle dul ORACLE PATCH Oracle Recovery Tools oracle加密恢复 oracle勒索 oracle勒索恢复 oracle异常恢复 ORACLE恢复 Oracle 恢复 ORACLE数据库恢复 oracle碎片 OSD-04016 YOUR FILES ARE ENCRYPTED 比特币加密文章分类
- MongoDB (1)
- MongoDB恢复 (1)
- Others (2)
- 中间件 (2)
- WebLogic (2)
- 操作系统 (112)
- 数据库 (1,884)
- DB2 (22)
- MySQL (82)
- Oracle (1,709)
- Data Guard (53)
- EXADATA (8)
- GoldenGate (24)
- ORA-xxxxx (168)
- ORACLE 12C (72)
- ORACLE 18C (6)
- ORACLE 19C (15)
- ORACLE 21C (3)
- Oracle 23ai (8)
- Oracle ASM (73)
- Oracle Bug (8)
- Oracle RAC (56)
- Oracle 安全 (6)
- Oracle 开发 (28)
- Oracle 监听 (29)
- Oracle备份恢复 (662)
- Oracle安装升级 (108)
- Oracle性能优化 (62)
- 专题索引 (5)
- 勒索恢复 (91)
- PostgreSQL (37)
- pdu工具 (7)
- PostgreSQL恢复 (13)
- SQL Server (34)
- SQL Server恢复 (14)
- TimesTen (7)
- 达梦数据库 (5)
- 达梦恢复 (3)
- 生活娱乐 (2)
- 至理名言 (11)
- 虚拟化 (2)
- VMware (2)
- 软件开发 (51)
- Asp.Net (9)
- JavaScript (12)
- PHP (2)
- 小工具 (34)
- MongoDB (1)
-
最近发表
- 记录19c ASM磁盘掉线触发ORA-59048故障处理
- aix平台Oracle数据库由于断电无法启动故障处理
- 断电引起ORA-600 3005故障处理
- 记录一次云存储资源到期之后引起的数据库恢复
- Firebird 损坏数据库数据抢救工具—firebirdext
- Oracle 19c 202610补丁(RUs+OJVM)-19.33
- 由于con$.con#值达到极限,触发数据库增加约束报ORA-600 12807错误
- MongoDB 离线提取工具—mongoext
- .bres勒索病毒加密数据库dmp文件可恢复
- ORA-600 krsm_mrp_rebuild_lf_list.lno_mismatch
- 记录一次0丢失的ORA-00354: 损坏重做日志块标头故障恢复
- 不当数据库恢复操作导致一个月数据丢失
- obet快速修复oracle 位图损坏块
- 不太常见的10.2.0.1的oracle redo损坏恢复
- obet forcecopy功能抢救硬件故障中的数据文件
- kcratr_nab_less_than_odr和system坏块故障处理
- 通过obet 恢复system坏块,打开数据库
- obet dbv功能完整说明
- 分享一例运行在aix上的sap系统数据库恢复过程
- OBET-Oracle Block Editor Tool使用说明
分类目录归档:数据库
模拟ORA-04043并解决
创建两张模拟表
SQL> select * from v$version; BANNER ------------------------------------------------------------------ Oracle9i Enterprise Edition Release 9.2.0.4.0 - Production PL/SQL Release 9.2.0.4.0 - Production CORE 9.2.0.3.0 Production TNS for Linux: Version 9.2.0.4.0 - Production NLSRTL Version 9.2.0.4.0 - Production SQL> create table sys_xifenfei as 2 select * from dba_tables; Table created. SQL> create table chf.chf_xifenfei as 2 select * from dba_tables; Table created.
启动数据库到mount状态查询表
SQL> shutdown immediate; Database closed. Database dismounted. ORACLE instance shut down. SQL> startup mount; ORACLE instance started. Total System Global Area 353441008 bytes Fixed Size 451824 bytes Variable Size 184549376 bytes Database Buffers 167772160 bytes Redo Buffers 667648 bytes Database mounted. SQL> desc dba_tables; ERROR: ORA-04043: object dba_tables does not exist SQL> desc sys_xifenfei ERROR: ORA-04043: object sys_xifenfei does not exist SQL> desc chf.chf_xifenfei ERROR: ORA-04043: object chf.chf_xifenfei does not exist
打开数据库查询
SQL> alter database open;
Database altered.
SQL> select count(*) from sys_xifenfei;
select count(*) from sys_xifenfei
*
ERROR at line 1:
ORA-00942: table or view does not exist
SQL> select count(*) from chf.chf_xifenfei;
COUNT(*)
----------
868
SQL> select count(*) from dba_tables;
select count(*) from dba_tables
*
ERROR at line 1:
ORA-00942: table or view does not exist
解决问题
SQL> alter system flush shared_pool;
System altered.
SQL> select count(*) from dba_tables;
COUNT(*)
----------
869
SQL> select count(*) from sys_xifenfei;
COUNT(*)
----------
867
MOS解释
ORA-4043 On DBA_* Views If They Are Described In Mount Stage [ID 296235.1]
Available workarounds are:
1) Don't describe the dba_* views at mount stage.
OR
2) If you issue DESC of any DBA_*views at mount stage,
then shutdown and restart the DB instance.
OR
3) Flush the shared pool.
SQL> Alter system flush shared_pool;
and then reissue the failing command.
在10g中open库后提示也为类此ORA-04043: object dba_tables does not exist
关于9I中sga_max_size参数描述
不设置sga_max_size参数
SQL> show sga; Total System Global Area 420549952 bytes Fixed Size 451904 bytes Variable Size 201326592 bytes Database Buffers 218103808 bytes Redo Buffers 667648 bytes SQL> select sum(bytes)from v$sgastat; SUM(BYTES) ---------- 420538688 SQL> !ipcs -m ------ Shared Memory Segments -------- key shmid owner perms bytes nattch status 0x9ba476a4 65536 oracle 640 440401920 65 SQL> alter system set db_cache_size=300M; alter system set db_cache_size=300M * ERROR at line 1: ORA-02097: parameter cannot be modified because specified value is invalid ORA-00384: Insufficient memory to grow cache
1)当sga_max_size不设置时,数据库启动时,会使用数据库默认分配sga大小为初始化值
2)当sga_max_size不设置时,不能在线扩展组件内存大小(使得sga大于当前大小)
设置sga_max_size参数
SQL> alter system set sga_max_size=600M scope=spfile;
System altered.
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.
Total System Global Area 638654020 bytes
Fixed Size 452164 bytes
Variable Size 419430400 bytes
Database Buffers 218103808 bytes
Redo Buffers 667648 bytes
Database mounted.
Database opened.
SQL> !ipcs -m
------ Shared Memory Segments --------
key shmid owner perms bytes nattch status
0x9ba476a4 98304 oracle 640 658505728 65
SQL> select sum(bytes)from v$sgastat;
SUM(BYTES)
----------
420538948
SQL> alter system set db_cache_size=405M;
System altered.
SQL> select 638654020/1024/1024 from dual;
638654020/1024/1024
-------------------
609.067936
说明sga中剩余空闲内存0.01M
SQL> select 609.067936-sum(bytes)/1024/1024 from v$sgastat;
609.067936-SUM(BYTES)/1024/1024
-------------------------------
.010742244
继续增加组件大小
SQL> alter system set db_cache_size=416M;
System altered.
SQL> select sum(bytes)/1024/1024 from v$sgastat;
SUM(BYTES)/1024/1024
--------------------
609.057194
SQL> select 638654020/1024/1024 from dual;
638654020/1024/1024
-------------------
609.067936
SQL> alter system set db_cache_size=417M;
alter system set db_cache_size=417M
*
ERROR at line 1:
ORA-02097: parameter cannot be modified because specified value is invalid
ORA-00384: Insufficient memory to grow cache
这里显示,当db_cache_size增加到415M的时候,sga只有0.01M剩余
但是直到db_cache_size增加到417的时候才报错
1)当sga有剩余时,可以动态调整sga中的部分组件(java_pool_size不能在线设置)
2)当sga没有剩余时,如果继续增加某组件的内存,在一定的范围内,sga会自动调整其他组件大小,以实用该值增加
关于sga_max_size总结
1)如果你的系统内存比较紧张,对停机时间要求不是特别严格,那可以不设置sga_max_size参数,这样在重启数据库设置sga组件的时候,不会因忘记设置sga_max_size而导致不能正常启动
2)如果你的系统内存充足,对停机有严格限制,那建议设置一个较大的sga_max_size,后续可以根据需求动态在线调整sga部分组件
发表在 Oracle
评论关闭
DB2入门操作之一
1.DB2启动关闭
--关闭db2 [db2inst1@xifenfei ~]$ db2stop 03/28/2012 09:23:39 0 0 SQL1064N DB2STOP processing was successful. SQL1064N DB2STOP processing was successful. --开启db2 [db2inst1@xifenfei ~]$ db2start 03/28/2012 09:23:55 0 0 SQL1063N DB2START processing was successful. SQL1063N DB2START processing was successful.
2.查看DB2数据库
[db2inst1@xifenfei ~]$ db2 list db directory System Database Directory Number of entries in the directory = 1 Database 1 entry: Database alias = TOOLSDB Database name = TOOLSDB Local database directory = /home/db2inst1 Database release level = d.00 Comment = Directory entry type = Indirect Catalog database partition number = 0 Alternate server hostname = Alternate server port number =
3.连接DB2数据库
[db2inst1@xifenfei ~]$ db2
(c) Copyright IBM Corporation 1993,2007
Command Line Processor for DB2 Client 9.7.4
You can issue database manager commands and SQL statements from the command
prompt. For example:
db2 => connect to sample
db2 => bind sample.bnd
For general help, type: ?.
For command help, type: ? command, where command can be
the first few keywords of a database manager command. For example:
? CATALOG DATABASE for help on the CATALOG DATABASE command
? CATALOG for help on all of the CATALOG commands.
To exit db2 interactive mode, type QUIT at the command prompt. Outside
interactive mode, all commands must be prefixed with 'db2'.
To list the current command option settings, type LIST COMMAND OPTIONS.
For more detailed help, refer to the Online Reference Manual.
db2 => connect to TOOLSDB
Database Connection Information
Database server = DB2/LINUX 9.7.4
SQL authorization ID = DB2INST1
Local database alias = TOOLSDB
4.查看数据库中包含包
db2 => list tables Table/View Schema Type Creation time ------------------------------- --------------- ----- -------------------------- 0 record(s) selected. db2 => create table t_xff (id int,name varchar(100)) DB20000I The SQL command completed successfully. db2 => list tables Table/View Schema Type Creation time ------------------------------- --------------- ----- -------------------------- T_XFF DB2INST1 T 2012-03-28-09.29.54.572395 1 record(s) selected.
5.常见DML操作
db2 => insert into t_xff values(1,'xifenfei')
DB20000I The SQL command completed successfully.
db2 => insert into t_xff values(2,'www.xifenfei')
DB20000I The SQL command completed successfully.
db2 => select * from t_xff
ID NAME
----------- ---------------------------------------
1 xifenfei
2 www.xifenfei
2 record(s) selected.
db2 => delete from t_xff where id=1
DB20000I The SQL command completed successfully.
db2 => select * from t_xff
ID NAME
----------- -----------------------------------------
2 www.xifenfei
1 record(s) selected.
db2 => quit
DB20000I The QUIT command completed successfully.
发表在 DB2
评论关闭

加我微信(17813235971)
加我QQ(107644445)

