软件产品更新下载

OraGlance 轻量级的Oracle性能监控工具最新版:  https://zcdn.askmaclean.com/OraGlance2103.zip

MySQLGlance  轻量级的MySQL性能监控工具最新版: https://zcdn.askmaclean.com/MySQLGlance2103.zip    

DBRECOVER for Oracle恢复工具最新版: https://zcdn.parnassusdata.com/dbrecover-for-oracle2009.zip

DBRECOVER for MySQL恢复工具最新版:https://zcdn.parnassusdata.com/dbrecover-for-mysql-2010.zip

OraDumpReader Oracle dump文件恢复工具最新版:https://zcdn.parnassusdata.com/OraDumpReader200707.zip

DBRECOVER for MS SQL SERVER恢复工具最新版:https://zcdn.parnassusdata.com/dbrecover-for-sqlserver-2007.zip

 

按照重要程度划分数据库级别

按照重要程度划分数据库级别
级别 D C B A S
影响面 小于10人 10-1000人 1000-100000人 100000-1000000人 1000000人以上
业务类型举例 测试/开发系统,小型OA 记账软件等 中型OA ERP 财务软件等 中大型ERP MES HRM ,大型医院HIS 电信CRM 银行BANKING等 大型公共应用 如12306等
灾难救援价格 500-5000 5千到三万 3万到10万 10万到50万 50万以上
一般的配套设施 几乎无任何有效备份 少量磁盘上逻辑备份 可能有物理备份+其他备份形式 物理/逻辑备份+DataGuard,OGG等物理/逻辑灾备;存储级别冗余等+多数据中心冗余 都有

DataGoGo Oracle/MySQL数据库复制同步校准软件

DataGoGo Oracle/MySQL数据库复制同步校准软件

DataGoGo Rdbms Oracle MySQL Table/Schema Sync Compare Repair

 

Download  https://zcdn.askmaclean.com/DataGoGo2103.zip

DataGoGo2104

 

 

Oracle 12.2 使用datagurd技术极短停机时间内快速迁移数据库方案步骤

=================================> 前期配置应在割接前10天完成 <=================================

 

1、在新服务器上配置必要的os参数,包含大内存页等

2、在新服务器上12.2.0.1 GI和RDBMS,安装2010补丁:p31741641_122010和p31750094_122010

3、创建一个与oldorcl库参数配置匹配的空数据库

4、复制密码文件到新服务器:

[oracle@]$ srvctl config database -d as19_fra1gh | grep ‘Password file’
Password file: +DATAC1//PASSWORD/passwd <– this file is what needs to be copied to /tmp and scp’d to the standby (result may differ)

[oracle@]$ export ORACLE_SID=+ASM1
[oracle@]$ export ORACLE_HOME=/u01/app/12.2.0.1/grid
[oracle@]$ export PATH=$ORACLE_HOME/bin:$PATH
[oracle@]$asmcmd cp +DATAC1//PASSWORD/passwd /tmp/passwd. copying +DATAC1//PASSWORD/passwd -> /tmp/passwd.

[oracle@]$ scp /tmp/orapw1 oracle@:/tmp/orapw

5、配置tnsnames.ora文件
包含 oldorcl 条目 和neworcl条目

oldorcl 老的源库
neworcl 新的目标库

6、在新服务器上恢复控制文件

startup nomount;

restore standby controlfile from service oldorcl;
alter database mount;

7、配置rman参数

CONFIGURE DEVICE TYPE DISK PARALLELISM 2;

8、 全量恢复数据库 ;也可以基于传输备份文件实现,影响大同小异

restore database from service oldorcl;

9、 增加standby logfile:

SQL> alter database add standby logfile thread 1
group 7 (‘+DATA’) size 4294967296,
group 8 (‘+DATA’) size 4294967296,
group 9 (‘+DATA’) size 4294967296;

SQL> alter database add standby logfile thread 2
group 11 (‘+DATA’) size 4294967296,
group 12 (‘+DATA’) size 4294967296,
group 13 (‘+DATA’) size 4294967296;

10、 配置 归档传输 log_archive_dest_2 (基于归档同步) log_archive_dest_2=’service=neworcl lgwr async’

如果 归档日志过多 ,那么可以 定期执行recover database from service oldorcl; (基于增量备份实现同步) ,而不打开归档传输

11、 将neworcl数据库启动到只读模式,并打开日志应用

alter database open read only;
alter database recover managed standby database using current logfile disconnect from session;

=================================> 割接窗口开始 <=================================

 

必须打开归档传输log_archive_dest_2=’service=neworcl lgwr async’

 

停止应用

 

停止数据库实例 shutdown immediate; ==》 约5分钟

 

将oldorcl数据库启动到 限制模式 ==》 约5分钟

 

startup restrict;

 

创建一条新记录 ,并确认传输到新库 ==> 约1分钟

create table test1(t1 date);
insert into test1 values(sysdate);
commit;
alter session set nls_date_format=’YYYY-MM-DD hh24:mi:ss’;
alter system checkpoint;

alter system switch logfile;

alter system switch logfile;
alter system switch logfile;
select * from test1;

在新orcl确认
select * from test1;

将neworcl数据库启动到打开模式 ==》10分钟

ALTER DATABASE RECOVER MANAGED STANDBY DATABASE FINISH;
ALTER DATABASE COMMIT TO SWITCHOVER TO PRIMARY;

alter database open;

检查数据

停数据库实例 、监听、SCAN ip资源 ==》10分钟

切换SCAN IP ==>10分钟

启动所有资源 ,启动neworcl 2节点数据库实例 ==》15分钟

去掉 log_archive_dest_2

=================================> 割接窗口结束 <=================================

自己写的RMAN备份脚本

一套自己写的rman备份脚本,包含全量、增量和归档日志备份,备份策略为每7天一个全备份,2天一个增量备份和每8小时一次归档备份,并删除一个月前的备份和归档。

 

 



crontab 



0 0,8,16 * * * sh /home/oracle/backup_script/backup-archive.sh >> /home/oracle/backup_script/backup-archive.log
0 0 7,14,21,28 * * sh /home/oracle/backup_script/backup-full.sh >> /home/oracle/backup_script/backup-full.log
0 0 2,4,6,8,10,12,16,18,20,22,24,26 * * sh /home/oracle/backup_script/backup-inc.sh >> /home/oracle/backup_script/backup-inc.log




FULL 

sql 'alter system archive log current';
sql "alter session set nls_date_format=''dd.mm.yyyy hh24:mi:ss''";
RUN
{
ALLOCATE CHANNEL c1 DEVICE TYPE disk;
ALLOCATE CHANNEL c2 DEVICE TYPE disk;
ALLOCATE CHANNEL c3 DEVICE TYPE disk;
ALLOCATE CHANNEL c4 DEVICE TYPE disk;
backup AS COMPRESSED BACKUPSET incremental level 0  database tag ORCL_FULL format '/oracle_bak/oradir/%d_%T_%s_%p_FULL' ;
sql 'alter system archive log current';
backup as compressed backupset tag ORCL_ARCHIVE format '/oracle_bak/oradir/%d_%T_%s_%p_ARCHIVE' archivelog all not backed up delete all input ;
delete backup of archivelog until time='sysdate-30';
backup tag ORCL_CONTROL current controlfile format '/oracle_bak/oradir/%d_%T_%s_%p_CONTROL';
release channel c1;
release channel c2;
release channel c3;
release channel c4;
}




INC


sql 'alter system archive log current';
sql "alter session set nls_date_format=''dd.mm.yyyy hh24:mi:ss''";
RUN
{
ALLOCATE CHANNEL c1 DEVICE TYPE disk;
ALLOCATE CHANNEL c2 DEVICE TYPE disk;
ALLOCATE CHANNEL c3 DEVICE TYPE disk;
ALLOCATE CHANNEL c4 DEVICE TYPE disk;
backup AS COMPRESSED BACKUPSET incremental level 1  database tag ORCL_INC1 format '/oracle_bak/oradir/%d_%T_%s_%p_INC1' ;
sql 'alter system archive log current';
backup tag ORCL_CONTROL current controlfile format '/oracle_bak/oradir/%d_%T_%s_%p_CONTROL';
release channel c1;
release channel c2;
release channel c3;
release channel c4;
}



ARCHIVE 

sql "alter session set nls_date_format=''dd.mm.yyyy hh24:mi:ss''";
RUN
{
allocate channel c1 type disk MAXOPENFILES=1 parms ' BLKSIZE=1048576 ';
allocate channel c2 type disk MAXOPENFILES=1 parms ' BLKSIZE=1048576 ';
allocate channel c3 type disk MAXOPENFILES=1 parms ' BLKSIZE=1048576 ';
allocate channel c4 type disk MAXOPENFILES=1 parms ' BLKSIZE=1048576 ';
sql 'alter system archive log current';
backup as compressed backupset tag ORCL_ARCHIVE format '/oracle_bak/oradir/%d_%T_%s_%p_ARCHIVE' archivelog all not backed up delete all input ;
delete backup of archivelog until time='sysdate-30';
backup tag ORCL_CONTROL current controlfile format '/oracle_bak/oradir/%d_%T_%s_%p_CONTROL';
release channel c1;
release channel c2;
release channel c3;
release channel c4;
}

看了TENET电影做个逆向的Oracle数据库周边

10:00 Oracle instance shutdown complete
10:01 database closed
10:02 shutdown issued by user
10:03 SCN 99999
10:04 SCN 99000
10:05 SQL result from client back to server
10:06 SQL fetch back to disk
10:07 SQL cursor back to parse
10:08 SQL optimize=>semantic parse=>syntax parse
10:09 user issue SQL:  ;pme morf * tceles
10:10+NN database opened
10:10+NN redo scan , rolling forward
10:10+NN database mounted
10:10+NN instance nomount start
10:10+NN user issue in SQLPLUS: ;putrats

 

 

Oracle 各种删除操作对空间返还的说明

Oracle 各种删除操作对空间返还的说明
操作 表空间是否回收空间? 文件系统或ASM是否回收空间? 是否造成表上的碎片? 在本地管理表空间(LMT 9i以后)是否造成表空间碎片? 在字典管理表空间(DMT 9i以前)是否造成表空间碎片?注意现在的oracle版本不太可能用DMT 是否造成索引碎片? 有心理问题,或者为应付领导,一定要对付对付不存在的碎片怎么办?
DELETE SQL 否,空间可以被该表重用。可以称之为高水位,但谈不上碎片 不适用 不适用 对表可以shrink space;对索引可以coalesce操作;对于大表而言IO和redo会很多,耗时也可能长
DROP TABLE 是的;视乎recyclebin参数是否进入回收站;但空间都可以被表空间重用 都没表了 本地管理表空间的extent是统一大小或系统自动分配大小,不存在表空间碎片 可能导致碎片(alter tablespace coalesce适用场景) 索引都没了 不适用
TRUNCATE TABLE 默认是的 本地管理表空间的extent是统一大小或系统自动分配大小,不存在表空间碎片 可能导致碎片(alter tablespace coalesce适用场景) 不适用
注:Oracle除非手动resize datafile,否则一般不会自动返回空间给文件系统或ASM

 

 

 

Oracle 各种删除操作对空间返还的说明

python计算sigma


from functools import reduce

def sigma(i,j):
    return reduce(lambda a, x: a + x, [0]+list(range(i,j+1)))
    

print(sigma(1,10000))

MySQLGlance一个轻量级MySQL性能监控工具

MySQLGlance是免费的,你可以安心使用它。

MySQLGlance is free software , use it as you like.

 

下载地址URL:https://zcdn.askmaclean.com/MySQLGlance2103.zip

 

 

2021-03-04 :  mysqlglance对ssl的要求降低为NONE

 

 

MySQLGlance的目标

 

  • 完全免费
  • 一键即运行的图形化MySQL数据库性能监控软件
  • 无需安装、部署,不占用服务器资源
  • 目前支持MySQL 5.7  和 8.0
  • 非植入式,对MySQL 只读,不在数据库内创建任何对象
  • 资源占用极低,内存使用在50MB左右,CPU占用率极低
  • 无需外网访问权限,纯本地程序,不上传任何数据到任何服务器

 

仅需以下权限:

 

grant select on performance_schema.* to $USERNAME;
grant select,execute on sys.* to $USERNAME;
grant process on *.* to $USERNAME;
flush privileges;

 

 

 

DBRECOVER for MySQL 在Linux 7上启动失败问题:Graphics Device initialization failed for : es2, sw

症状为使用mobaxterm 登录操作系统后,DBRECOVER for MySQL 在Linux 7上启动失败,GUI无法启动,日志报错为:

 

[root@ora7 dbrecover-for-mysql-2006]# less dbrecover-for-mysql.log.txt
 


Graphics Device initialization failed for :  es2, sw
Error initializing QuantumRenderer: no suitable pipeline found
java.lang.RuntimeException: java.lang.RuntimeException: Error initializing QuantumRenderer: no suitable pipeline found
        at com.sun.javafx.tk.quantum.QuantumRenderer.getInstance(QuantumRenderer.java:280)
        at com.sun.javafx.tk.quantum.QuantumToolkit.init(QuantumToolkit.java:221)
        at com.sun.javafx.tk.Toolkit.getToolkit(Toolkit.java:248)
        at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:209)
        at com.sun.javafx.application.LauncherImpl.startToolkit(LauncherImpl.java:675)
        at com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(LauncherImpl.java:337)
        at com.sun.javafx.application.LauncherImpl.launchApplication(LauncherImpl.java:328)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at sun.launcher.LauncherHelper$FXHelper.main(LauncherHelper.java:767)
Caused by: java.lang.RuntimeException: Error initializing QuantumRenderer: no suitable pipeline found
        at com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.init(QuantumRenderer.java:94)
        at com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(QuantumRenderer.java:124)
        at java.lang.Thread.run(Thread.java:748)
Exception in thread "main" java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at sun.launcher.LauncherHelper$FXHelper.main(LauncherHelper.java:767)
Caused by: java.lang.RuntimeException: No toolkit found
        at com.sun.javafx.tk.Toolkit.getToolkit(Toolkit.java:260)
        at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:209)
        at com.sun.javafx.application.LauncherImpl.startToolkit(LauncherImpl.java:675)
        at com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(LauncherImpl.java:337)
        at com.sun.javafx.application.LauncherImpl.launchApplication(LauncherImpl.java:328)
        ... 5 more


这是因为gtk 2没有安装导致的;虽然没装gtk2,但是可以启动xclock。

解决方法为,安装gtk2和libXtst.x86_64:

yum install gtk2 libXtst.x86_64 xclock  xorg-x11-xauth.x86_64 unzip



Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: mirrors.aliyun.com
 * extras: mirrors.aliyun.com
 * updates: mirrors.aliyun.com
base                                                                                                                                                                                             | 3.6 kB  00:00:00
extras                                                                                                                                                                                           | 2.9 kB  00:00:00
updates                                                                                                                                                                                          | 2.9 kB  00:00:00
(1/2): extras/7/x86_64/primary_db                                                                                                                                                                | 205 kB  00:00:00
(2/2): updates/7/x86_64/primary_db                                                                                                                                                               | 3.0 MB  00:00:00
Resolving Dependencies
--> Running transaction check
---> Package gtk2.x86_64 0:2.24.31-1.el7 will be installed
--> Finished Dependency Resolution


沪ICP备14014813号-2

沪公网安备 31010802001379号