Windows下安装Oracle Database 12c Release 1(12.1.0.2.0) - Enterprise Edition

Windows下安装Oracle Database 12c Release 1(12.1.0.2.0)

最近因需要在Oracle 数据库上建立ODI的资料档案库,需要安装Oracle Database 12c Release 1(12.1.0.2.0) - Enterprise Edition 。

软件下载

http://www.oracle.com/technetwork/database/enterprise-edition/downloads/index.html?ssSourceSiteId=ocomen

安装过程

clip_image001[4]

软件更新配置,跳过:

clip_image002[4]

选择安装方式,安装并配置一个数据库实例

clip_image003[4]

选择系统类型,桌面类

 clip_image004[4]

指定Windows用户

clip_image005[4]

典型安装:配置安装路径、存储器类型、全局数据库名和数据库密码、容器数据库名称clip_image006[4]

先决条件检查

clip_image007[4]

安装概要

clip_image008[4]

开始安装

clip_image009[4]

安装过程中创建数据库

clip_image010[4]

指定口令

clip_image011[4]

安装完成

clip_image012[4]

安装完成,可通过https://localhost:5500/em登入Enterprise Manager,查看数据库和实例的信息。如下端示:

clip_image013[5]

ORA-01219可插入数据库未打开

安装完成后,用navicat测试连接orcl成功

测试pdborcl失败

image

image

参考文章http://www.xifenfei.com/4432.html,解决办法如下

image

设置Oracle 12c pdb自动启动

CREATE TRIGGER open_all_pdbs AFTER STARTUP ON DATABASE
BEGIN
    EXECUTE IMMEDIATE 'alter pluggable database all open' ;
END open_all_pdbs ;

 

tnsnames.ora

此时tnsnames.ora内容

# tnsnames.ora Network Configuration File: C:\app\ORACLE\product\12.1.0\dbhome_1\network\admin\tnsnames.ora
# Generated by Oracle configuration tools.

LISTENER_ORCL =
  (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))


ORACLR_CONNECTION_DATA =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
    )
    (CONNECT_DATA =
      (SID = CLRExtProc)
      (PRESENTATION = RO)
    )
  )

ORCL =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = orcl)
    )
  )

2015-04-05_230346

可以把pdborcl的也添加进tnsnames.ora

# tnsnames.ora Network Configuration File: C:\app\ORACLE\product\12.1.0\dbhome_1\network\admin\tnsnames.ora
# Generated by Oracle configuration tools.

LISTENER_ORCL =
  (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))


ORACLR_CONNECTION_DATA =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
    )
    (CONNECT_DATA =
      (SID = CLRExtProc)
      (PRESENTATION = RO)
    )
  )

ORCL =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = orcl)
    )
  )
  
PDBORCL =

    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
      (CONNECT_DATA =
        (SERVER = DEDICATED)
        (SERVICE_NAME = pdborcl)
      )

  )

tnsping命令测试、连接就都能成功了

image

也可以不在tnsnames.ora中添加pdborcl,通过登陆了cdb后

alter session set container=pdborcl

image

posted on 2015-04-05 23:29  小强斋太  阅读(10626)  评论(0编辑  收藏  举报

导航