当前位置:Gxlcms > mysql > ArcSDE10.2.1在Oracle12c环境的安装

ArcSDE10.2.1在Oracle12c环境的安装

时间:2021-07-01 10:21:17 帮助过:28人阅读

随着Oracle12c的推出,越来越多的Oracle用户都希望能够尽快的使用该版本,感受一下Oracle12c数据库强大的功能。ArcGIS软件也不例外,前一段时间Oracle12c刚推出不久,本博客就发布了怎么在Linux环境下安装Oracle12c,当时ArcGIS10.2版本还没有在中国正式发布

随着Oracle12c的推出,越来越多的Oracle用户都希望能够尽快的使用该版本,感受一下Oracle12c数据库强大的功能。ArcGIS软件也不例外,前一段时间Oracle12c刚推出不久,本博客就发布了怎么在Linux环境下安装Oracle12c,当时ArcGIS10.2版本还没有在中国正式发布,但是美国的Support明确说明,当时ArcGIS10.2还不支持Oracle12c,不过我断定不久可能就会支持,也许ArcGIS10.2发布某个补丁后就支持了。果然没错,在ArcGIS10.2.1版本发布之后,Esri就宣布支持Oracle12c.

关于Oracle12c的安装可以参考:

http://blog.csdn.net/linghe301/article/details/9221665


下面我们看一下ArcSDE10.2 for Oracle的系统需求,看看有什么可以注意的信息:

  • Oracle Linux 5 is compatible with Red Hat Enterprise Linux 5. DBMS support is Oracle 11.2.0.2.0 and up.
  • Oracle Linux 6 is compatible with Red Hat Enterprise Linux 6. DBMS support is Oracle 11.2.0.3.0 and up.
  • Oracle 11g R1 (11.1.0.7) is no longer supported at ArcGIS 10.2.1.
  • Oracle 11g R2 (11.2.0.1) is no longer supported at ArcGIS 10.2.1.
  • Oracle 11g R2 (11.2.0.3) is supported as the base version starting at ArcGIS 10.2.1.
  • Oracle 12c R1 (12.1.0.1) is supported starting at ArcGIS 10.2.1.
  • ArcGIS 10.2.1 is the last supported release for Microsoft Windows Server 2003 and 2003 R2.
  • Windows Server 2012 support begins at ArcGIS 10.2.1

关于这些信息都需要用户在立项时候考虑的,更多参考:

http://resources.arcgis.com/en/help/system-requirements/10.2/index.html#/Oracle_Database_Requirements/01510000006s000000/


注意:以下操作都是在用户使用PDB基础上,鉴于PDB收费,如果用户使用非PDB的Oracle实例,那么在相关操作与Oracle11g版本基本一致。


用户可以不勾选Create as Container database。就不创建PDB了。


介绍一下我安装的环境:

OS:Linux 5.5 Oracle12.1.0.1 IP:192.168.220.203 实例名:orcl

OS:Windows Server 2008,Oracle 11.2.0.2 IntantClient,ArcGIS10.2.1 for Desktop

--------------------------------------------------------------------------------------------

Blog: http://blog.csdn.net/linghe301
Weibo: http://www.weibo.com/linghe301
--------------------------------------------------------------------------------------------


因为目前ArcSDE10.2.1没有Oracle12c的介质软件,所以,直接使用桌面创建地理数据库即可。

确保桌面机器能够正确连接上Oracle12c的服务器端,使用建库工具


该界面与原来的Oracle11g的安装基本一样,点击执行,信息提示报:ora-65096错误

Executing: CreateEnterpriseGeodatabase Oracle 192.168.220.203/orcl # DATABASE_AUTH sys ***** SDE_SCHEMA sde ***** sde C:\Users\Administrator\Desktop\ArcGISforServerAdvancedEnterprise_server.ecp
Start Time: Wed Feb 12 09:17:20 2014
User has privileges required to create database objects.
Tablespace created.
Error creating geodatabase admin user. [ERROR: Failed to create new Oracle user sde  (-51).
 Error: Underlying DBMS error (-51).
Extended error code: (65096)
 ORA-65096: invalid common user or role name

]
Failed to execute (CreateEnterpriseGeodatabase).
Failed at Wed Feb 12 09:17:32 2014 (Elapsed Time: 12.37 seconds)

比较纳闷,在以前版本都没有问题,为什么oracle 12c环境报该错误呢?

翻开Oracle12c的新特性,曾经介绍过有一个多租户的概念


在Oracle Database 12c中,可组装式数据库 - Pluggable Database为云计算而生。在12c以前,Oracle数据库是通过Schema来进行用户模式隔离的,现在,可组装式数据库可以让此前意义上的多个数据库一起共存。
Pluggable Database 其体系结构的核心是:
  由一个容器数据库(CDB)和多个可组装式数据库(PDB)构成,PDB包含独立的系统表空间和SYSAUX表空间等,但是所有PDB共享CDB的控制文件、日志文件和UNDO表空间。各个PDB之间互访需要通过DB Link进行,就仿佛是多个数据库一样。
  在2012 OOW上,Larry重点介绍了Oracle Database 12c 的这个新特性,并将其归结为:多租户数据库。也就是说,在云平台上,不同租户可以在一个大的CDB数据库中运行,而彼此数据(PDB)与应用又完全隔离。显然这个特性对Oracle推出的数据库云平台必不可少。

ORACLE 12C中提出来CDB和PDB的概念,对于ORACLE的数据库来说,确实是一个新东西,他们可以分别理解为容器和插件(PDB插入在CDB中),CDB的管理和传统数据库区别不大,本篇文章对PDB的部分操作进行了简单说明(创建PDB,OPEN PDB,DROP PDB,Plug PDB,Unplugging PDB)

更多了解:

ORACLE 12C PDB部分功能测试

http://www.xifenfei.com/4010.html
ORACLE 12C PDB 维护基础介绍
http://www.xifenfei.com/4432.html
Viewing Information About CDBs and PDBs
http://www.xifenfei.com/4445.html
ORACLE 12C CDB中PDB参数管理机制
http://www.xifenfei.com/4482.html

其实一句话,在原来Oracle12c之前版本的环境下,一个Oracle实例下,就可以创建相关的数据库,这个数据库就是在一个Oracle实例下的全局,该实例共享Oracle的系统文件、控制文件等,那么在Oracle12c环境下,在一个Oracle实例下,有一个全局库,全局库有可以管理可创建的可组装库,那么ArcSDE地理数据库就是一个组装库,问题的原因是用户应该创建Oracle12c的组装库。


你知道吗?
Oracle 12c 数据库的多租户功能将单独收费,售价为 1.75万美元/处理器,而企业版 12c数据库的售价仍为 4.75 万美元/处理器。

--------------------------------------------------------------------------------------------

Blog: http://blog.csdn.net/linghe301
Weibo: http://www.weibo.com/linghe301
--------------------------------------------------------------------------------------------


那么接下来就看一下怎么创建?

查看一下Oracle的监听状态

[oracle@oracle12c ~]$ lsnrctl start

LSNRCTL for Linux: Version 12.1.0.1.0 - Production on 01-JUL-2013 14:12:01

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

Starting /home/oracle/app/oracle/product/12.1.0/dbhome_1/bin/tnslsnr: please wai                                                                                                              t...

TNSLSNR for Linux: Version 12.1.0.1.0 - Production
System parameter file is /home/oracle/app/oracle/product/12.1.0/dbhome_1/network                                                                                                              /admin/listener.ora
Log messages written to /home/oracle/app/oracle/diag/tnslsnr/oracle12c/listener/                                                                                                              alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.220.203)(PORT=15                                                                                                              21)))

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 12.1.0.1.0 - Production
Start Date                01-JUL-2013 14:12:01
Uptime                    0 days 0 hr. 0 min. 0 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /home/oracle/app/oracle/product/12.1.0/dbhome_1/networ                                                                                                              k/admin/listener.ora
Listener Log File         /home/oracle/app/oracle/diag/tnslsnr/oracle12c/listene                                                                                                              r/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.220.203)(PORT=1521)))
Services Summary...
Service "CLRExtProc" has 1 instance(s).
  Instance "CLRExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "ORCL" has 1 instance(s).
  Instance "ORCL", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
可以看到监听只对全局环境变量Orcl进行监听,并没有体现对组装库的监听


连接Sqlplus查看PDB

[oracle@oracle12c ~]$ sqlplus system/oracle@orcl

SQL*Plus: Release 12.1.0.1.0 Production on Mon Jul 1 14:27:40 2013

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

Last Successful login time: Mon Jul 01 2013 14:20:36 -04:00

Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing opt                                                                                                              ions


SQL> select con_id,dbid,NAME,OPEN_MODE from v$pdbs;

    CON_ID       DBID NAME                           OPEN_MODE
---------- ---------- ------------------------------ ----------
         2 4062262812 PDB$SEED                       READ ONLY
         3 2266793495 PDBORCL                        MOUNTED

可以看到,系统自动创建的PDBORCL,但是Open_MODE是Mounted状态,我们需要将PDBORCL进行Open,该操作需要使用SYS用户

SQL> alter pluggable database pdborcl open;
alter pluggable database pdborcl open
*
ERROR at line 1:
ORA-01031: insufficient privileges


SQL> conn sys/oracle@orcl as sysdba
Connected.
SQL> alter pluggable database pdborcl open;

Pluggable database altered.

SQL> select con_id,dbid,NAME,OPEN_MODE from v$pdbs;

    CON_ID       DBID NAME                           OPEN_MODE
---------- ---------- ------------------------------ ----------
         2 4062262812 PDB$SEED                       READ ONLY
         3 2266793495 PDBORCL                        READ WRITE


我们再查看一下监听状态
[oracle@oracle12c ~]$ lsnrctl status

LSNRCTL for Linux: Version 12.1.0.1.0 - Production on 01-JUL-2013 15:22:11

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

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 12.1.0.1.0 - Production
Start Date                01-JUL-2013 14:12:01
Uptime                    0 days 1 hr. 10 min. 10 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /home/oracle/app/oracle/product/12.1.0/dbhome_1/network/admin/listener.ora
Listener Log File         /home/oracle/app/oracle/diag/tnslsnr/oracle12c/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.220.203)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcps)(HOST=oracle12c)(PORT=5500))(Security=(my_wallet_directory=/home/oracle/app/oracle/product/12.1.0/dbhome_1/admin/orcl/xdb_wallet))(Presentation=HTTP)(Session=RAW))
Services Summary...
Service "CLRExtProc" has 1 instance(s).
  Instance "CLRExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "ORCL" has 2 instance(s).
  Instance "ORCL", status UNKNOWN, has 1 handler(s) for this service...
  Instance "orcl", status READY, has 1 handler(s) for this service...
Service "orclXDB" has 1 instance(s).
  Instance "orcl", status READY, has 1 handler(s) for this service...
Service "pdborcl" has 1 instance(s).
  Instance "orcl", status READY, has 1 handler(s) for this service...
The command completed successfully
可以看到,监听已经对pdborcl进行了监听,那么连接该插件库
[oracle@oracle12c ~]$ sqlplus sys/oracle@pdborcl as sysdba

SQL*Plus: Release 12.1.0.1.0 Production on Mon Jul 1 15:25:53 2013

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


Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options

SQL> show con_name;

CON_NAME
------------------------------
PDBORCL
SQL> select name from datafile;
select name from datafile
                 *
ERROR at line 1:
ORA-00942: table or view does not exist


SQL> select name from v$datafile;

NAME
--------------------------------------------------------------------------------
/home/oracle/app/oracle/oradata/orcl/undotbs01.dbf
/home/oracle/app/oracle/oradata/orcl/pdborcl/system01.dbf
/home/oracle/app/oracle/oradata/orcl/pdborcl/sysaux01.dbf
/home/oracle/app/oracle/oradata/orcl/pdborcl/SAMPLE_SCHEMA_users01.dbf
/home/oracle/app/oracle/oradata/orcl/pdborcl/example01.dbf

--------------------------------------------------------------------------------------------

Blog: http://blog.csdn.net/linghe301
Weibo: http://www.weibo.com/linghe301
--------------------------------------------------------------------------------------------


那么接下来,我们已经弄清楚出现问题的原因之后,我们重新输入参数信息,创建ArcSDE地理数据库



执行之后,我们看到ArcSDE地理数据库已经创建完成



我们导入数据进行测试



后续还会推出更多Oracle 12c新特性与ArcGIS数据结合的文章,尽情期待!

--------------------------------------------------------------------------------------------

Blog: http://blog.csdn.net/linghe301
Weibo: http://www.weibo.com/linghe301
--------------------------------------------------------------------------------------------

人气教程排行