随笔分类 -  database

数据库
只有注册用户登录后才能阅读该文。
posted @ 2017-07-10 10:37 Earic 编辑
只有注册用户登录后才能阅读该文。
posted @ 2017-07-10 09:45 Earic 编辑
只有注册用户登录后才能阅读该文。
posted @ 2017-06-27 11:38 Earic 编辑
只有注册用户登录后才能阅读该文。
posted @ 2017-06-18 22:03 Earic 编辑
只有注册用户登录后才能阅读该文。
posted @ 2017-06-18 16:50 Earic 编辑
只有注册用户登录后才能阅读该文。
posted @ 2017-06-08 07:38 Earic 编辑
摘要:SQL中的连接可以分为内连接,外连接,以及交叉连接 。 1. 交叉连接CROSS JOIN 如果不带WHERE条件子句,它将会返回被连接的两个表的笛卡尔积,返回结果的行数等于两个表行数的乘积; 举例,下列A、B、C 执行结果相同,但是效率不一样: A:SELECT * FROM table1 CRO 阅读全文
posted @ 2017-06-06 21:26 Earic 编辑
摘要:1.查看一个表所占的空间大小:SELECT bytes/1024/1024 ||'MB' TABLE_SIZE ,u.* FROM USER_SEGMENTS U WHERE U.SEGMENT_NAME='JK_TEST';2.查看一个表空间所占的实际大小:SELECT SUM(BYTES) / 阅读全文
posted @ 2017-05-30 18:32 Earic 编辑
摘要:时间范围分区拆分create table emp (id number(6) not null,hire_date date not null)partition by range(hire_date)(partition p_1998 values less than (to_date('1998 阅读全文
posted @ 2017-05-30 18:31 Earic 编辑
只有注册用户登录后才能阅读该文。
posted @ 2017-05-26 10:30 Earic 编辑
摘要:1. IMPORT PARTITION or conventional path SQL*Loader. 2. Direct-path SQL*Loader leaves affected local index partitions and global indexes in an IU stat 阅读全文
posted @ 2017-04-28 07:54 Earic 编辑
摘要:环境为:Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production 对象表为按天的自动分区表: PARTITION BY RANGE ("START_TIME") INTERVAL (NUMTODSINTE 阅读全文
posted @ 2017-03-31 18:27 Earic 编辑
摘要:建立完分区表后一定要和开发确认一点,就是是否会修改分区字段。因为update分区字段到其他分区时候,会报错。解决办法:开启表的行转移功能 这样在update以后,会在老分区删除数据,新分区插入数据。 阅读全文
posted @ 2017-03-31 18:26 Earic 编辑
摘要:一、时间date类型:create table spdb_demo(outBeginDate date,)partition by range(outBeginDate) interval(numtodsinterval(1,'day'))( partition PART1 values less 阅读全文
posted @ 2017-03-30 09:15 Earic 编辑
摘要:numtodsinterval(<x>,<c>) ,x是一个数字,c是一个字符串常用的单位有 ('day','hour','minute','second')exampleSQL> select sysdate,sysdate+numtodsinterval(3,'hour') as res fro 阅读全文
posted @ 2017-03-29 19:38 Earic 编辑
摘要:export ORACLE_BASE=/u01/app/oracle export ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1 su - root ln -s $ORACLE_HOME/bin/sqlplus /usr/bin su - oracle sqlplus /nolog 阅读全文
posted @ 2017-03-14 15:00 Earic 编辑
摘要:1、 登录数据库服务器2、 查看当前数据的实例$ps -ef|grep smonoracle 8747 1 0 14:38 ? 00:00:00 ora_smon_spsj ==spsj则当前库的实例是spsj sqlplus "/as sysdba"3、 确认使用的schema,即登录数据库的用户 阅读全文
posted @ 2017-02-15 21:50 Earic 编辑
摘要:这个时候我们只需要flush privileges 一下就OK了,mysql> flush privileges;Query OK, 0 rows affected (0.01 sec) 阅读全文
posted @ 2016-10-11 20:41 Earic 编辑
摘要:unix:$ORACLE_HOME/dbsnt:c:\Oracle\ora81\database create spfile from pfile = '/home/oracle/initora11g.ora'; !echo '*.memory_target=1024m' >>'/home/orac 阅读全文
posted @ 2016-10-07 13:49 Earic 编辑
摘要:方案一: 1、打开cmd; 2、输入命令:net stop +MySQL的服务名,停止MySQL服务,如果未启动MySQL服务则可跳过该步骤; 3、输入命令:mysqld --remove卸载MySQL服务,如果未安装MySQL服务则可跳过该步骤; 4、 打开mysql\bin\my.ini,查找[mysqld],在[mysqld]下面添加一行文字,skip-grant-tables 即组成 [... 阅读全文
posted @ 2016-09-07 14:52 Earic 编辑