Custom Search . . .

Saturday, September 6, 2008

Character set Utilities

Database Character set utilities

The Database character set scanner access the feasibility of migrating an oracle database to new database character set. This database characterset scanner checks all character data in the database & tests for the effects & problem of changing the character set encoding.

The method of migrate the database's character sets.

1. Export & Import utilities.
2. CSALTER Script
3. CSALTER with Export & Import utilities on selected tables.

Scan modes in the Database character set scanner.

1. Full database scan

2. User Scan

3. Table Scan

4. Column Scan

How to Install Chractet set scanner:

1. Create a user named CSMIG

2. Assign the necessary privileges to CSMIG

3. Assign the Default ts to CSMIG

3. Create the character set scanner system tables under CSMIG

Use csminst.sql script to modify default tblespace for CSMIG.

% cd $ORACLE_HOME/rdbms/admin
% sqlplus sys/password as sysdba
SQL> @csminst.sql

C:\Users\Babu>csscan help=y

Character Set Scanner v2.1 : Release - Production on Fri Sep 5 22:41:12 2008

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

You can let Scanner prompt you for parameters by entering the CSSCAN
command followed by your username/password:


Or, you can control how Scanner runs by entering the CSSCAN command
followed by various parameters. To specify parameters, you use keywords:


Keyword Default Prompt Description
---------- ------- ------ -------------------------------------------------
USERID yes username/password
FULL N yes scan entire database
USER yes owner of tables to be scanned
TABLE yes list of tables to scan
COLUMN yes list of columns to scan
EXCLUDE list of tables to exclude from scan
TOCHAR yes new database character set name
FROMCHAR current database character set name
TONCHAR new national character set name
FROMNCHAR current national character set name
ARRAY 1024000 yes size of array fetch buffer
PROCESS 1 yes number of concurrent scan process
MAXBLOCKS split table if block size exceed MAXBLOCKS
CAPTURE N capture convertible data
SUPPRESS maximum number of exceptions logged for each table
FEEDBACK report progress every N rows
BOUNDARIES list of column size boundaries for summary report
LASTRPT N generate report of the last database scan
LOG scan base file name of report files
PARFILE parameter file name
PRESERVE N preserve existing scan results
LCSD N no enable language and character set detection
LCSDDATA LOSSY no define the scope of the detection
HELP N show help screen (this screen)
QUERY N select clause to scan subset of tables or columns
---------- ------- ------ -------------------------------------------------
Scanner terminated successfully.

C:\Users\Babu>csscan system/sys tochar=utf8 user=scott log=D:\scott_scan.log

Character Set Scanner v2.1 : Release - Production on Fri Sep 5 22:49:24 2008

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

Connected to:
Oracle Database 10g Enterprise Edition Release - Production
With the Partitioning, OLAP and Data Mining options

Enter array fetch buffer size: 1024000 >

Enter number of scan processes to utilize(1..32): 1 >

Enumerating tables to scan...

. process 1 scanning SCOTT.MASTER[AAAM7wAAEAAAAGhAAA]
. process 1 scanning SCOTT.DEPT[AAAMgxAAEAAAAAJAAA]
. process 1 scanning SCOTT.BONUS[AAAMg1AAEAAAAApAAA]
. process 1 scanning SCOTT.EMP[AAAMgzAAEAAAAAZAAA]

Creating Database Scan Summary Report...

Creating Individual Exception Report...

Scanner terminated successfully.

No comments: