- 博客(38)
- 收藏
- 关注
原创 记一次二进制方式安装MySQL 5.7
OS:CentOS release 6.9 x64DB:MySQL 5.7.25添加mysql用户groupadd mysqluseradd -r -g mysql -s /bin/false mysql创建路径mkdir /data/mysql/{data,log/{binlog,slow,relaylog},startsql} -ptouch /data/mysql/log/mysql_error.logmkdir /var/lib/mysql安装MyS.
2021-02-10 13:54:59
221
1
原创 MySQL8 安装(基于devtoolset-8)
环境:系统:CentOS 7.6MySQL: 8.0.16注意:MySQL 8.0.16安装基于gcc 5.3.0以上版本,而CentOS 7.6的gcc版本为4.8.5,本次安装时基于devtoolset-8Centos默认安装mariadb,需要先卸载:[root@wxlun2206 mysql]# rpm -aq|grep mariadbmariadb-l...
2019-06-06 10:23:57
1695
2
原创 sysbench 1.1.0安装
下载安装:下载地址:https://github.com/akopytov/sysbenchyum -y install make automake libtool pkgconfig libaio-devel mariadb-devel openssl-develunzip sysbench-master.zipcd sysbench-master./autogen.sh./c...
2019-06-05 17:49:59
2797
原创 impdp遭遇ORA-39029、ORA-31671、ORA-06512
[oracle@rac1 ~]$ impdp \'/ as sysdba \' directory=expdp dumpfile=wxlun0402.dmp logfile=wxlun0402.impdplog REMAP_TABLESPACE=wxlun:wxlun_DATA REMAP_SCHEMA=wxlun:wxlun0402Import: Release 11.2.0.3.
2015-04-02 16:57:47
4659
原创 rac重启遭遇ORA-01078、ORA-01565、ORA-17503、ORA-12547
今天测试环境服务器重启导致一个节点集群无法重启,遭遇ORA-12547错误,具体如下:服务器重启后,rac1集群无法启动,rac2正常启动:[root@rac1 ~]# ps -ef|grep oragrid 3975 1 0 16:42 ? 00:00:00 /u01/grid11g/bin/oraagent.binroot 399
2014-12-16 18:45:00
2387
原创 impdp遭遇ORA-39001、ORA-39000,ORA-39142
expdp/impdp由于源数据版本高于目标数据库版本,遭遇ORA-39001、ORA-39000,ORA-39142,解决只需要expdp导出时加上目标数据的version,具体问题及解决如下:导入报错:[oracle@orcle02 ~]$ impdp scott/tiger directory=expdp dumpfile=wxlun1212.dmp logfile=wxl
2014-12-12 13:30:01
34318
原创 解决oracle 11g安装导致数据库无法自动搜集统计信息
近期发现个别数据库无法自动收集统计信息,部分视图查询结果如下:SQL> select client_name,status from dba_autotask_client where client_name = 'auto optimizer stats collection'; CLIENT_NAME
2014-12-01 10:39:36
1127
原创 关于创建主键和索引的关系一个小小测试
创建主键时,所对应的列如果没有索引,数据库默认会自动创建一个索引;如果对于列有索引,那么创建主键不会再创建索引。这里要注意,列值必须满足主键的要求(唯一,非空),简单测试如下:SQL> create table wxlun_pri(a number);Table created.SQL> alter table wxlun_pri add constraint PR
2014-05-29 14:45:34
1108
原创 11G重建scott
oracle提供了scott用户的重建脚本,11G利用脚本创建scott简单操作如下:SQL> select * from dba_users where username='SCOTT'; ------之前已手动删除scottno rows selectedSQL> exitDisconnected from Oracle Database 11g
2014-03-24 10:46:56
980
原创 测试join using遭遇ORA-25154
SQL> create table aa(a number,b number);Table created.SQL> create table bb(b number,c number);Table created.SQL> insert into aa values(1,2);1 row created.SQL> insert into aa va
2014-03-11 16:54:20
1632
原创 11g active data guard实现备库rman备份
11g active data guard实现备库rman备份,这样可以在不影响主库对外服务的情况下,实现数据库的备份。测试如下:SQL> select OPEN_MODE,PROTECTION_MODE,PROTECTION_LEVEL,DATABASE_ROLE from v$database;OPEN_MODE PROTECTION_MODE PR
2014-03-04 17:05:23
1456
转载 for嵌套循环和标号
pl/sql嵌套循环是指一个循环语句之中嵌套另一个循环语句,而标号则表示用于标记嵌套块或者嵌套循环。通过在嵌套循环中使用标号,可以区分内层循环和外层循环,并且可以在内层循环中直接退出外层循环。在编写pl/sql块时,可以使用>定义标签,示例如下:SQL> declare 2 result int; 3 begin 4 > 5 for i i
2014-02-18 15:11:01
1670
原创 pl/sql关于赋值的小小注意
在sqlplus执行下列的pl/sql语句,declare v_comm emp.comm%type;begin select comm into v_comm from emp where empno = &&no; if v_comm update emp set comm = comm + 100 where empno = &no; else
2014-02-18 10:12:37
1008
原创 第一个pl/sql,打印Hello,everyone
SQL> set serveroutput onSQL> begin 2 dbms_output.put_line('Hello,pl/sql'); 3 end; 4 /Hello,pl/sqlPL/SQL procedure successfully completed.SQL> 注意:当使用dbms_output包输出数据或消息
2014-02-10 10:00:29
872
原创 确定是否安装IIS服务
控制面板—> 性能与维护->管理工具 无 Internet 信息服务运行里面输入Inetmgr回车弹出: 确定未安装IIS,安装IIS(省略):控制面板—> 性能与维护->管理工具有Internet 信息服务运行里面输入Inetmgr回车弹出: IIS安装成功
2013-12-16 22:21:21
1021
原创 rebuild 索引遭遇ORA-02243
rebuild index 是,rebuild要紧跟索引名后面,在其他选项前面,否则会报错:SQL> alter index IND_ABC rebuild;Index altered.SQL> alter index IND_ABC online rebuild;alter index IND_ABC online rebuild
2013-12-12 16:53:13
3510
原创 11gR2修改index状态为unusable,则删除index的segment
11gR2修改index状态为unusable,则相应的segment将会被删除,测试如需:SQL> create table MY_OBJECTS as select * from dba_objects;Table created.SQL> create index ind_object_id on my_objects(object_id);Index creat
2013-12-10 17:25:51
1452
翻译 Using Flashback Drop and Managing the Recycle Bin
Using Flashback Drop and Managing the Recycle Bin使用闪回删除和管理回收站When you drop a table, the database does not immediately remove the space associated with the table. The database renames the table
2013-12-06 16:49:08
1046
原创 Error accessing PRODUCT_USER_PROFILE
$sqlplus / as sysdbaSQL*Plus: Release 11.2.0.3.0 Production on Thu Dec 5 14:33:44 2013Copyright (c) 1982, 2011, Oracle. All rights reserved.Connected to:Oracle Database 11g Enterprise
2013-12-05 14:51:15
1529
原创 oracle实现对表dml错误记录日志
DBMS_ERRLOG提供了一个存储过程CREATE_ERROR_LOG,这个存储过程创建一个错误日志表,当DML出错时,操作不会终止和回滚,而是将相关的错误写到错误日志表中。 CREATE_ERROR_LOG不支持一些数据类型:LONG, CLOB,BLOB,BFILE, and ADT。 简单示例:SQL> create unique index ind
2013-12-05 11:12:24
1269
翻译 oracle 选择数据块大小
选择数据块大小A block size of 8 KB is optimal for most systems.However, OLTP systems occasionally use smaller block sizes and DSSsystems occasionally use larger block sizes. This section discussesconsidera
2013-12-05 11:10:19
2035
原创 oracle dual表
dual表是一个小表,属于sys但是可以被所有用户使用。用户编写的程序可以引用来保证一个已知的结果。当一个值仅仅返回一次,dual表非常有用,例如,查询当前的日期和时间。 dual表只有一列和一行数据,数据为"X",如下:SQL> desc dual Name Null? Type ----------
2013-12-05 11:08:48
1114
原创 /var/tmp/目录无.oracle导致listener启动失败
在测试设备上,原先错误操作,对/var/tmp/目录的权限做过修改,今天在这个测试设备上恢复启动一个oracle数据库,启动监听时报错: [oracle@localhost admin]$ lsnrctl start LSNRCTLfor Linux: Version 10.2.0.2.0 - Production on 04-JAN-201210:10:11 Copy
2013-12-04 15:51:45
1649
原创 linux shell改为英文显示
#vi /etc/sysconfig/i18n将ANG="zh_CN.UTF-8"SYSFONT="latarcyrheb-sun16"改为LANG="en_US.UTF-8"SYSFONT="latarcyrheb-sun16"2.#source /etc/sysconfig/i18n3.exit后重新登录4.检测# chkconfig --l
2013-12-04 15:48:55
4768
原创 ORA-00600: internal error code, arguments: [opifal.1]
oracle版本:10.2.0.2 并做已做data guard操作系统:linux rhat 5.6 x64最近在主库oracle alert日志发现,最近半个月,几乎每天都会产生一次ora 600错误,如下:Errors in file/oracle/admin/hycrm/bdump/hycrm_s000_27823.trc:ORA-00600: internal e
2013-12-04 09:06:51
1243
原创 删除分区表所在表空间遇到ora-14401错误
数据库:oracle11.2.0.3删除分区表所在表空间遇到ora14401错误: SYS@vimop01_b>drop tablespaceUSER_TS_MONI_11B including contents and datafiles;drop tablespace USER_TS_MONI_11B including contents anddatafiles*
2013-12-04 09:05:06
1522
原创 varchar2转化nvarchar2类型乱码
开发人员有个需求,需将一个字符串,转成nvarchar2类型。但是测试是乱码,例句如下:SQL> select(selectutl_raw.cast_to_nvarchar2(utl_raw.cast_to_raw('i am nvarchar2string')) from dual) from dual;(SELECTUTL_RAW.CAST_TO_NVARCHAR2(UTL_R
2013-12-03 17:00:50
5708
翻译 Shrinking a Locally Managed Temporary Tablespace
Shrinking a Locally Managed Temporary Tablespace Large sortoperations performed by the database may result in a temporarytablespace growing and occupying a considerable amount of diskspace. A
2013-12-03 16:58:17
761
转载 可能导致index unusable的维护操作
Six types of maintenance operationscan mark index partitions INDEX UNUSABLE.In all cases, you must rebuild the index partitions when theoperation iscomplete. 1) Operations like Import Parti
2013-12-03 16:56:19
1408
翻译 oracle终止session
有时候,oracle终止当前的session是必要的。例如,你想执行一个管理操作,需要终止所有非管理员的session。下面描述的是终止session的各个方面,包括以下: 1.标识哪些session需要终止 2.终止一个Active Session 3.终止一个Inactive Session 当一个session被终止,session的任何活动事务
2013-12-03 16:54:48
2990
翻译 Row Chaining and Row Migration
Row Chaining and Row Migration行链接和行迁移Introduction------------介绍This article discusses the difference between row chaining andmigration.Guidelines are given on how to detect and resolve
2013-12-03 16:37:40
900
原创 oracle 11gR2 创建无数据对象临时不分配segment
做实验发现oracle11gR2,创建无数据的table、index等对象,oracle为了节省空间,开始并不分配segment,而是等有dml操作时才会分配segment,即使dml回滚,分配的segment并不回收。简单实验如下:SQL> create table test(a number);Table created.SQL> create index ind_test
2013-12-03 10:32:47
858
原创 导入数据IMP-00058 ORA-00904
将源库分区表数据迁移到历史库中碰到IMP-00058 ORA-00904错误,具体操作及解决如下:$imp \'/ as sysdba\' STATISTICS=NONEDATA_ONLY=y file=/backup/wxlun20130911.dmplog=/backup/wxlun20130911.implog fromuser=wxlun touser=wxlun_his
2013-11-29 14:58:40
2827
原创 创建分区位图索引测试
先创建一个分区表,如下:SQL> create table test_part_index 2 ( 3 id NUMBER, 4 time DATE not null 5 ) 6 partition by range(TIME) 7 ( 8 partitionPT_201
2013-11-29 14:56:45
1892
原创 Oracle确定过期的统计信息
Youmust regularly gather statistics on database objects as thesedatabase objects are modified over time. To determine whether agiven database object needs new database statistics, OracleDatabase provi
2013-11-29 14:52:41
1634
原创 ORA-01536: space quota exceeded for tablespace
问题:ORA-01536: space quota exceeded for tablespace 'HOME-A'解决方法:alter user 你的用户名 quota unlimited on 你建表的表空间的名字;例如:alter user HOME_A quota unlimited on "HOME-A";
2013-11-29 14:29:49
982
原创 Pending Statistics
Oracle11.2开始,可以使用下面方式搜集统计信息: 1、搜集统计信息完成后,自动发布(默认方式PUBLISH) 2、保存新的统计信息,并且待定发布 以待定方式保存新的统计信息,允许你检验新的统计信息,如果统计信息满足需求,再将其发布。 为了检查统计信息搜集完成后是否自动发布,使用DBMS_STATS,如下: SQL> SELECT DBMS_STA
2013-11-29 14:27:29
717
原创 goldengate针对目的端数据库启停的操作
针对目的端数据库数据文件换盘操作,goldengate操作如下:GGSCI (mktdb1) 1> info allProgram Status Group Lag Time Since ChkptMANAGER RUNNING
2013-11-29 11:43:36
1085
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人