Chinaunix首页 | 论坛 | 博客
  • 博客访问: 219083
  • 博文数量: 119
  • 博客积分: 10
  • 博客等级: 民兵
  • 技术积分: 1261
  • 用 户 组: 普通用户
  • 注册时间: 2012-05-23 17:50
文章分类

全部博文(119)

文章存档

2016年(8)

2015年(78)

2014年(33)

我的朋友

分类: Oracle

2014-12-05 18:10:52

 CREATE TABLE products01
  (id NUMBER,
   description VARCHAR2 (60))
  PARTITION BY range (id)
 ( partition partition_01 values less than (1000) tablespace DATA,
   partition partition_02 values less than (2000) tablespace DATA);
  
 ORA-00439: feature not enabled: Partitioning

###无法创建分区表 , 因为分区功能没有启动( 可能是因为商业版本或license的区别,一般都会默认启用)
select * from v$option where parameter = 'Partitioning';
 PARAMETER        VALUE
 ----------------------------------------------------------------
 Partitioning                        FALSE


 ### 在网上找到了一个解决方法 ,(注意这里由于安装目录权限的问题,最终用了root 用户来执行 , 命令执行成功)
# /optware/oracle/11.2.0.4/db_1/bin/chopt  enable partitioning

Writing to /optware/oracle/11.2.0.4/db_1/install/enable_partitioning.log...
 /usr/bin/make -f /optware/oracle/11.2.0.4/db_1/rdbms/lib/ins_rdbms.mk part_on ORACLE_HOME=/optware/oracle/11.2.0.4/db_1
 /usr/bin/make -f /optware/oracle/11.2.0.4/db_1/rdbms/lib/ins_rdbms.mk ioracle ORACLE_HOME=/optware/oracle/11.2.0.4/db_1

[hostname: ~]

####或者单独执行下面几个命令
- Shutdown all databases that use this ORACLE_HOME
 - Run the following

$ cd $ORACLE_HOME/rdbms/lib
 $ make -f ins_rdbms.mk part_on
 $ make -f ins_rdbms.mk ioracle

 

###问题就来了,准备启动db时,却一直报 ORA-12547: TNS:lost contact 
 $ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.4.0 Production on Fri Dec 5 04:32:57 2014

Copyright (c) 1982, 2013, Oracle.  All rights reserved.

ERROR:
 ORA-12547: TNS:lost contact


 [hostname: ~]


  
 ##### $ORACLE_HOME/bin 目录下看到两个一样大小的文件  oracle and oracle0
 ##### 该执行文件权限应该是 6751 (chmod 6751 $ORACLE_HOME/bin/oracle)
# pwd
 /optware/oracle/11.2.0.4/db_1/bin
 [hostname: /optware/oracle/11.2.0.4/db_1/bin]
 #

-rwxr-xr-x 1 root   root      1248 Oct 29 18:54 GrantScripts.sql
-rwsr-s--x 1 oracle  dba  228335347 Dec  5 04:20 oracleO
-rwxr-x--x 1 root    root  228335347 Dec  5 04:21 oracle

### 正是由于我用了root用户操作导致了 ,权限出现了问题,而且 root用户是备份原文件oracle到 oracle0 , 然后复制一份供使用。
### 经过分析,决定把oralce0 重命名回去 , 问题得以解决。

[hostname: /optware/oracle/11.2.0.4/db_1/bin]
 # mv oracle oracle.bak
 [hostname: /optware/oracle/11.2.0.4/db_1/bin]
 # mv  oracleO oracle
 [hostname: /optware/oracle/11.2.0.4/db_1/bin]
 # mv oracle.bak oracleO
 [hostname: /optware/oracle/11.2.0.4/db_1/bin]
 # ls -lrt

 

 

阅读(3056) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~