计算Oracle数据库软件许可证License的使用量

引言: 之前在和一家代理商的讨论过程中, 在开发和测试环境的数据库是否需要购买License 这个问题上产生了分歧, 按照我当时的理解只要是不用于商业用途或者说不部署实际使用的应用程序的环境是不需要购买License 的, 而代理商的工程师说不管你的开发还是测试环境其实都是为了生产环境而存在的,所以实际也是要购买License的。

 

Google了一把, Oracle官方的<Database Licensing> 分别定义了Development Environment、Test Environment和Production Environment三种环境。

 

以下是对Development Environment的说明:

 

Development Environment: Customers may use Oracle Full Use licenses in a development environment. Customers also may download Oracle technology products from the Oracle Technology Network (OTN) at http://otn.oracle.com/software/. In order to download an Oracle product from OTN, customers must signify their agreement to the terms of the OTN Development License. This limited license gives the user the right to develop, but not to deploy, applications using the licensed products. It also limits the use of the downloaded product to one person, and limits installation of the product to one server. Customers may not use products licensed under the OTN Development License in connection with any classroom activity, internal data processing operations, or any other commercial or production use purposes.

The OTN Development License is a limited license, and is not part of the Oracle License and Services Agreement (OLSA). If a customer wants to use products licensed under an OTN Development License for any purposes other than the limited development rights granted by that license, including deployment of an application developed under an OTN Development License, he will need to contact Oracle, or an authorized Oracle reseller, to obtain the appropriate licenses.

 

用户从OTN上下载到的Oracle数据库软件遵循<The OTN Development License >OTN开发协议, 该协议给予用户开发的权利,但是不能部署应用程序, 也不能将之安装到服务器上( limits installation of the product to one server)。

以上对于开发环境的定义较为严格,如不能将开发环境搭建在服务器上, 这意为着我们只能在自己的桌面电脑上进行开发。 实际企业运作过程中很难完全避免<The OTN Development License >中的限制。

所以说虽然理论上开发环境是不需要购买相应的license软件使用许可证的,但是因为Development License的限制过于严格,所以我们口中的”开发环境” 实际可能被鉴定为测试环境。

而对于测试环境要求获得和产品环境(Production Environment)一样的 Oracle License and Services Agreement 协议的许可, 换句话说测试环境是需要购买License的。

Test Environment: All programs used in a test environment must be licensed
under an OLSA or other appropriate Oracle (or Oracle authorized reseller)
license agreement.

Production Environment: The environment used by end users for business or
other operations is called a production environment. All programs used in the
production environment must be licensed under an OLSA or other appropriate
Oracle (or Oracle authorized reseller) license agreement

 

 

在实际的License采购过程中,代理商或Oracle销售都可能这样告诉你”开发和测试环境都是需要购买License的” ,这样做可能是出于多种考虑的。而实际如果你很清楚数据库许可证协议的内容,那么你可以明确地判断你需要的究竟是否是Oracle定义的开发环境”Development Environment”  且 在<The OTN Development License >协议的限制之内 , 如果是肯定的那么这一部分不需要购买License。

 

 

在之前的文章中我介绍了Oracle数据库软件许可证的2种购买形式, 包括cpu个数和用户数量。 但是关于实际的计算方法则没有介绍,这里推荐一款由Licensecalculator.com制作的license calculator 许可证使用量计算器来帮助我们计算需要购买的License, 该计算器会输出需要购买的最少的cpu或用户license数量。

 

注意因为Oracle数据库的安装和使用不需要特别去安装license key ,所以我们没有办法通过脚本或者工具来直接计算其当前license的使用量。 需要通过了解主机上的CPU数量以及所使用的Oracle数据库软件的版本来计算。

 

该计算器可以选择的产品版本和特性,包括了:

  1. Enterprise Edition 企业版
  2. Standard Edition   标准版
  3. Real Application Cluster
  4. Real Application Cluster  One node
  5. Active Data Guard ADG

 

 

该计算器涵盖的了主流的cpu种类,包括x86、Sparc、Power等。

 

这里我们再介绍一下如何查看服务器上物理CPU总数以及核数:

 

a.如果已安装了数据库实例,那么直接查看V$license视图即可:

 

SQL> select cpu_count_current,CPU_CORE_COUNT_CURRENT,CPU_SOCKET_COUNT_CURRENT from v$license;

CPU_COUNT_CURRENT CPU_CORE_COUNT_CURRENT CPU_SOCKET_COUNT_CURRENT
----------------- ---------------------- ------------------------
                2                      2                        1

 

以上同通过v$license 视图反应了数据库服务器当前的逻辑CPU总数为2,而总的核数也是2,实际的物理CPU Socket是1,那么说明是1个双核的物理CPU。

 

我在<检查Oracle数据库软件是Enterprise Edition或Standard Edition的10种方法>中介绍了检查软件版本的方法,如果你不能确定已经部署的Oracle软件的具体版本,那么可以参考这篇文章。

 

b. 如果服务器上尚没有部署实例则不能使用v$license视图,那么可以通过OS 命令来获取必要的信息。

在x86 Linux服务器上:

列出当前使用的物理CPU的个数:

grep core\ id /proc/cpuinfo | grep -c \ 0$ | grep ^0$ >> /dev/null && grep -c processor /proc/cpuinfo || \
grep core\ id /proc/cpuinfo | grep -c \ 0$

列出单个物理CPU的核数

grep "cpu cores" /proc/cpuinfo |uniq

 

 

在Power系列的IBM小机上按照cpu模块方式来购买,在IBM Dual-Core Module(双核模块)的power芯片上,一个双核模块(内含2颗物理cpu)只需要购买1.5个license , 具体的模块类型可以咨询IBM厂家或者集成商。

 

可以直接在本页面中计算,或者将该flash软体下载到本地,下载地址。

 

 

 

 


Posted

in

by

Tags:

Comments

One response to “计算Oracle数据库软件许可证License的使用量”

  1. wind Avatar
    wind

    这篇文章挺好的,外加我自己的体会。partitioning 也是要额外license,而且很贵。所有的rac都要另外收费,如果ha要求不是7×24,可以考虑clusterware。active standby是要另外收钱的,但是普通的standby和 snap shot standby是免费的,我都把免费最大化了。

Leave a Reply

Your email address will not be published. Required fields are marked *