蓝皮书的自留地

运筹帷幄,决胜千里

[toc]

ORACLE11g RAC 修改public IP 步骤

备份

1
2
3
cd /u01/app/11.2.0/grid/bin
./ocrconfig -showbackup
./ocrconfig -manualbackup

修改前的IP信息

1
2
3
4
5
6
7
8
9
10
11
12
# PUBLIC HOSTNAMES---公网IP
10.8.8.23 orcb1
10.8.8.24 orcb2
# PRIVATE HOSTNAMES-----心跳IP
10.10.10.1 orcb1-priv
10.10.10.2 orcb2-priv
# VIP HOSTNAMES----VIP 地址
10.8.8.25 orcb1-vip
10.8.8.26 orcb2-vip
# Below are SCAN IP addresses for reference.
# SCAN_IP
10.8.8.21 scan

修改后的IP 信息

1
2
3
4
5
6
7
8
9
10
11
12
# PUBLIC HOSTNAMES---公网IP
10.8.8.123 orcb1
10.8.8.124 orcb2
# PRIVATE HOSTNAMES-----心跳IP
10.10.10.1 orcb1-priv
10.10.10.2 orcb2-priv
# VIP HOSTNAMES----VIP 地址
10.8.8.125 orcb1-vip
10.8.8.126 orcb2-vip
# Below are SCAN IP addresses for reference.
# SCAN_IP
10.8.8.121 scan

停止数据库

1
2
3
4
5
6
7
8
9
10
11
12
cd /u01/app/11.2.0.4/grid/bin
./srvctl stop database -d wforcb

./srvctl stop listener -l LISTENER
./srvctl stop listener -l LISTENER_DG

./srvctl stop scan_listener
./srvctl stop scan


./srvctl stop nodeapps -n orcb1
./srvctl stop nodeapps -n orcb2

修改ip

1
操心系统修改 网卡 ip 地址。

修改vip

1
2
3
4
5
6
7
8
./srvctl config vip -n orcb1
./srvctl modify nodeapps -n orcb -A 10.8.8.123/255.255.255.0/lanxxx
./srvctl config vip -n orcb1


./srvctl config vip -n orcb2
./srvctl modify nodeapps -n orcb2 -A 10.8.8.124/255.255.255.0/lanxxx
./srvctl config vip -n orcb2

scan

1
2
3
./srvctl modify scan -n scan
./srvctl start scan
./srvctl start scan_listener

[TOC]

ORACLE 逻辑迁移步骤

迁移用户

要迁移的用户:CEDE001,ABCDEFG01

数据对象 dba_objects 确认

1
2
3
select count(*) from dba_objects  where owner in ('CEDE001','ABCDEFG01');
select count(object_type),object_type from dba_objects where owner in ('CEDE001','ABCDEFG01') group by object_type;
select owner,object_type,count(*) from dba_objects where owner in ('CEDE001','ABCDEFG01') group by owner,object_type order by 1,2;

检查数据库组件

阅读全文 »

[TOC]


Centos 6.x 搭建 PXC 集群及在线添加节点


By:liups@liups.com

1.环境介绍

1.1操作系统版本

CentOS release 6.8 (Final)

1.2 默认端口

端口

用途

3306

数据库端口

4444

SST 全量传输端口

4567

组内成员通信端口

4568

IST增量传输端口

1.3 主机信息

IP

hostname

用途

base

datadir

192.168.51.101

cet701

pxc01

/usr/local/mysql

/data/mysql

192.168.51.102

cet702

pxc02

/usr/local/mysql

/data/mysql

192.168.51.103

cet703

pxc02

/usr/local/mysql

/data/mysql

2. 软件下载

2.1 关于软件包的说明

Percona provides generic tarballs with all required files and binaries for manual installation.

You can download the appropriate tarball package from https://www.percona.com/downloads/Percona-XtraDB-Cluster-57

There are multiple tarballs in the Linux - Generic section depending on the OpenSSL library available in your distribution:

  • ssl100: for Debian prior to 9 and Ubuntu prior to 14.04 versions
  • ssl101: for CentOS 6 and CentOS 7
  • ssl102: for Debian 9 and Ubuntu versions starting from 14.04

这里的环境是 CentOS7 所以选择 ssl101 的软件包。

阅读全文 »

[toc]

DB version:oracle 12c 12.1.0.2.0

Errors in file /u01/app/oracle/diag/rdbms/tos/LOCDB1/trace/LOCDB1_m001_28575.trc: ORA-12850: Could not allocate slaves on all specified instances: 2 needed, 0 allocated Tue Jan 16 06:12:07 2018

High CPU Usage and/or Frequent Occurrences of ORA-12850 For Monitor Queries by MMON From 12.1 (Doc ID 2102131.1) In this Document Symptoms Changes Cause Solution References APPLIES TO: Oracle Database - Enterprise Edition - Version 12.1.0.1 and later Information in this document applies to any platform. SYMPTOMS MMON consumes more CPU due to the monitoring activity in 12.1 High CPU consumption and time spent while executing monitor-related queries from both MMON_SLAVE like following:

阅读全文 »

在通过mysqldump进行MySQL数据库(innodb引擎)逻辑备份的时候经常使用的参数组合就是 --single-transaction --master-data=2,今天的案例就是来分析下通过--single-transaction --master-data=2参数组合进行单表备份而引发的性能问题。

  • 问题描述:
    某业务系统(数据库采用的MySQL数据库)上午10点左右部分业务业务反应系统缓慢,用户登陆出现超时的现象。
  • 问题分析与处理
    登录数据库服务器查看topiostat –x 1等查看操作系统负载。
    top发现:CPU:load average 超过10且是mysqld进程占用,确定是MySQL等待。
    通过 show processlist查看:发现大量的Waiting for global read lock 。(信息已经脱敏处理)
    阅读全文 »

针对数据泵导出 (expdp) 和导入 (impdp)工具性能降低问题的检查表 (文档 ID 1549185.1)

文档内容

适用于:

Oracle Database - Enterprise Edition - 版本 10.1.0.2 到 12.1.0.2 [发行版 10.1 到 12.1] 本文档所含信息适用于所有平台

用途

本文档提供了有关使用数据泵导入导出工具传输数据时所遇到的性能相关问题的可能原因。

适用范围

本文的目标受众是 Oracle10g 和 Oracle11g 数据库的用户,并且使用 Export Data pump 工具从 Oracle 源数据库中导出数据,并使用 Import Data pump 工具将这些数据导入到 Oracle 目标数据库中。本文档仅适用于新的 Export Data Pump (expdp) 和 Import Data Pump (impdp) 客户端,不适用于原始的导出 (exp) 和导入 (imp) 客户端。对于 Oracle10g 及更高版本,我们建议使用数据泵在 Oracle 数据库之间传输数据。

详细信息

阅读全文 »

ftp等客户端工具都有限制速度的界面,刚查询了下scp也可以限制速度,查看help

$scp –help usage: scp [-1246BCpqrv] [-c cipher] [-F ssh_config] [-i identity_file] [-l limit] [-o ssh_option] [-P port] [-S program] [[user@]host1:]file1 … [[user@]host2:]file2

[root@liups.com]# scp  -l2000 testcp1214.zip  localhost:/tmp/ root@localhost’s password: testcp1214.zip                                                                                          0%  768KB 267.4KB/s   05:54 ETA^CKilled by signal 2. [www@liups.com]# scp  -l20000 testcp1214.zip  localhost:/tmp/ www@localhost’s password: testcp1214.zip                                                                                         18%   17MB   2.4MB/s   00:31 ETA^CKilled by signal 2. [www@liups.com]# scp  testcp1214.zip  localhost:/tmp/ www@localhost’s password: testcp1214.zip                                                                                        100%   93MB  31.1MB/s   00:03 [www@liups.com]#

0%