oracle 区分32位还是64位

来源:这里教程网 时间:2026-03-03 20:02:04 作者:

方法一:使用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                   

相关推荐