诗檀软件救援金蝶EAS应用oracle数据库恢复案例

支援金蝶EAS客户案例:

案例一:某粮企easdba数据库断电异常恢复
晚上18:00接到哈尔滨分公司电话,说是某粮企的数据库由于异常断电不能启动。
经过验证诊断,分析发现是数据库由于异常断电,数据块有损坏,oracle启动异常保护机制,不能常规启动数据库,报错ORA-600,ORA-01109,ORA-01194,ORA-01110等相关内部错误,而且指明损坏的块位于oracle的核心数据文件system(见下图)。
经过判断此类问题需要特殊恢复,本着负责任的态度,某粮企的客户去寻找上海诗檀这家专业的技术公司来解决此问题。成功帮客户恢复了数据,挽回了损失,数据回复率到达99%。

kcratr_nab_less_than_odr_ora-00600

ORA-01547 ORA-01194 ORA-10879 ORA-01110

 
案例二:XX集团oracle ASM异常导致不能读到存储
2016/3/22,接到分公司反馈,XX集团的数据库AIX服务器,重启之后,数据库不能启动,ASM实例不能读取到存储卷的信息。报错ora-600,报错的原因是asm控制文件的文件头冲突,导致文件不一致性导致,此类问题是属于oracle核心内部的文件不一致性导致,需要修改底层逻辑文件头为正确的值。常规手段不能解决,金蝶也不能为客户解决此问题。
经过推荐,让客户联系了上海诗檀这家公司,这家公司有能力解决这个问题,现在和的客户正处于合同洽谈阶段。

ORA-00600 internal error code kfrValAcd30

 

Parnassusdata 诗檀软件公司介绍
专业性
ORACLE ACE
原服务于Oracle原厂的数据库专家组成

独特性
除Oracle原厂服务团队ACS之外,中国大陆市场上,真正有能力进行底层级别的维护公司不超过2家
诗檀软件专家有能力为客户提供最终保证

业务范围
数据库恢复业务,灾难恢复
数据库性能乃至整体架构的调优
7*24数据库紧急求助服务等
磁盘掉电引起的大量坏块导致数据库无法启动.

公司介绍
公司网站:http://www.parnassusdata.com/oracle-recovery-landing/index.html
公司地址: 上海市共和新路1988号10座610室(为商务写字楼,门口在大宁路上)
服务咨询热线: 13764045638
港澳台热线: +86 13764045638
service@parnassusdata.com(技术支持首选)

通过Mongolab申请免费的MongoDB测试实例

Mongolab目前提供的免费的MongoDB实例供广大用户测试使用,免费实例的限制是最大500MB。

 

mongdblab

 

 

首先到https://mongolab.com 注册一个帐号,之后Login登录, 点击create new

mongdblab1

 

plan中要选择single-node才可以看到free plan的sanbox , cloud provide直接选Amazon AWS

mongodb2

之后点击create new mongodb deployment即可

需要手动创建一个mongodb用户:

mongolab4

 

之后就可以利用该云端mongodb测试实例了:

 

 

例如 使用mongo shell连接


[root@ocm ~]# mongo ds041432.mongolab.com:41432/dbdao -u dbdao -p dbdao
MongoDB shell version: 3.0.3
connecting to: ds041432.mongolab.com:41432/dbdao
rs-ds041432:PRIMARY> 

rs-ds041432:PRIMARY> 
rs-ds041432:PRIMARY> 

rs-ds041432:PRIMARY> db.dbdao.insert({"hello":"world!"});
WriteResult({ "nInserted" : 1 })
rs-ds041432:PRIMARY> db.dbdao.find();
{ "_id" : ObjectId("55672f4076e23efacff7cc07"), "hello" : "world!" }

Oracle Database Cloud服务购买流程初探

Oracle推出自家的Cloud服务已有多时了,不过国内对其接触还较少。其Cloud服务中Database云服务自然是不可缺少的啦,对于Oracle来说,这属于DaaS服务,个人或公司都可购买使用。

下面我们就来简单介绍下购买其Database服务的大致过程。

1. 首先登陆https://cloud.oracle.com/

2. 在菜单栏【Products & Services】下,右边的【Platform】列【Database】链接中,可以直接转至其Database专题页,你可以使用【Try It】进行注册以获得30天的试用体验。也可以像我们一样进入【Sign In】,找到订单页进行正式购买。

3. 在Sign In跳转至登陆页后,点击【Sign In My Account】。

4. 登陆后我们可以看到,由于正在申请数据库【Try It】,因此已经有一个databasetrial8167的申请正在等待Oracle审批回复,对于试用申请,一般会需要1周左右时间,在审批通过后,你在服务中申请的domain才会被激活,Oracle会发你邮件通知您试用申请通过,因此需要耐心等待。

回到正题,由于需要买正式服务,因此点【Orders】,之后点【Buy Services】进入服务购买流程。

5. 这里我们可以看到很多收费服务,查找database我们可以很快找到关于数据库的云服务。

6. 不同的服务对应的不同的数据库配置和流量限制,点击其中一个服务【View Details】查看细节,选择所需服务模式【Term】,这里我们选择Month-to-Month, Quantity可以根据需要填写。在填写完后点击【Add to Cart】加入购物车,进入之后的付款流程。

** 请注意本页中,左上角需要选择United States,因为China还不提供按月收费服务,如果是China的话,只能选到1 Year, 2 Year, 3 Year的年度服务。

7. 加入购物车后,你可以在页面右边找到【View Cart Details】进行服务的【Checkout】。

期间可能需要你再次登陆以提交更具体的客户信息。

8. 填写客户信息并确认保存,【Save and Continue】。

** 请注意在进行联系地址确认时,由于选择的是United States中的每月付费服务,而页面显示为美国地区,因此地址中必须提供一个美国地址,由于验证较为严格,请一定填写一个准确地址和邮件投递号。如果你选择为中国地区,且为年付,那么地址问题一定难不倒您 🙂

在地址确认无误后,点【Save and Continue】。

9. 进入付款信息填写

确认付款信息并保存

服务协议确认

订单完成!!

在购买服务后,我们就可以在购买服务时填写的邮箱中收到确认E-mail了。

 

ORA-30732 ORA-30732: 表中不包含用户可见的列 问题解析

如果自己搞不定可以找诗檀软件专业ORACLE数据库修复团队成员帮您恢复!

诗檀软件专业数据库修复团队

服务热线 : 13764045638 QQ号:47079569 邮箱:service@parnassusdata.com

 

ORA-30732: table contains no user-visible columns

ORA-30732: 表中不包含用户可见的列

 

SQL> SQL> select * from scott.dept
                    *
ERROR at line 1:
ORA-30732: table contains no user-visible columns


oerr ora 30732
30732, 00000, "table contains no user-visible columns"
// *Cause:    An attempt was made to query on a system table which has no 
//            user-visible columns.
// *Action:   Do not query on a system table that has no user-visible
//            columns. 

出现该30732报错一般有2种情况:

1、 用户确实查询了一个系统表且存在用户不可见的字段
2、 由于oracle数据字典不一致而导致的问题导致出现该ORA-30732

对于情况1而言,一般并不影响应用用户的使用。 而对于情况2而言 如果oracle data dictionary确实不一致或损坏了,那么代价往往是系统整体不可用,且SELECT查询语句总是失败等。

 

对于情况2的数据字典问题,一般需要有经验的ORACLE支持工程师根据字典损坏情况给出恢复方案。

 

 

C100DBA认证讲解 MongoDB replication 原理

C100DBA认证讲解 MongoDB replication 原理

Screen Shot 2015-05-25 at 11.39.46 PM

题目正文:

which of following is true of mechanics of replication in MongoDB?

  1. Clients read from nearest member of a replica set by default
  2. Members of a replica set may replicate data from any other data-bearing member of set .
  3. Operations on the primary are recorded in a capped collection called oplog

翻译:

下面关于Mongodb的replication复制技术细节描述正确的是?

  1. 复制集成员会默认从复制集中最近的成员哪里读取数据
  2. replica set 复制集中的成员可能从其他任何承载数据的节点上复制数据
  3. 在primary上的操作将会被记录到一个capped collection(受限集合)中称之为oplong

 

Replica set members replicate data continuously after the initial sync. This process keeps the members up to date with all changes to the replica set’s data. In most cases, secondaries synchronize from the primary.

http://docs.mongodb.org/manual/core/replica-set-sync/

==>默认情况下从Primary同步数据,而不是复制集中最近的成员

For a member to sync from another, both members must have the same value for the buildIndexessetting.

Beginning in version 2.2, secondaries avoid syncing from delayed members and hidden members.

从2.2开始secondaries会避免从延迟成员和隐藏成员哪里同步数据,所以复制集中的成员可能从其他任何承载数据的节点上复制数据是错误的

 

The oplog (operations log) is a special capped collection that keeps a rolling record of all operations that modify the data stored in your databases. MongoDB applies database operations on the primary and then records the operations on the primary’s oplog. The secondary members then copy and apply these operations in an asynchronous process. All replica set members contain a copy of the oplog, in thelocal.oplog.rs collection, which allows them to maintain the current state of the database.

http://docs.mongodb.org/manual/core/replica-set-oplog/

选项Operations on the primary are recorded in a capped collection called oplog是正确的。

C100DBA认证讲解 MongoDB 讲解-quick initiating new replica set member?

C100DBA认证讲解 MongoDB 讲解-quick initiating new replica set member?

Screen Shot 2015-05-25 at 11.15.20 PM

 

 

题目正文

which of the following is the recommended method for quickly initiating a new replica set member?

  1. Empty the dbpath directory for the new member to force an initial sync
  2. Mongodump a existing replica set member’s data and then mongorestore it to the new member
  3. Use the seed command
  4. Step up the new member to be the replica set primary
  5. Use a recent file system snapshot of an existing member with journaling turned on ,assuming the data files in the snapshot are more recent than the oldest operation in the primary’s oplog .

 

翻译:

以下哪个选项是被推荐的初始化一个新的replica set 复制集成员的?

  1. 为新成员清空dbpath路径下的文件,强制一个初始化同步
  2. mongodump一个replica set Member复制集成员的数据,并mongorestore到新成员
  3. 使用seed 命令
  4. 将新成员配置成replica set中的primary
  5. 使用一个现有成员的文件系统快照且需要启用了journaling ,假设快照中的数据文件要比primary的oplog中的最老的操作更新

 

官方文档对应的解释:

  • Initial sync occurs when MongoDB creates new databases on a new or restored member, populating the member with the replica set’s data. When a new or restored member joins or rejoins a set, the member waits to receive heartbeats from other members. By default, the member syncs from theclosest member of the set that is either the primary or another secondary with more recent oplog entries. This prevents two secondaries from syncing from each other.
  • Replication occurs continually after initial sync and keeps the member updated with changes to the replica set’s data.

http://docs.mongodb.org/v2.2/core/replication-internals/

 

Initial Sync

Initial sync copies all the data from one member of the replica set to another member. A member uses initial sync when the member has no data, such as when the member is new, or when the member has data but is missing a history of the set’s replication.

When you perform an initial sync, MongoDB:

  1. Clones all databases. To clone, the mongod queries every collection in each source database and inserts all data into its own copies of these collections. At this time, _id indexes are also built. The clone process only copies valid data, omitting invalid documents.

  2. Applies all changes to the data set. Using the oplog from the source, the mongod updates its data set to reflect the current state of the replica set.

  3. Builds all indexes on all collections (except _id indexes, which were already completed).

    When the mongod finishes building all index builds, the member can transition to a normal state, i.e.secondary.

http://docs.mongodb.org/manual/core/replica-set-sync/

【MySQL学生手册】MySQL的SQL解析器和存储引擎层

客户端通过以SQL语句的形式发送请求给服务器端从而从表中获取数据或对表数据进行修改。而服务端程序使用以下两层处理模型以执行每个语句请求:

  • 上层包括SQL解析器(parser)和优化器(optimizer)。
  • 下层包括了一组存储引擎。

需要注意的是,SQL层并不依赖于存储引擎管理的表。这意味着客户端通常不需要考虑哪个引擎被涉及处理其SQL语句,也不用考虑访问和更新的表是受到哪个引擎的管理。当然也有例外:

  • CREATE TABLE语句有ENGINE项可用于在建立表时启用你所定义的存储引擎。ALTER TABLE语句也含有一个ENGINE项可以使你能将原表转换使用一个不同的存储引擎。
  • 一些索引类型仅在某些特定存储类型中可用。例如, 仅MyISAM引擎支持空间索引(spatial index), 仅MyISAM, InnoDB(5.6.4以上)支持全文索引(full-text)等。
  • COMMIT和ROLLBACK仅对由事务型存储引擎(如InnoDB)管理的表有效果。

存储引擎细分

下图简单展示了MySQL服务和其存储引擎之间的交互。

m31_2.3_mysql_storage_engine_wm_a01e18650dc19d05904f5be78c4dbdf088be3bef

依赖存储引擎不同会有以下不同:

  • 存储方法 – 每张表中的数据按其自身的方法进行存储。
  • 事务处理能力 – 某些存储引擎可以对事务进行处理,在执行多SQL语句时能确保数据库的完整性。
  • – 是指每个引擎对于多线程执行场景中同一个资源的访问限制及同步机制处理。
  • 备份恢复 – 基于不同的存储方法,表数据的备份和恢复也有区分。
  • 优化 – 对于数据存储的优化和通过MySQL服务器的数据抽取,每个存储引擎都有其特定的优化点。
  • 特定特性 – 某些引擎具有一些不同的特性包括全文搜索,参照完整性和处理空间数据的能力。

多数MySQL服务器会以相同的方式进行操作,即所有的常用SQL语句都是引擎无关的。当然,其优化器可能会按不同的存储引擎做出不同的优化判断,但也都是通过所有引擎都支持的一套标准接口(API)进行所有处理。

MongoDB replica set演示和实验服务

mongolab提供了一个flip-flop 正反器的replica set复制集演示,其通过一个真实的replica set来演示自动的failover。 该真实环境包括三个节点:replica member “flip”和”flop”。每60秒,primary将会自己让自己不可用”step-down”,之后集群将failover到另一个节点上,60秒后再反转回来。

 

URL: http://mongolab.org/flip-flop/

 

同时mongolab还提供了一个可视化的replica set  的election过程

Screen Shot 2015-05-25 at 12.07.29 PM

 

样例日志:

Logs will start streaming when there is replica set activity. Please wait...

arbiter: Sun May 24 20:43:03.373 [rsHealthPoll] replSet member flop.mongolab.com:54117 is now in state SECONDARY
arbiter: Sun May 24 20:43:07.386 [rsHealthPoll] replSet member flip.mongolab.com:53117 is now in state PRIMARY
arbiter: Sun May 24 20:44:03.460 [rsHealthPoll] replSet member flip.mongolab.com:53117 is now in state SECONDARY
arbiter: Sun May 24 20:44:09.545 [rsHealthPoll] replSet member flop.mongolab.com:54117 is now in state PRIMARY
arbiter: Sun May 24 20:45:03.641 [rsHealthPoll] replSet member flop.mongolab.com:54117 is now in state SECONDARY
arbiter: Sun May 24 20:45:13.669 [rsHealthPoll] replSet member flip.mongolab.com:53117 is now in state PRIMARY
arbiter: Sun May 24 20:46:01.764 [rsHealthPoll] DBClientCursor::init call() failed
arbiter: Sun May 24 20:46:01.804 [rsHealthPoll] replSet info flip.mongolab.com:53117 is down (or slow to respond): DBClientBase::findN: transport error: flip.mongolab.com:53117 ns: local.$cmd query: { getnonce: 1 }
arbiter: Sun May 24 20:46:01.805 [rsHealthPoll] replSet member flip.mongolab.com:53117 is now in state DOWN
arbiter: Sun May 24 20:46:03.815 [rsHealthPoll] replSet member flip.mongolab.com:53117 is up
arbiter: Sun May 24 20:46:03.816 [rsHealthPoll] replSet member flip.mongolab.com:53117 is now in state SECONDARY
arbiter: Sun May 24 20:46:07.774 [rsHealthPoll] replSet member flop.mongolab.com:54117 is now in state PRIMARY
arbiter: Sun May 24 20:47:03.863 [rsHealthPoll] replSet member flop.mongolab.com:54117 is now in state SECONDARY
Sun May 24 20:47:03.863 [rsMgr] replSet I don't see a primary and I can't elect myself
arbiter: Sun May 24 20:47:13.910 [rsHealthPoll] replSet member flip.mongolab.com:53117 is now in state PRIMARY
arbiter: Sun May 24 20:48:03.990 [rsHealthPoll] replSet member flip.mongolab.com:53117 is now in state SECONDARY
arbiter: Sun May 24 20:48:07.992 [rsHealthPoll] replSet member flop.mongolab.com:54117 is now in state PRIMARY
arbiter: Sun May 24 20:49:04.080 [rsHealthPoll] replSet member flop.mongolab.com:54117 is now in state SECONDARY
arbiter: Sun May 24 20:49:14.141 [rsHealthPoll] replSet member flip.mongolab.com:53117 is now in state PRIMARY
arbiter: Sun May 24 20:50:04.252 [rsHealthPoll] replSet member flip.mongolab.com:53117 is now in state SECONDARY
arbiter: Sun May 24 20:50:14.265 [rsHealthPoll] replSet member flop.mongolab.com:54117 is now in state PRIMARY
arbiter: Sun May 24 20:51:04.350 [rsHealthPoll] replSet member flop.mongolab.com:54117 is now in state SECONDARY
arbiter: Sun May 24 20:51:14.456 [rsHealthPoll] replSet member flip.mongolab.com:53117 is now in state PRIMARY
arbiter: Sun May 24 20:52:04.569 [rsHealthPoll] replSet member flip.mongolab.com:53117 is now in state SECONDARY
arbiter: Sun May 24 20:52:08.573 [rsHealthPoll] replSet member flop.mongolab.com:54117 is now in state PRIMARY
arbiter: Sun May 24 20:53:02.660 [rsHealthPoll] replSet member flop.mongolab.com:54117 is now in state SECONDARY
arbiter: Sun May 24 20:53:08.675 [rsHealthPoll] replSet member flip.mongolab.com:53117 is now in state PRIMARY
arbiter: Sun May 24 20:54:02.839 [rsHealthPoll] replSet member flip.mongolab.com:53117 is now in state SECONDARY
arbiter: Sun May 24 20:54:12.951 [rsHealthPoll] replSet member flop.mongolab.com:54117 is now in state PRIMARY
arbiter: Sun May 24 20:55:03.255 [rsHealthPoll] replSet member flop.mongolab.com:54117 is now in state SECONDARY
arbiter: Sun May 24 20:55:08.948 [rsHealthPoll] replSet member flip.mongolab.com:53117 is now in state PRIMARY
arbiter: Sun May 24 20:56:03.017 [rsHealthPoll] replSet member flip.mongolab.com:53117 is now in state SECONDARY
arbiter: Sun May 24 20:56:09.024 [rsMgr] replSet I don't see a primary and I can't elect myself


 

 

flip-flop 的初衷是为了可视化演示复制集的election过程,让开发者能更清楚了解这一过程,以便能写出更好的客户端连接代码。同时mongolab还给出了一个连接URL:

mongodb://testdbuser:testdbpass@flip.mongolab.com:53117,flop.mongolab.com:54117/testdb

Maclean出的oracle面试题

原帖在这里:http://tieba.baidu.com/p/3784873245

有同学在群里问能否提供一些oracle的技术面试题, maclean这里抛砖引玉一下列出一些自己关心的面试内容; 由于是想到哪里写到哪里,所以没什么章法,还请轻拍

  1. 在Oracle AWR中如何定位到大表扫描的情况?
  2. oracle中row lock和TX锁到底是什么关系?
  3. 说说你遇到过的几个oracle等待事件,并简单解释其原理
  4. 简单描述以下一致性读consistent read 和undo的关系
  5. 某数据库出现了hang的情况,甚至sqlplus也无法登陆,你如何收集数据?
  6. 你是如何观察执行计划的,常用几种方法,优缺点如何?
  7. 你是否了解Latch和mutex,可以教条地告诉我他们的原理吗? 不需要你很清楚,只要能背书即可
  8. 对于一个SQL的执行计划问题,你无法调整SQL语句,该如何调整其执行计划?
  9. 现场试验:随机抽一个12c最近处的特性 要求针对其做一个试验并给出试验报告
  10. 给oracle freelist发一封英文邮件,咨询一个随机的技术问题,要求能够用英文明确描述问题

 

C100DBA MongoDB 讲解 replica set vote

C100DBA MongoDB 讲解 replica set vote

题目中文:

Given a replica set with five data-bearing members, suppose the primary goes down with operations in its oplog that have been copied to only one secondary .

Assuming no other problems occur, which of the following describes what is most likely to happen?

  1. The primary will rollback the operations
  2. The secondary with the most recent oplog will be elected primary
  3. The most recent secondary will roll back the operations following the election
  4. Reads will stale until primary comes backup up

翻译:

对于一个有五个承载数据的成员的replica set 而言,假设primary服务器宕机了,且其oplog中最新的操作信息只成功拷贝到一个secondary上了。

假设没有其他问题发生,以下哪个选项是正确的?

  1. Primary将在恢复时回滚部分操作
  2. 拥有最新的oplog的这个secondary服务器将赢得election并成为primary
  3. 在election后最新的这个secondary会回滚部分操作
  4. 直到primary重新可用,之前读操作将读到过时的数据

 

关于此问题 官方文档有较明确解释:

A rollback does not occur if the write operations replicate to another member of the replica set before the primary steps down and if that member remains available and accessible to a majority of the replica set.     http://docs.mongodb.org/manual/core/replica-set-rollbacks/

只要primary上的写操作已经复制到某个secondary成员上,secondary成员可用,就可以保证rollback不会发生。

 

 

沪ICP备14014813号-2

沪公网安备 31010802001379号