wukaiqiang 发布的文章

ORACLE 清理监听日志

最近同事离职,原本他负责的这块业务即将下线,所以一直没有空上监控,今天突然发现监听和归档日志快把磁盘撑满了,赶紧把重要的业务都扫一遍。不停库清理监听日志1:首先停止监听服务进程(tnslsnr)记录日志。lsnrctl set log_status off;2:将监听日志文件(listener.log)复制一份,以listener.log.yyyymmdd格式命名cp listener.log listener.log.201912093、将监听日志文件(listener.log)清空。清空文件的方法有很多cat /dev/null > listener.log或echo “” &...

ORACLE 导出excle文件结果

由 wukaiqiang创建, 最后修改于大约1分钟以前MySQL实现Oracle的spool功能Oracle中:sqlplus> Spool C:\temp\table_namessqlplus> select table_name from user_tables;sqlplus> spool off;MySQL中:mysql> tee c:\trash\qwe.txtmysql> show tables;mysql> notee或C:MySQL\MySQL Server\bin>mysql -u root -p --tee=c:\tras...

mysql 主从复制错误

Replica Errors During ReplicationIf a statement produces the same error (identical error code) on both the source and the replica, the error is logged, but replication continues.主从都出现相同的错误,同步继续If a statement produces different errors on the source and the replica, the replication SQL thread termi...

mysql 主从详细介绍

原理:Replication is based on the replication source server keeping track of all changes to its databases (updates, deletes, and so on) in its binary log. The binary log serves as a written record of all events that modify database structure or content (data) from the moment the server was started. ...