Thursday, April 26, 2012

changing the instance name for single instance


To change the instance name:

Enter user-name: / as sysdba
Connected to an idle instance.

SQL> startup
ORACLE instance started.

Total System Global Area  418484224 bytes
Fixed Size                  1375004 bytes
Variable Size             310379748 bytes
Database Buffers          100663296 bytes
Redo Buffers                6066176 bytes
Database mounted.
Database opened.
SQL> spool C:\Users\jayva\Desktop\work\oracle_sid_change\sid.txt
SQL> show parameter db_name

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
db_name                              string      target
SQL> show parameter instance_name

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
instance_name                        string      target
SQL> create pfile='C:\Users\jayva\Desktop\work\oracle_sid_change\pfile.ora' from
 spfile;

File created.

SQL> shu immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

Alter the instance_name parameter in newly created pfile and also creating the new service (using oradim utility).

C:\Windows\system32>oradim -new -sid target1
Instance created.
C:\Users\jayva>set ORACLE_SID=target1

Now starting the database using altered pfile.

C:\Users\jayva>sqlplus

SQL*Plus: Release 11.2.0.1.0 Production on Thu Apr 26 19:56:11 2012

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

Enter user-name: / as sysdba
Connected to an idle instance.

SQL> startup nomount pfile=C:\Users\jayva\Desktop\work\oracle_sid_change\pfile.ora
ORACLE instance started.

Total System Global Area  418484224 bytes
Fixed Size                  1375004 bytes
Variable Size             281019620 bytes
Database Buffers          130023424 bytes
Redo Buffers                6066176 bytes
SQL> alter database mount;

Database altered.

SQL> alter database open;

Database altered.

SQL> show parameter db_name

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
db_name                              string      target
SQL> show parameter instance_name

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
instance_name                        string      target1
SQL>

Here we go, instance name is change to target1 and database name is target. 

Thursday, April 19, 2012

Install 11.2.0.2 from patch set.. no base version required


Helllo DBA's. wanna share one great news. 


From 11.2.0.2, you can directly download patchset and install (I just installed for freshing server). 


No need to install the base version..


Oracle id: 10098816

Monday, April 16, 2012

RDA test run


“rda.sh -T hcve” is the script to testrun for RDA.

thunder:(infoddp)/home/oracle/rda/rda > rda.sh -T hcve
Processing HCVE tests ...
Available Pre-Installation Rule Sets:
   1. Oracle Database 10g R1 (10.1.0) Preinstall (HP-UX)
   2. Oracle Database 10g R2 (10.2.0) Preinstall (HPUX)
   3. Oracle Database 11g R1 (11.1.0) Preinstall (HPUX)
   4. Oracle Database 11g R2 (11.2.0) Preinstall (HPUX)
   5. Oracle Application Server 10g (9.0.4) Preinstall (HP-UX)
   6. Oracle Application Server 10g R2 (10.1.2) Preinstall (HP-UX)
   7. Oracle Fusion Middleware 11g R1 (11.1.1) Preinstall (HP-UX)
   8. Oracle Portal Preinstall (Generic)
   9. Oracle Identity Management 10g (10.1.4) Preinstall (HP-UX)
  10. Oracle E-Business Suite Release 12 (12.1.1) Preinstall (HP-UX)
Available Post-Installation Rule Sets:
  11. Oracle Portal Postinstall (generic)
  12. Data Guard Postinstall (Generic)
Enter the HCVE rule set number
Hit 'Return' to accept the default (1)
> 

Enter value for < Planned ORACLE_HOME location >
Hit 'Return' to accept the default (/u01/infoddp/product/11.2.0/db)
> 



Test "Oracle Database 10g (10.1.0) Preinstall(HP-UX)" executed at 16-Apr-2012 10:06:45

Test Results
~~~~~~~~~~~~

ID     NAME                 RESULT  VALUE
====== ==================== ======= ==========================================
A00010 OS Certified?        PASSED  HP-UX Itanium 11.31 64 bit is certifi..>
A00020 User in ``/etc/passw PASSED  userOK
A00030 Group in ``/etc/grou PASSED  GroupOK
A00040 Enter ORACLE_HOME    RECORD  /u01/infoddp/product/11.2.0/db
A00050 ORACLE_HOME Valid?   PASSED  OHexists
A00060 O_H Permissions OK?  PASSED  CorrectPerms
A00070 Umask Set to 022?    PASSED  UmaskOK
A00080 LDLIBRARYPATH Unset? FAILED  IsSet
A00090 SHLIB_PATH Unset?    PASSED  UnSet
A00100 Other O_Hs in PATH?  PASSED  NoneFound
A00110 oraInventory Permiss PASSED  oraInventoryOK
A00120 /tmp Adequate?       PASSED  TempSpaceOK
A00130 Swap (in MB)         RECORD  95072
A00140 RAM (in MB)          FAILED  0
A00150 SwapToRam OK?        FAILED  RamNotDetermined
A00160 Disk Space OK?       PASSED  DiskSpaceOK
A00170 Kernel Parameters OK FAILED  [SEMVMX=32767] too small
A00180 Got ld,nm,ar,make?   PASSED  ld_nm_ar_make_found
A00190 ulimits OK?          FAILED  CoreTooSmall
A00200 OS Packages?         SKIPPED NotChecked
A00210 OS Patches?          PASSED  OSpatchesFound
A00220 Other OUI Up?        PASSED  NoOtherOUI
Result file: /home/oracle/rda/rda/output/RDA_HCVE_A200DB10R1_hp_res.htm
thunder:(infoddp)/home/oracle/rda/rda >

Tuesday, April 10, 2012

Dynamics views for SGA


V$SGA ---- Displays summary information about the system global area (SGA).

V$SGAINFO ---- Displays size information about the SGA, including the sizes of different SGA components, the granule size, and free memory.

V$SGASTAT ---- Displays detailed information about the SGA.

V$SGA_DYNAMIC_COMPONENTS --- Displays information about the dynamic SGA components. This view summarizes information based on all completed SGA resize operations since instance startup.

V$SGA_DYNAMIC_FREE_MEMORY -----Displays information about the amount of SGA memory available for future dynamic SGA resize operations.

V$SGA_RESIZE_OPS ---- Displays information about the last 400 completed SGA resize operations.

V$SGA_CURRENT_RESIZE_OPS --- Displays information about SGA resize operations that are currently in progress. A resize operation is an enlargement or reduction of a dynamic SGA component.

V$SGA_TARGET_ADVICE ---- Displays information that helps you tune SGA_TARGET. For more information, see Oracle Database Performance Tuning Guide.



set lin 180
col component format A50

select START_TIME, component, oper_type, oper_mode,status, initial_size/1024/1024 "INITIAL", target_size/1024/1024 "TARGET", FINAL_SIZE/1024/1024 "FINAL", END_TIME
from v$sga_resize_ops where status='ERROR'
order by start_time, component

col current_size for 999,999,999,999 head "Current Size"
col min_size for 999,999,999,999 head "Min Size"
col max_size for 999,999,999,999 head "Max Size"
select COMPONENT,CURRENT_SIZE,MIN_SIZE,MAX_SIZE,USER_SPECIFIED_SIZE from V$SGA_DYNAMIC_COMPONENTS order by COMPONENT;