Re: how to check 32 bit -> 64 bit migration

From: Ram Srinivasan <srinivasanram2004_at_gmail.com>
Date: Tue, 29 Nov 2016 21:08:49 -0500
Message-ID: <CAKgSvf_F9rPLzhBwXa0dVq0SNQq3M2HP5ZHgTmcZM-jksN=x-A_at_mail.gmail.com>



Your first question was "Does anyone know if a database is currently in 64 or 32 bit?".
The answer is : select
  2 length(addr)*4 || '-bits'
  3 from
  4 v$process
  5 where
  6 ROWNUM =1;
  which gives you that the database is currently in 64 bit.   If you want to find out at what bit rate was the database created, then you have to use the case statement that I gave you.

  After you ran both the queries, what you got as out is correct. That is, the database was first created as 32 bit, but it is currently at 64 bit.

  Now if you want to know whether someone has already run utlrp.sql, there is no query for that. However, you can run the utlrp.sql any number of times. Nothing will happen to the database. If you are unsure of whether anyone has run the utlrp.sql script, you can run it again. No problem.

Ram

On Tue, Nov 29, 2016 at 7:17 PM, Ls Cheng <exriscer_at_gmail.com> wrote:

> this is before converting 32 bit database to 64 bit
>
>
> SQL> select platform_name from v$database;
>
> PLATFORM_NAME
> ------------------------------------------------------------
> -----------------------------------------
> Linux x86 64-bit
>
> SQL> select * from v$version;
>
> BANNER
> CON_ID
> --------------------------------------------------------------------------------
> ----------
> Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit
> Production 0
> PL/SQL Release 12.1.0.2.0 - Production
> 0
> CORE 12.1.0.2.0 Production
> 0
> TNS for Linux: Version 12.1.0.2.0 - Production
> 0
> NLSRTL Version 12.1.0.2.0 - Production
> 0
>
> SQL> select
> 2 length(addr)*4 || '-bits'
> 3 from
> 4 v$process
> 5 where
> 6 ROWNUM =1;
>
> LENGTH(ADDR)*4||'-BITS'
> ---------------------------------------------
> 64-bits
>
> SQL> select
> 2 case
> 3 when INSTR(metadata,'B047') > 1 then 'The Database is 64 Bit.'
> 4 when INSTR(metadata,'B023') > 1 then 'The Database is 32 Bit.'
> 5 end as Result
> 6 from sys.kopm$ ;
>
> RESULT
> -----------------------
> The Database is 32 Bit.
>
>
>
> this is after running URLIRP (32 bit to 64 bit conversion)
>
> SQL> select platform_name from v$database;
>
> PLATFORM_NAME
> ------------------------------------------------------------
> -----------------------------------------
> Linux x86 64-bit
>
> SQL> select * from v$version;
>
> BANNER
> CON_ID
> --------------------------------------------------------------------------------
> ----------
> Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit
> Production 0
> PL/SQL Release 12.1.0.2.0 - Production
> 0
> CORE 12.1.0.2.0 Production
> 0
> TNS for Linux: Version 12.1.0.2.0 - Production
> 0
> NLSRTL Version 12.1.0.2.0 - Production
> 0
>
> SQL> select
> 2 length(addr)*4 || '-bits'
> 3 from
> 4 v$process
> 5 where
> 6 ROWNUM =1;
>
> LENGTH(ADDR)*4||'-BITS'
> ---------------------------------------------
> 64-bits
>
> SQL> select
> 2 case
> 3 when INSTR(metadata,'B047') > 1 then 'The Database is 64 Bit.'
> 4 when INSTR(metadata,'B023') > 1 then 'The Database is 32 Bit.'
> 5 end as Result
> 6 from sys.kopm$ ;
>
> RESULT
> -----------------------
> The Database is 32 Bit.
>
>
>
> as we can see there is no difference so the queries provided gives no
> useful info.... any more suggestions?
>
> Thanks
>
>
>
>
> On Tue, Nov 29, 2016 at 5:01 PM, Ls Cheng <exriscer_at_gmail.com> wrote:
>
>> Hi Ram
>>
>>
>> I have used that query as well, I dont want to know if the database was
>> created in 32 bit, I want to know if it currently runs in 64 bit mode, that
>> is if UTLIRP.SQL has been run.
>>
>> I will test all your sugegstion anyways in a few hours time and let you
>> know
>>
>> Thanks!
>>
>>
>> On Tue, Nov 29, 2016 at 12:37 PM, Ram Srinivasan <
>> srinivasanram2004_at_gmail.com> wrote:
>>
>>> Cheng:
>>> Try this. I used this query long time ago:
>>>
>>>
>>> /* To identify whether a database was created as 32-bit or 64-bit,
>>> execute the following SQL statement: */
>>>
>>> select
>>> case
>>> when INSTR(metadata,'B047') > 1 then 'The Database is 64 Bit.'
>>> when INSTR(metadata,'B023') > 1 then 'The Database is 32 Bit.'
>>> end as Result
>>> from sys.kopm$ ;
>>>
>>> /*
>>> If the output references the string 'B023' , then it indicates that the
>>> database was created as 32-bit.
>>>
>>> If the output references the string 'B047' then it indicates that the
>>> database was created as 64-bit.
>>> */
>>>
>>> On Tue, Nov 29, 2016 at 3:56 AM, Ls Cheng <exriscer_at_gmail.com> wrote:
>>>
>>>> Hi Ram
>>>>
>>>> I already tested that, once a database is migrated to 64 bit and
>>>> utlirp.sql is NOT executed that query returns 64 bit too!
>>>>
>>>> Thanks
>>>>
>>>>
>>>>
>>>> On Tue, Nov 29, 2016 at 1:40 AM, Ram Srinivasan <
>>>> srinivasanram2004_at_gmail.com> wrote:
>>>>
>>>>> Try this:
>>>>>
>>>>> select
>>>>> length(addr)*4 || '-bits'
>>>>> from
>>>>> v$process
>>>>> where
>>>>> ROWNUM =1;
>>>>>
>>>>> On Mon, Nov 28, 2016 at 1:53 PM, Ls Cheng <exriscer_at_gmail.com> wrote:
>>>>>
>>>>>> Hi
>>>>>>
>>>>>> Does anyone know if a database is currently in 64 or 32 bit?
>>>>>>
>>>>>> IHAC migrated a few database a couple of weeks ago from Linux x86 to
>>>>>> Linux x86_64 and they unsure if utlirp.sql is run in all of them.
>>>>>>
>>>>>> Anyone know how to check if the database is running in 64 bit mode?
>>>>>> All I have found is how to check binary bitness but not the database.
>>>>>>
>>>>>>
>>>>>> Thanks
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Sincerely
>>>>> Ram Srinivasan
>>>>>
>>>>
>>>>
>>>
>>>
>>> --
>>> Sincerely
>>> Ram Srinivasan
>>>
>>
>>
>

-- 
Sincerely
Ram Srinivasan

--
http://www.freelists.org/webpage/oracle-l
Received on Wed Nov 30 2016 - 03:08:49 CET

Original text of this message