ITPub博客

首页 > 数据库 > Oracle > oracle 区分32位还是64位

oracle 区分32位还是64位

原创 Oracle 作者:oracle11111 时间:2024-05-25 15:18:22 0 删除 编辑

方法一:使用sqlplus

64位:

[oracle@~]$sqlplus / as sysdba

SQL*Plus: Release 11.2.0.4.0 Production on Sat May 25 15:12:20 2024

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

Connected to:

Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production

With the Partitioning, OLAP, Data Mining and Real Application Testing options

如果是64位,用sqlplus 连上之后会显示具体的位数信息,32位则不会显示。


32位:

C:\Windows\system32>sqlplus / as sysdba

SQL*Plus: Release 11.2.0.1.0 Production on 星期六 5月 25 14:58:21 2024

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

连接到:

Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production

With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL>


方法二: 查看v$version 视图

32位:

连接到:

Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production

With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL>  select * from v$version;

BANNER

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

Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production

PL/SQL Release 11.2.0.1.0 - Production

CORE    11.2.0.1.0      Production

TNS for 32-bit Windows: Version 11.2.0.1.0 - Production

NLSRTL Version 11.2.0.1.0 - Production



64位:可以看到位数

SQL> select * from v$version;

BANNER

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

Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production

PL/SQL Release 11.2.0.4.0 - Production

CORE 11.2.0.4.0 Production

TNS for Linux: Version 11.2.0.4.0 - Production

NLSRTL Version 11.2.0.4.0 - Production



建议使用下面两种方式,上面的方式高版本可能就不适用了。

方法三:查看v$sql 视图

32位:输出为8位16进制数


SQL> select address from v$sql where rownum<2;

ADDRESS

--------

B25819B8


64位:输出为16位16进制数

SQL> select address from v$sql where rownum<2;

ADDRESS

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

000000006EE7AF30

 

方法四:

如果是linux环境可以使用下面的命令

file $ORACLE_HOME/bin/oracle


[oracle@test ~]$ file $ORACLE_HOME/bin/oracle

/u02/app/oracle/product/19.9.0/db_1/bin/oracle: setuid setgid ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.32, BuildID[sha1]=c938415a43051e251d28e8a9489de8e72651531f, not stripped


32位环境:

[oracle@db10g bin]$ file oracle

oracle: setuid setgid ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.2.5, dynamically linked (uses shared libs), not stripped




查看安装包区分32或者64位,11.2.0.1


64位的软件

database目录下面的 welcome.html 文件,带有x86-64字样

Oracle Logo Database Product Documentation

11g Release 2 (11.2) for Linux x86-64


32位的软件

database目录下面的 welcome.html 文件,带有x86字样

Oracle Logo Database Product Documentation

11g Release 2 (11.2) for Linux x86

或者 runinstaller文件有如下描述是64位

if [ `$UNAME` = "Linux" ]; then

  if  [  -e $GETCONF ]; then

  value=`$GETCONF LONG_BIT`

    if  [ $value != 64 ]; then

         echo "\"You are attempting to install 64-bit Oracle on a 32-bit operating system.  This is not supported and will not work.\"";

         exit 126; #corresponding to the exit code of oui

    fi

  fi

fi 

 

 

 

 

 

 

 

 

 


来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/69924215/viewspace-3016629/ ,如需转载,请注明出处,否则将追究法律责任。

下一篇: 限制RMAN备份速度
请登录后发表评论 登录
全部评论

注册时间:2019-05-19

  • 博文量
    81
  • 访问量
    90371