Tuesday, February 28, 2012

Gather Statistics using DBMS_SCHEDULER

Links to this post


Schedule Job as below.

BEGIN  
DBMS_SCHEDULER.create_job (  
job_name    => 'GATHER_TABLE_STATS_EMP',  
job_type    => 'PLSQL_BLOCK',  
job_action   => 'begin dbms_stats.gather_table_stats(ownname =>''USERNAME'',tabname =>''EMP'',estimate_percent => 35,degree => 8,CASCADE=>TRUE,force => TRUE); END;',  
start_date   => '29-NOV-11 11.00.00AM US/eastern',  
repeat_interval => 'FREQ=WEEKLY;INTERVAL=2;BYDAY=SAT;BYHOUR=11;BYMINUTE=0',  
end_date    => NULL,  
enabled     => TRUE,  
comments    => 'GATHER STATS ON EMPTABLE');  
END;  
/

BEGIN  
 DBMS_SCHEDULER.run_job (job_name => 'GATHER_TABLE_STATS_EMP',  
 use_current_session => FALSE);  
END;  
/  

You can define repeat intervals of jobs, windows or schedules using the Scheduler's calendar syntax.

SET SERVEROUTPUT ON;
ALTER SESSION set NLS_DATE_FORMAT = 'DD-MON-YYYY HH24:MIS'; 

DECLARE                                
start_date    TIMESTAMP;                      
return_date_after TIMESTAMP;                      
next_run_date   TIMESTAMP;                      
BEGIN                                 
start_date := to_timestamp_tz('29-NOV-11 09.00.00','DD-MON-YYYY HH24:MIS');  
return_date_after := start_date;                    
FOR i IN 1..5 LOOP                           
DBMS_SCHEDULER.EVALUATE_CALENDAR_STRING('FREQ=WEEKLY;INTERVAL=2;BYDAY=SAT;BYHOUR=11;BYMINUTE=0',start_date, return_date_after, next_run_date);           
DBMS_OUTPUT.PUT_LINE('next_run_date: ' || next_run_date);       
return_date_after := next_run_date;                  
END LOOP;                               
END;
/


You can change frequency as you like to Test.

Wednesday, February 22, 2012

11gR2 - Restore OCR/ VOTEDISK based on ASM, when loss of CRS Diskgroup.

Links to this post
1. Locate the latest automatic OCR backup

When using a non-shared CRS home, automatic OCR backups can be located on any node of the cluster, consequently all nodes need to be checked for the most recent backup:

$ ls -lrt $CRS_HOME/cdata/rac_cluster1/
-rw------- 1 root root 7331840 Mar 10 18:52 week.ocr
-rw------- 1 root root 7651328 Mar 26 01:33 week_.ocr
-rw------- 1 root root 7651328 Mar 29 01:33 day.ocr
-rw------- 1 root root 7651328 Mar 30 01:33 day_.ocr
-rw------- 1 root root 7651328 Mar 30 01:33 backup02.ocr
-rw------- 1 root root 7651328 Mar 30 05:33 backup01.ocr
-rw------- 1 root root 7651328 Mar 30 09:33 backup00.ocr

2. Make sure the Grid Infrastructure is shutdown on all nodes
Given that the OCR diskgroup is missing, the GI stack will not be functional on any node, however there may still be various daemon processes running.  On each node shutdown the GI stack using the force (-f) option:

# $CRS_HOME/bin/crsctl stop crs -f

3. Start the CRS stack in exclusive mode

On the node that has the most recent OCR backup, log on as root and start CRS in exclusive mode, this mode will allow ASM to start & stay up without the presence of a Voting disk and without the CRS daemon process (crsd.bin) running.

11.2.0.1:

# $CRS_HOME/bin/crsctl start crs -excl
...CRS-2672: Attempting to start 'ora.asm' on 'racnode1'
CRS-2676: Start of 'ora.asm' on 'racnode1' succeeded
CRS-2672: Attempting to start 'ora.crsd' on 'racnode1'
CRS-2676: Start of 'ora.crsd' on 'racnode1' succeeded


11.2.0.2:

# $CRS_HOME/bin/crsctl start crs -excl -nocrs
CRS-4123: Oracle High Availability Services has been started.
...
CRS-2672: Attempting to start 'ora.cluster_interconnect.haip' on 'auw2k3'
CRS-2672: Attempting to start 'ora.ctssd' on 'racnode1'
CRS-2676: Start of 'ora.drivers.acfs' on 'racnode1' succeeded
CRS-2676: Start of 'ora.ctssd' on 'racnode1' succeeded
CRS-2676: Start of 'ora.cluster_interconnect.haip' on 'racnode1' succeeded
CRS-2672: Attempting to start 'ora.asm' on 'racnode1'
CRS-2676: Start of 'ora.asm' on 'racnode1' succeeded

4. Label the CRS disk for ASMLIB use

If using ASMLIB the disk to be used for the CRS disk group needs to stamped first, as user root do:

# /usr/sbin/oracleasm createdisk ASMD40 /dev/sdh1

Writing disk header: done
Instantiating disk: done

5. Create the CRS diskgroup via sqlplus

The disk group can now be (re-)created via sqlplus from the grid user. The compatible.asm attribute must be set to 11.2 in order for the disk group to be used by CRS: 

$ sqlplus / as sysasm
SQL*Plus: Release 11.2.0.1.0 Production on Tue Mar 30 11:47:24 2010
Copyright (c) 1982, 2009, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Real Application Clusters and Automatic Storage Management options

SQL> create diskgroup CRS external redundancy disk 'ORCL:ASMD40' attribute 'COMPATIBLE.ASM' = '11.2';

Diskgroup created.
SQL> exit


6. Restore the latest OCR backup

Now that the CRS disk group is created & mounted the OCR can be restored - must be done as the root user:

# cd $CRS_HOME/cdata/rac_cluster1/
# $CRS_HOME/bin/ocrconfig -restore backup00.ocr

7. Start the CRS daemon on the current node (11.2.0.1 only !)

Now that the OCR has been restored the CRS daemon can be started, this is needed to recreate the Voting file. Skip this step for 11.2.0.2.0.

# $CRS_HOME/bin/crsctl start res ora.crsd -init
CRS-2672: Attempting to start 'ora.crsd' on 'racnode1'
CRS-2676: Start of 'ora.crsd' on 'racnode1' succeeded

8. Recreate the Voting file

The Voting file needs to be initialized in the CRS disk group:

# $CRS_HOME/bin/crsctl replace votedisk +CRS
Successful addition of voting disk 00caa5b9c0f54f3abf5bd2a2609f09a9.
Successfully replaced voting disk group with +CRS.
CRS-4266: Voting file(s) successfully replaced


9. Recreate the SPFILE for ASM (optional)

Prepare a pfile (e.g. /tmp/asm_pfile.ora) with the ASM startup parameters - these may vary from the example below. If in doubt consult the ASM alert log  as the ASM instance startup should list all non-default parameter values. Please note the last startup of ASM (in step 2 via CRS start) will not have used an SPFILE, so a startup prior to the loss of the CRS disk group would need to be located.
*.asm_power_limit=1
*.diagnostic_dest='/u01/app/oragrid'
*.instance_type='asm'
*.large_pool_size=12M
*.remote_login_passwordfile='EXCLUSIVE'
Now the SPFILE can be created using this PFILE:
$ sqlplus / as sysasm
SQL*Plus: Release 11.2.0.1.0 Production on Tue Mar 30 11:52:39 2010
Copyright (c) 1982, 2009, Oracle. All rights reserved.

Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Real Application Clusters and Automatic Storage Management options

SQL> create spfile='+CRS' from pfile='/tmp/asm_pfile.ora';

File created.
SQL> exit

10. Shutdown CRS 

Since CRS is running in exclusive mode, it needs to be shutdown  to allow CRS to run on all nodes again. Use of the force (-f) option may be required:

# $CRS_HOME/bin/crsctl stop crs -f
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'auw2k3' has completed
CRS-4133: Oracle High Availability Services has been stopped.

11. Rescan ASM disks

If using ASMLIB rescan all ASM disks on each node as the root user:

# /usr/sbin/oracleasm scandisks
Reloading disk partitions: done
Cleaning any stale ASM disks...
Scanning system for ASM disks...
Instantiating disk "ASMD40"


12. Start CRS 
As the root user submit the CRS startup on all cluster nodes:

# $CRS_HOME/bin/crsctl start crs
CRS-4123: Oracle High Availability Services has been started.

13. Verify CRS 

To verify that CRS is fully functional again:
# $CRS_HOME/bin/crsctl check cluster -all
**************************************************************
racnode1:
CRS-4537: Cluster Ready Services is online
CRS-4529: Cluster Synchronization Services is online
CRS-4533: Event Manager is online
**************************************************************
racnode2:
CRS-4537: Cluster Ready Services is online
CRS-4529: Cluster Synchronization Services is online
CRS-4533: Event Manager is online
**************************************************************

# $CRS_HOME/bin/crsctl

Tuesday, February 14, 2012

Characterset Migration using CCSAN/CSALTER.

Links to this post



#########################
BEFORE TEST 
#########################
SQL> select * from NLS_DATABASE_PARAMETERS;
PARAMETER                      VALUE
------------------------------ ----------------------------------------
NLS_LANGUAGE                   AMERICAN
NLS_TERRITORY                  AMERICA
NLS_CURRENCY                   $
NLS_ISO_CURRENCY               AMERICA
NLS_NUMERIC_CHARACTERS         .,
NLS_CHARACTERSET               WE8ISO8859P1   <-------
NLS_CALENDAR                   GREGORIAN
NLS_DATE_FORMAT                DD-MON-RR
NLS_DATE_LANGUAGE              AMERICAN
NLS_SORT                       BINARY
NLS_TIME_FORMAT                HH.MI.SSXFF AM
NLS_TIMESTAMP_FORMAT           DD-MON-RR HH.MI.SSXFF AM
NLS_TIME_TZ_FORMAT             HH.MI.SSXFF AM TZR
NLS_TIMESTAMP_TZ_FORMAT        DD-MON-RR HH.MI.SSXFF AM TZR
NLS_DUAL_CURRENCY              $
NLS_COMP                       BINARY
NLS_LENGTH_SEMANTICS           BYTE
NLS_NCHAR_CONV_EXCP            FALSE
NLS_NCHAR_CHARACTERSET         AL16UTF16
NLS_RDBMS_VERSION              11.1.0.7.0


20 rows selected.
################################
----INSTALL CSSCAN UTILITY
################################
SQL> @?/rdbms/admin/csminst.sql
################################################
RUN CSSCAN TO PREPARE CHARACTERSET CONVERSATION   ---OUTAGE WILL BE NEEDED FROM THIS POINT. 
################################################


ALTER SYSTEM SET CLUSTER_DATABASE=FALSE SCOPE=SPFILE; -- RAC Only
SHUTDOWN IMMEDIATE;
STARTUP;


TESTGG1@:/u02/data/VISDB1/RMAN:VISDB1$$ORACLE_HOME/bin/csscan \"sys/system as sysdba\" FULL=Y PROCESS=10


Character Set Scanner v2.2 : Release 11.1.0.7.0 - Production on Wed Nov 30 10:31:57 2011


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




Connected to:
Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options


Current database character set is WE8ISO8859P1.


Enter new database character set name: > AL32UTF8
AL32UTF8
Enter array fetch buffer size: 1024000 >


Enumerating tables to scan...


. process 2 scanning SYS.SOURCE$[AAAADYAABAAAAWgAAA]


THERE WILL 10 PROCESS SCANNING IN PARALLEL,AS WE HAVE GIVEN PROCESS=10


Creating Database Scan Summary Report...


Creating Individual Exception Report...


Scanner terminated successfully.




SQL> SHUTDOWN IMMEDIATE;
Database closed.
Database dismounted.
ORACLE instance shut down.


SQL> STARTUP RESTRICT
ORACLE instance started.


Total System Global Area  263639040 bytes
Fixed Size                  1312752 bytes
Variable Size             234883088 bytes
Database Buffers           25165824 bytes
Redo Buffers                2277376 bytes
Database mounted.
Database opened.


SQL> @?/rdbms/admin/csalter.plb


0 rows created.




Function created.




Function created.




Procedure created.


This script will update the content of the Oracle Data Dictionary.
Please ensure you have a full backup before initiating this procedure.
Would you like to proceed (Y/N)?Y
old   6:     if (UPPER('&conf') <> 'Y') then
new   6:     if (UPPER('Y') <> 'Y') then
Checking data validity...
Unrecognized convertible date found in scanner result


PL/SQL procedure successfully completed.


Checking or Converting phrase did not finish successfully
No database (national) character set will be altered
CSALTER finished unsuccessfully.


PL/SQL procedure successfully completed.




0 rows deleted.




Function dropped.




Function dropped.




Procedure dropped.


##########################################################################


AT THIS POINT WE CAN DECIDE. IF WE CAN CONVERT CHARACTERSET OR NOT , 
SEE "LOSSY" COLUMN TO DETERMINE HOW MUCH DATA WILL NOT BE MIGRATED .REPORT WILL BE CREATED IN LOCAL DIRECTORY. 


##########################################################################


Database Scan Summary Report


Time Started  : 2011-11-30 10:32:21
Time Completed: 2011-11-30 10:34:26


Process ID         Time Started       Time Completed
---------- -------------------- --------------------
         1  2011-11-30 10:32:44  2011-11-30 10:34:06
         2  2011-11-30 10:32:44  2011-11-30 10:34:06
         3  2011-11-30 10:32:44  2011-11-30 10:34:07
         4  2011-11-30 10:32:44  2011-11-30 10:34:25
         5  2011-11-30 10:32:44  2011-11-30 10:34:07
         6  2011-11-30 10:32:48  2011-11-30 10:34:06
         7  2011-11-30 10:32:48  2011-11-30 10:34:24
         8  2011-11-30 10:32:59  2011-11-30 10:34:06
         9  2011-11-30 10:33:03  2011-11-30 10:34:06
        10  2011-11-30 10:33:03  2011-11-30 10:34:06
---------- -------------------- --------------------


[Database Size]


Tablespace                           Used            Free           Total       Expansion
------------------------- --------------- --------------- --------------- ---------------
SYSTEM                            695.38M           4.63M         700.00M           1.74M
SYSAUX                            544.88M          27.69M         572.56M          11.14M
UNDOTBS1                           22.50M           2.50M          25.00M            .00K
TEMP                                 .00K            .00K            .00K            .00K
USERS                               1.38M           3.63M           5.00M            .00K
DRSYS                           1,024.00K           9.00M          10.00M            .00K
------------------------- --------------- --------------- --------------- ---------------
Total                           1,265.13M          47.44M       1,312.56M          12.88M


The size of the largest CLOB is 1625114 bytes


[Database Scan Parameters]


Parameter                      Value
------------------------------ ------------------------------------------------
CSSCAN Version                 v2.1
Instance Name                  VISDB1
Database Version               11.1.0.7.0
Scan type                      Full database
Scan CHAR data?                YES
Database character set         WE8ISO8859P1
FROMCHAR                       WE8ISO8859P1
TOCHAR                         AL32UTF8
Scan NCHAR data?               NO
Array fetch buffer size        1024000
Number of processes            10
Capture convertible data?      NO
------------------------------ ------------------------------------------------


[Scan Summary]


All character type data in the data dictionary are convertible to the new character set
All character type application data are convertible to the new character set


[Data Dictionary Conversion Summary]


Data Dictionary Tables:


Datatype                    Changeless      Convertible       Truncation            Lossy
--------------------- ---------------- ---------------- ---------------- ----------------
VARCHAR2                     3,025,461                0                0                0
CHAR                             2,535                0                0                0
LONG                           217,463                0                0                0
CLOB                            51,922              932                0                0
VARRAY                          54,938                0                0                0
--------------------- ---------------- ---------------- ---------------- ----------------
Total                        3,352,319              932                0                0
Total in percentage             99.972%           0.028%           0.000%           0.000%


The data dictionary can be safely migrated using the CSALTER script


XML CSX Dictionary Tables:


Datatype                    Changeless      Convertible       Truncation            Lossy
--------------------- ---------------- ---------------- ---------------- ----------------
VARCHAR2                           439                0                0                0
CHAR                                 0                0                0                0
LONG                                 0                0                0                0
CLOB                                 0                0                0                0
VARRAY                               0                0                0                0
--------------------- ---------------- ---------------- ---------------- ----------------
Total                              439                0                0                0
Total in percentage            100.000%           0.000%           0.000%           0.000%


[Application Data Conversion Summary]


Datatype                    Changeless      Convertible       Truncation            Lossy
--------------------- ---------------- ---------------- ---------------- ----------------
VARCHAR2                     2,653,685                0                0                0
CHAR                               101                0                0                0
LONG                                10                0                0                0
CLOB                            20,754            8,859                0                0
VARRAY                           6,758                0                0                0
--------------------- ---------------- ---------------- ---------------- ----------------
Total                        2,681,308            8,859                0                0
Total in percentage             99.671%           0.329%           0.000%           0.000%


[Distribution of Convertible, Truncated and Lossy Data by Table]


Data Dictionary Tables:


USER.TABLE                                              Convertible       Truncation            Lossy
-------------------------------------------------- ---------------- ---------------- ----------------
MDSYS.OPENLS_NODES                                               17                0                0
MDSYS.SDO_COORD_OP_PARAM_VALS                                   200                0                0
MDSYS.SDO_GEOR_XMLSCHEMA_TABLE                                    1                0                0
MDSYS.SDO_STYLES_TABLE                                           78                0                0
MDSYS.SDO_XML_SCHEMAS                                             3                0                0
ORDSYS.ORDDCM_CT_PRED_OPRD                                       51                0                0
ORDSYS.ORDDCM_DOCS                                                9                0                0
ORDSYS.ORDDCM_MAPPING_DOCS                                        1                0                0
SYS.METASTYLESHEET                                              158                0                0
SYS.RULE$                                                         1                0                0
SYS.WRH$_SQLTEXT                                                124                0                0
SYS.WRH$_SQL_PLAN                                                83                0                0
SYS.WRI$_ADV_DIRECTIVE_META                                       5                0                0
SYS.WRI$_ADV_OBJECTS                                              1                0                0
SYS.WRI$_DBU_FEATURE_METADATA                                   149                0                0
SYS.WRI$_DBU_FEATURE_USAGE                                       13                0                0
SYS.WRI$_DBU_HWM_METADATA                                        19                0                0
SYS.WRI$_REPT_FILES                                              19                0                0
-------------------------------------------------- ---------------- ---------------- ----------------


XML CSX Dictionary Tables:


USER.TABLE                                              Convertible       Truncation            Lossy
-------------------------------------------------- ---------------- ---------------- ----------------
-------------------------------------------------- ---------------- ---------------- ----------------


Application Data:


USER.TABLE                                              Convertible       Truncation            Lossy
-------------------------------------------------- ---------------- ---------------- ----------------
FLOWS_030000.WWV_FLOW_BUTTON_TEMPLATES                           35                0                0
FLOWS_030000.WWV_FLOW_CUSTOM_AUTH_SETUPS                         18                0                0
FLOWS_030000.WWV_FLOW_FLASH_CHART_SERIES                          6                0                0
FLOWS_030000.WWV_FLOW_LIST_TEMPLATES                            246                0                0
FLOWS_030000.WWV_FLOW_PAGE_GENERIC_ATTR                          44                0                0
FLOWS_030000.WWV_FLOW_PAGE_PLUGS                              3,126                0                0
FLOWS_030000.WWV_FLOW_PAGE_PLUG_TEMPLATES                       219                0                0
FLOWS_030000.WWV_FLOW_PROCESSING                                 43                0                0
FLOWS_030000.WWV_FLOW_ROW_TEMPLATES                              54                0                0
FLOWS_030000.WWV_FLOW_SHORTCUTS                                  38                0                0
FLOWS_030000.WWV_FLOW_STEPS                                   1,631                0                0
FLOWS_030000.WWV_FLOW_STEP_PROCESSING                         1,927                0                0
FLOWS_030000.WWV_FLOW_TEMPLATES                                 174                0                0
SYSMAN.MGMT_IP_ELEM_DEFAULT_PARAMS                              130                0                0
SYSMAN.MGMT_IP_REPORT_ELEM_PARAMS                             1,137                0                0
SYSMAN.MGMT_IP_SQL_STATEMENTS                                    31                0                0
-------------------------------------------------- ---------------- ---------------- ----------------


[Distribution of Convertible, Truncated and Lossy Data by Column]


Data Dictionary Tables:


USER.TABLE|COLUMN                                       Convertible       Truncation            Lossy
-------------------------------------------------- ---------------- ---------------- ----------------
MDSYS.OPENLS_NODES|SYS_NC00004$                                  17                0                0
MDSYS.SDO_COORD_OP_PARAM_VALS|PARAM_VALUE_FILE                  200                0                0
MDSYS.SDO_GEOR_XMLSCHEMA_TABLE|XMLSCHEMA                          1                0                0
MDSYS.SDO_STYLES_TABLE|DEFINITION                                78                0                0
MDSYS.SDO_XML_SCHEMAS|XMLSCHEMA                                   3                0                0
ORDSYS.ORDDCM_CT_PRED_OPRD|SYS_NC00004$                          51                0                0
ORDSYS.ORDDCM_DOCS|SYS_NC00005$                                   9                0                0
ORDSYS.ORDDCM_MAPPING_DOCS|SYS_NC00007$                           1                0                0
SYS.METASTYLESHEET|STYLESHEET                                   158                0                0
SYS.RULE$|CONDITION                                               1                0                0
SYS.WRH$_SQLTEXT|SQL_TEXT                                       124                0                0
SYS.WRH$_SQL_PLAN|OTHER_XML                                      83                0                0
SYS.WRI$_ADV_DIRECTIVE_META|DATA                                  5                0                0
SYS.WRI$_ADV_OBJECTS|ATTR4                                        1                0                0
SYS.WRI$_DBU_FEATURE_METADATA|INST_CHK_LOGIC                     17                0                0
SYS.WRI$_DBU_FEATURE_METADATA|USG_DET_LOGIC                     132                0                0
SYS.WRI$_DBU_FEATURE_USAGE|FEATURE_INFO                          13                0                0
SYS.WRI$_DBU_HWM_METADATA|LOGIC                                  19                0                0
SYS.WRI$_REPT_FILES|SYS_NC00005$                                 19                0                0
-------------------------------------------------- ---------------- ---------------- ----------------


XML CSX Dictionary Tables:


USER.TABLE|COLUMN                                       Convertible       Truncation            Lossy
-------------------------------------------------- ---------------- ---------------- ----------------
-------------------------------------------------- ---------------- ---------------- ----------------


Application Data:


USER.TABLE|COLUMN                                       Convertible       Truncation            Lossy
-------------------------------------------------- ---------------- ---------------- ----------------
FLOWS_030000.WWV_FLOW_BUTTON_TEMPLATES|TEMPLATE                  35                0                0
FLOWS_030000.WWV_FLOW_CUSTOM_AUTH_SETUPS|AUTH_FUN                 8                0                0
FLOWS_030000.WWV_FLOW_CUSTOM_AUTH_SETUPS|PAGE_SEN                 9                0                0
FLOWS_030000.WWV_FLOW_CUSTOM_AUTH_SETUPS|POST_AUT                 1                0                0
FLOWS_030000.WWV_FLOW_FLASH_CHART_SERIES|SERIES_Q                 6                0                0
FLOWS_030000.WWV_FLOW_LIST_TEMPLATES|ITEM_TEMPLAT                16                0                0
FLOWS_030000.WWV_FLOW_LIST_TEMPLATES|ITEM_TEMPLAT                16                0                0
FLOWS_030000.WWV_FLOW_LIST_TEMPLATES|LIST_TEMPLAT                91                0                0
FLOWS_030000.WWV_FLOW_LIST_TEMPLATES|LIST_TEMPLAT                91                0                0
FLOWS_030000.WWV_FLOW_LIST_TEMPLATES|SUB_LIST_ITE                 8                0                0
FLOWS_030000.WWV_FLOW_LIST_TEMPLATES|SUB_LIST_ITE                 8                0                0
FLOWS_030000.WWV_FLOW_LIST_TEMPLATES|SUB_TEMPLATE                 8                0                0
FLOWS_030000.WWV_FLOW_LIST_TEMPLATES|SUB_TEMPLATE                 8                0                0
FLOWS_030000.WWV_FLOW_PAGE_GENERIC_ATTR|ATTRIBUTE                44                0                0
FLOWS_030000.WWV_FLOW_PAGE_PLUGS|PLUG_SOURCE                  3,126                0                0
FLOWS_030000.WWV_FLOW_PAGE_PLUG_TEMPLATES|TEMPLAT               139                0                0
FLOWS_030000.WWV_FLOW_PAGE_PLUG_TEMPLATES|TEMPLAT                80                0                0
FLOWS_030000.WWV_FLOW_PROCESSING|PROCESS_SQL_CLOB                43                0                0
FLOWS_030000.WWV_FLOW_ROW_TEMPLATES|ROW_TEMPLATE1                44                0                0
FLOWS_030000.WWV_FLOW_ROW_TEMPLATES|ROW_TEMPLATE2                 8                0                0
FLOWS_030000.WWV_FLOW_ROW_TEMPLATES|ROW_TEMPLATE3                 2                0                0
FLOWS_030000.WWV_FLOW_SHORTCUTS|SHORTCUT                         38                0                0
FLOWS_030000.WWV_FLOW_STEPS|HELP_TEXT                         1,404                0                0
FLOWS_030000.WWV_FLOW_STEPS|HTML_PAGE_HEADER                    227                0                0
FLOWS_030000.WWV_FLOW_STEP_PROCESSING|PROCESS_SQL             1,927                0                0
FLOWS_030000.WWV_FLOW_TEMPLATES|BOX                              58                0                0
FLOWS_030000.WWV_FLOW_TEMPLATES|FOOTER_TEMPLATE                  58                0                0
FLOWS_030000.WWV_FLOW_TEMPLATES|HEADER_TEMPLATE                  58                0                0
SYSMAN.MGMT_IP_ELEM_DEFAULT_PARAMS|VALUE                        130                0                0
SYSMAN.MGMT_IP_REPORT_ELEM_PARAMS|VALUE                       1,137                0                0
SYSMAN.MGMT_IP_SQL_STATEMENTS|SQL_STATEMENT                      31                0                0
-------------------------------------------------- ---------------- ---------------- ----------------


[Indexes to be Rebuilt]


USER.INDEX on USER.TABLE(COLUMN)
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
############################################################
               CHANGE CHARACTERSET
############################################################


SQL> ALTER DATABASE CHARACTER SET INTERNAL_USE AL32UTF8;


Database altered.


SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup


PARAMETER                      VALUE
------------------------------ ----------------------------------------
NLS_CSMIG_SCHEMA_VERSION       5
NLS_LANGUAGE                   AMERICAN
NLS_TERRITORY                  AMERICA
NLS_CURRENCY                   $
NLS_ISO_CURRENCY               AMERICA
NLS_NUMERIC_CHARACTERS         .,
NLS_CHARACTERSET               AL32UTF8          <----- 
NLS_CALENDAR                   GREGORIAN
NLS_DATE_FORMAT                DD-MON-RR
NLS_DATE_LANGUAGE              AMERICAN
NLS_SORT                       BINARY
NLS_TIME_FORMAT                HH.MI.SSXFF AM
NLS_TIMESTAMP_FORMAT           DD-MON-RR HH.MI.SSXFF AM
NLS_TIME_TZ_FORMAT             HH.MI.SSXFF AM TZR
NLS_TIMESTAMP_TZ_FORMAT        DD-MON-RR HH.MI.SSXFF AM TZR
NLS_DUAL_CURRENCY              $
NLS_COMP                       BINARY
NLS_LENGTH_SEMANTICS           BYTE
NLS_NCHAR_CONV_EXCP            FALSE
NLS_NCHAR_CHARACTERSET         AL16UTF16
NLS_RDBMS_VERSION              11.1.0.7.0