Oracle 11.2.0.4 expdp sample 应用一例
expdp sample 应用一列DBA在日常维护中,数据迁移也是基本功。新业务上线仅需要表结构和少数数据时。可以使用expdp sample参数实现按比例导出数据。1.未使用sample导出数据[oracle@dbdou01 ~]$ expdp system/oracle directory=dump dumpfile=user.dmp logfile=user.log schemas=scottExport: Release 11.2.0...
mysql主从复制(冷备)
mysql主从复制(冷备)1.create repl user on mastergrant replication slave on *.* to 'repl'@'10.124.110.116' identified by 'doudou123';root@(none) 10:13>grant replication slave on *.* to 'repl'@'10.124.110.116' identified by 'doudou123';Query OK, 0 rows affected (0.04 s...
高效的SQL(函数索引优化VIEW一例)
高效的SQL(函数索引优化VIEW一例)业务人员反映系统执行超级慢,查看系统资源发现CPU负载已经接近100%。挑战的CASE来了,十分激动。哈哈哈。1.遇到性能问题先分析系统资源,发现CPU负载持续100%左右。11.2.0.4 2 nodes RAC架构,每个节点CPU负载都很高System: bmcdb1 &nbs...
Oracle 优化之SQL(清晰的逻辑重构业务SQL)
高效的SQL(清晰的逻辑重构业务SQL) 业务SQL如下select to_char(t.entertime, 'yyyymmdd') AS time, t.userid, --振铃通话时间 sum(ROUND(TO_NUMBER(t.turnontime - t.ringtime) * 24 * 60 * 60)) AS t_ring, &...
Mysql 5.6 multi instances configuration on redhat 6.2
1.create mysql user/usr/sbin/groupadd -g 601 mysql/usr/sbin/useradd -u 701 -g mysql mysql2.create data directory and permissions and attributesmkdir -p /mysql/data/3307/{data,binlog,tmp}mkdir -p /mysql/data/3308/{data,binlog,tmp}mkdir -p /mysql/data/3309/{data,binlog,tmp}chmod 755...
Oracle 优化之存储过程方法(DBMS_HPROF)
今天介绍推荐一个11g以后优化存储过程的利器“DBMS_HPROF”,官方推荐11g以上可以使用DBMS_HPROF来分析优化存储过程。具体使用方法如下。数据库版本(11.2.0.4.0)1.Unlock ScottSQL> conn /assysdbaConnected.SQL> alter userscott account unlock; User altered. SQL> alter...
Oracle 高可用 RAC保证24*7安全稳定运行秘籍之一(IO闪断解决办法)
保证RAC 24*7安全稳定运行秘籍之一(IO闪断解决办法)多年运维生涯当中,闪断无疑是最让我头疼的问题。闪断问题多数只能“事后诸葛”。闪断问题处理思路:1.使用合理的工具收集有效信息进而分析闪断问题。比如涉及ORACLE数据库的推荐使用OSwatch。2.如果无法使用合里的工具收集有效的错误信息,这时你的重点应该转...
EMC ALUA链路优先级与链路切换ON LINUX
EMC ALUA链路优先级与链路切换ON LINUXEMC ALUA模式下如何查看链路优先级powermt display dev=emcpowerd alua every=10Pseudo name=emcpowerdVNX ID=FCN00114900102 [BMW_SG]Logical device ID=6006016045D02E00768AB91AA37EE411 [bmw_ocr1]state=alive; policy=CLAROpt; queued-IOs=0Owner: default=SP A, curren...
Oracle 高可用 RAC 传统中小企业双活构架图(oracle)
传统中小企业双活构架图(oracle)1.网络: F5 无缝分配请求给多台APP SERVER2.数据库 :RAC 故障转移,提高安全运行率3.构架性能优化: ADG读写分离,及数据T+1对比校验4.灾备 :DG,定期演练保证恢复能力、效率5.备份 :DDT架构保证备份并行度与历史数据归档,异地保留#######################################...
MySQL架构优化之字符集
MySQL架构优化之字符集MySQL应用于大中小企业当中,字符集标准化也是MySQL架构优化中重要的一部分。通常建议中英文混合环境建议选择utf8字符集。1.操作系统Linuxcat /etc/sysconfig/i18n => LANG="en_US.UTF-8"2.MySQL客户端cat /etc/my.cnf => [client] default-character-set=utf83.MySQL服务端cat /etc...
Install MySQL(5.6.29) using RPM
Install MySQL(5.6.29) using RPM1.check mysql is whether installedrpm -qa | grep -i mysql2.forced remove mysql old rpm rpm -e mysql --nodeps3.create mysql data directorymkdir -p /mysql/data/3307/4.create my.cnf filevi /etc/my.cnf[client]#password = y...
AUTO_INCREMENT ON the MyISAM STORAGE ENGINE
AUTO_INCREMENT ON the MyISAM STORAGE ENGINECASE:HOW TO TUNNING AUTO_INCREMENT ON THE MyIS STORAGE ENGINESOLVE:1.AUTO_INCREMENT column is a multiple-column index and order by last column of a multiple-column index.2.AUTO_INCREMENT column is one key faster in engine myisam than engine innodb...
Using AUTO_INCREMENT CASE
Using AUTO_INCREMENT CASEAUTO_INCREMENT CASE EXPLAINhttp://dev.mysql.com/doc/refman/5.6/en/example-auto-increment.html 1.create case table and insert into datamysql> CREATE TABLE animals ( -> id MEDIUMINT NOT NULL AUTO_INCREMENT, -> ...
HOW TO SOLVE ERROR 1062 (23000) ?
HOW TO SOLVE ERROR 1062 (23000) ?CAUSEa)ERROR 1062 (23000): Duplicate entry '0' for key 'PRIMARY'b)ERROR 1062 (23000): ALTER TABLE causes auto_increment resequencing, resulting in duplicate entry '1' for key 'PRIMARY'SOLUTIONa)ALTER TABLE `animals` CHANGE `id` `id` MEDIUMINT UNSIGNED auto_i...
MyISAM Table Storage Formats
MyISAM Table Storage Formats本文主要了解 Static (Fixed-Length) TABLE 和 Dynamic Table 以及对空格的处理。http://dev.mysql.com/doc/refman/5.7/en/myisam-table-formats.html1.创建和更改 MyISAM Table Storage Formats 语法## table has no BLOB or TEXT ##Create Table EngineCreate Table table_name ...
MYSQLDUMP TABLE IN SQL FORMAT
MYSQLDUMP TABLE1.What is mysqldump ?mysqldump is a sql based dump, data is dumped then loaded and all indexes are recreated. During mysqldump, all the tables would be locked and will not be accessible for queries.2.Create test table doudou01 and doudou02mysql> select * from doudou01;+----+...
MYSQL TABLE CHANGE STORAGE ENGINE
MYSQL TABLE CHANGE STORAGE ENGINE1.create table and set storage engineCREATE TABLE `doudou01` ( `i` bigint(20) NOT NULL AUTO_INCREMENT, PRIMARY KEY (`i`)) ENGINE=MyISAM DEFAULT CHARSET=gbk;## default storage engine is innodb## check table statusmysql> show table status like 'do...
Install mysql(5.6) for Using the MySQL Yum Repository
Install mysql(5.6) for Using the MySQL Yum Repository 1.System Environmental[root@dbdou02 doc]# uname -aLinux dbdou02 2.6.32-220.el6.x86_64 #1 SMP Wed Nov 9 08:03:13 EST 2011 x86_64 x86_64 x86_64 GNU/Linux2.Download MySQL YUM and installing MySQL2.1 Download MySQL YUM Reposit...
How to Reset the MySQL Root Password
How to Reset the MySQL Root Passwordhttp://dev.mysql.com/doc/refman/5.6/en/resetting-permissions.htmlcat /etc/my.conf...[mysqld]##add parameter##skip-grant-tables
dbdao老郭的11g ocm 新年献礼(2016年)
本人来至转载 dbdao老郭的11g ocm 新年献礼:11g ocm 相关博文:数据库恢复的配置 http://t.dbdao.com/archives/11g-ocm-student-guide-backup-restore.html配置备份的规范 http://t.dbdao.com/archives/dbdao-11g-oracle-ocm-2.html使用RMAN创建备份 http://t.dbdao.com/archives...