10 2013 档案

摘要:一:存在 DB_RECOVERY_FILE_DEST 时,如何设置 LOG_ARCHIVE_DEST:SQL> archive log listデータベース・ログ・モード アーカイブ・モード自動アーカイブ 有効アーカイブ先 USE_DB_RECOVERY_FILE_DEST最も古いオンライン・ログ順序 19アーカイブする次のログ順序 21現行のログ順序 21SQL> show parameter db_recovery_file_destNAME ... 阅读全文
posted @ 2013-10-22 16:37 健哥的数据花园 阅读(3644) 评论(0) 推荐(0) 编辑
摘要:本文为摘抄,目的为方便日后阅读:http://docs.oracle.com/cd/B12037_01/server.101/b10734/rcmbackp.htmTo determine the archived logs needed for recovery of an online backup:Start SQL*Plus and archive all unarchived logs, including the current log:SQL> ALTER SYSTEM ARCHIVE LOG CURRENT;Query V$LOG to determine the log 阅读全文
posted @ 2013-10-21 16:50 健哥的数据花园 阅读(1641) 评论(0) 推荐(0) 编辑
摘要:逻辑结构:TableSapce 由 多个 Segment组成Sgement 由多个 Extent 组成Extent 由 多个数据块组成物理结构:一个Tablespace 可以包括多个数据文件,每个数据文件都是一个真实独立的OS级别的文件。 阅读全文
posted @ 2013-10-18 15:14 健哥的数据花园 阅读(328) 评论(0) 推荐(0) 编辑
摘要:+---- high water mark of newly created table|V+--------------------------------------------------------+| | | | | | | | | | | | | | | | | | | || | | | | | | | | | | | | | | | | | | |+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ high water mark ... 阅读全文
posted @ 2013-10-18 13:13 健哥的数据花园 阅读(363) 评论(0) 推荐(0) 编辑
摘要:Backup Set:一个备份集中可以包含多个数据文件,存储High Water Mark 下的数据块,并且可以采用压缩方式进行,故大小要小于原始数据文件的大小。restore与 recover的开销大。Image Copy:一份拷贝对应一个数据文件,与数据文件等大。基本不需要解压缩,故restore与 recover的开销小。但是只能备份于磁盘上。 阅读全文
posted @ 2013-10-18 10:24 健哥的数据花园 阅读(1817) 评论(0) 推荐(0) 编辑
摘要:例如:rman>configure retention policy to recovery window of 7 days;那么就是说,至少要使得保留下来的备份,可以支持恢复到从当前回溯7天前到现在为止,任意时间点的状态。如果1号和15号分别作了一个全备份,看看到24号的时候:往回看,7天前的日子是 18日。那么就需要至少保留15号的全备份和此后的归档日志。那么1号的全备份和1号到15号之前的归档日志就是过期(obsolete)的。 阅读全文
posted @ 2013-10-18 10:12 健哥的数据花园 阅读(702) 评论(0) 推荐(0) 编辑
摘要:如果不想使用缺省路径,可以以如下方式来指定:RMAN> configure channel 1 device type disk format '/rman/bak/%F';RMAN> configure channel 2 device type disk format '/rman/bak/%F'; 阅读全文
posted @ 2013-10-18 10:02 健哥的数据花园 阅读(2995) 评论(0) 推荐(0) 编辑
摘要:连接:[root@oracle000 ‾]# su - oracle[oracle@oracle000 ‾]$ rman target /[uniread] Loaded history (0 lines)Recovery Manager: Release 11.2.0.3.0 - Production on 金 10月 18 09:20:44 2013Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.ターゲット・データベース: MYDB (データベースID=2740083604)に接続され. 阅读全文
posted @ 2013-10-18 09:40 健哥的数据花园 阅读(334) 评论(0) 推荐(0) 编辑
摘要:第一步:运行netca:第二步:第三步:第四步:第五步:第六步:如果前面设置都正确,测试的结果将正常(前提是Database的listener要开启)。 阅读全文
posted @ 2013-10-17 14:59 健哥的数据花园 阅读(825) 评论(0) 推荐(0) 编辑
摘要:如果用普通用户,如果没授权,是无法建立dblink的:[oracle@oracle000 ~]$ sqlplus gao/gao[uniread] Loaded history (10 lines)SQL*Plus: Release 11.2.0.3.0 Production on 木 10月 17 09:30:27 2013Copyright (c) 1982, 2011, Oracle. All rights reserved.Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit ProductionWith . 阅读全文
posted @ 2013-10-17 14:22 健哥的数据花园 阅读(20978) 评论(0) 推荐(0) 编辑
摘要:运行 netca 即可: 阅读全文
posted @ 2013-10-16 16:09 健哥的数据花园 阅读(1589) 评论(0) 推荐(0) 编辑
摘要:开始我目前的理解是:如果我执行了一条SQL文,那么先是相关数据写到 wal buffer里,然后再写到 data buffer(shared_buffer)里。这之后,由于wal writer process 的存在,就开始定期地读取 wal buffer的内容,然后写到 wal log中。又由于 writer process 的存在在,开始定期地读取 data buffer 的内容,然后直接写到数据文件中。而由于checkpoint_timeout 与 checkpoint_segments 的存在,checkpointer process会在合适的时候,把 data buffer 中的内容 阅读全文
posted @ 2013-10-09 14:45 健哥的数据花园 阅读(491) 评论(0) 推荐(0) 编辑
摘要:对于此问题,在社区进行了提问,并得到了一些大牛的解答:http://postgresql.1045698.n5.nabble.com/Can-checkpoint-creation-be-parallel-td5773656.html结论是:It would not make sense to have more than one checkpoint going onat the same time; it is a point at which recovery can begin. 阅读全文
posted @ 2013-10-09 09:21 健哥的数据花园 阅读(258) 评论(0) 推荐(0) 编辑
摘要:http://www.postgresql.org/docs/9.3/static/runtime-config-replication.html参考官方文档:wal_keep_segments (integer)Specifies the minimum number of past log file segments kept in the pg_xlog directory, in case a standby server needs to fetch them for streaming replication. Each segment is normally 16 megabyt 阅读全文
posted @ 2013-10-07 14:36 健哥的数据花园 阅读(6135) 评论(0) 推荐(0) 编辑
摘要:官方文档:http://www.postgresql.org/docs/9.3/static/runtime-config-replication.html为了防止slave端读取数据时,因为读到的是旧有数据而被强制取消,设定了这么一个以transaction为单位的值。就是可以保证经过这么多的trsanction后,数据仍然得以为slave 几点到读取而保留。vacuum_defer_cleanup_age (integer)Specifies the number of transactions by which VACUUM and HOT updates will defer clea 阅读全文
posted @ 2013-10-07 13:20 健哥的数据花园 阅读(1185) 评论(0) 推荐(0) 编辑
摘要:磨砺技术珠矶,践行数据之道,追求卓越价值回到上一级页面:PostgreSQL基础知识与基本操作索引页 回到顶级页面:PostgreSQL索引页[作者 高健@博客园 luckyjackgao@gmail.com]参考:http://space.itpub.net/133735/viewspace-742081官方资料:http://www.postgresql.org/docs/9.3/static/app-pgbasebackup.htmlThe backup is made over a regular PostgreSQL connection, and uses the replica. 阅读全文
posted @ 2013-10-07 12:57 健哥的数据花园 阅读(2444) 评论(0) 推荐(0) 编辑
摘要:磨砺技术珠矶,践行数据之道,追求卓越价值回到上一级页面:PostgreSQL基础知识与基本操作索引页 回到顶级页面:PostgreSQL索引页[作者 高健@博客园 luckyjackgao@gmail.com]由于数据少,执行计划中没有使用Index Scanpostgres=# CREATE TABLE items (postgres(# itemid serial NOT NULL PRIMARY KEY,postgres(# itemname text NOT NULL,postgres(# tags hstore);NOTICE: CREATE TABLE will cr... 阅读全文
posted @ 2013-10-04 14:16 健哥的数据花园 阅读(803) 评论(0) 推荐(0) 编辑
摘要:安装hstore:进入源代码的/contrib/hstore 目录,然后执行gmake 和 gmake install:[root@pg200 hstore]# gmakegcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fpic -I. -I. -I../../src/include -D_GNU_SOU 阅读全文
posted @ 2013-10-04 10:26 健哥的数据花园 阅读(9199) 评论(0) 推荐(0) 编辑
摘要:磨砺技术珠矶,践行数据之道,追求卓越价值回到上一级页面:PostgreSQL杂记页 回到顶级页面:PostgreSQL索引页[作者 高健@博客园 luckyjackgao@gmail.com]外部文件来自于Windows,日语SJIS字符集。由于SJIS字符集和标准的POSIX有冲突,故Linux平台一般是不支持此字符集的。而PostgreSQL的服务器端也不支持它。但是它支持客户端使用SJIS,因此导入时,可以用PostgreSQL的自动变换功能。具体如下:-----------------------------Linux Encoding:[root@pg200 data]# echo. 阅读全文
posted @ 2013-10-04 08:52 健哥的数据花园 阅读(1203) 评论(0) 推荐(0) 编辑
摘要:磨砺技术珠矶,践行数据之道,追求卓越价值回到上一级页面:PostgreSQL基础知识与基本操作索引页 回到顶级页面:PostgreSQL索引页[作者 高健@博客园 luckyjackgao@gmail.com]参考官方文档:http://www.postgresql.org/docs/9.2/static/runtime-config-query.html如下的各个参数,都是只有相对意义,比较的基准是:seq_page_cost=1Unfortunately, there is no well-defined method for determining ideal values for t. 阅读全文
posted @ 2013-10-03 16:12 健哥的数据花园 阅读(3418) 评论(0) 推荐(0) 编辑
摘要:磨砺技术珠矶,践行数据之道,追求卓越价值回到上一级页面:PostgreSQL基础知识与基本操作索引页 回到顶级页面:PostgreSQL索引页[作者 高健@博客园 luckyjackgao@gmail.com]此参数是说:在等待一个lock被释放的时间里,多久可以启动deadlock检查机制。deadlock检查机制执行的代价比较高,因此在符合较重、locK动作较多的系统里,可以适当地增大 deadlock_timeout。http://www.postgresql.org/docs/9.2/static/runtime-config-locks.htmlThis is the amount. 阅读全文
posted @ 2013-10-03 15:37 健哥的数据花园 阅读(2591) 评论(0) 推荐(0) 编辑
摘要:磨砺技术珠矶,践行数据之道,追求卓越价值回到上一级页面:PostgreSQL杂记页 回到顶级页面:PostgreSQL索引页[作者 高健@博客园 luckyjackgao@gmail.com]目前,某些用户正在考虑或评估从Oracle向PPAS(PostgresPlus Advanced Server) 移植的问题。虽然营销人员吹嘘得很厉害,但是实际上,移植中会有各种各样的困难之处。毕竟是两个不同的数据库,因此不兼容是十分正常的,可怕就可怕在PPAS是以“轻松从Oracle移植到更低成本的基于开源数据库(PostgreSQL)的企业级数据库(PPAS)”为卖点的。市场人员有意无意的过度宣传,. 阅读全文
posted @ 2013-10-02 14:42 健哥的数据花园 阅读(1382) 评论(0) 推荐(0) 编辑
摘要:磨砺技术珠矶,践行数据之道,追求卓越价值回到上一级页面:PostgreSQL集群方案相关索引页 回到顶级页面:PostgreSQL索引页[作者 高健@博客园 luckyjackgao@gmail.com]首先,通过代码,查看调用关系:libpqwalreceiver.c _PG_init 関数 /* * Module load callback */ ... 阅读全文
posted @ 2013-10-02 14:24 健哥的数据花园 阅读(3475) 评论(0) 推荐(0) 编辑
摘要:磨砺技术珠矶,践行数据之道,追求卓越价值回到上一级页面:PostgreSQL集群方案相关索引页 回到顶级页面:PostgreSQL索引页[作者 高健@博客园 luckyjackgao@gmail.com]客户的streaming replication的参数是这样的:synchronous_standby_names=‘’官方文档是这样说的:synchronous_standby_names (string)Specifies a comma-separated list of standby names that can support synchronous replication, a. 阅读全文
posted @ 2013-10-01 08:59 健哥的数据花园 阅读(3419) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示