网站首页
JSP空间
动态资讯
开源项目
技术文档
资源下载
J2EE资源
客户论坛
在线支付
 
  技术文档>>数据库技术>>Oracle技术>>Oracle开发>查看文档  
  如何使用oracle提供的字符扫描工具csscan     
  文章作者:未知  文章来源:赛迪网技术社区  
  查看:126次  录入:管理员--2008-03-06  
 

使用oracle提供的字符扫描工具csscan的步骤:

1.首先以sys用户身份创建相应数据字典对象:

$sqlplus /nolog
sql>conn / as sysdba
sql>@@?/rdbms/admin/csminst.sql
sql>exit

2.执行csscan符集扫描工具:

详细的帮助说明可以执行csscan help=y来查看。

$csscan system/password full=y tochar=utf8 array=1024000 process=3

3.检查扫描后的出错信息。

$ls -al |grep scan
$cat scan.err|more

详细的执行记录:

[ora10g]~$ csscan help=y


character set scanner v2.1 : release 10.2.0.0.0 - 
production on wed mar 14 13:50:43 2007

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: 

example: csscan system/manager 

or, you can control how scanner runs by 
entering the csscan command 
followed by various parameters. 
to specify parameters, you use keywords: 

example: csscan system/manager full=y 
tochar=utf8 array=1024000 process=3 

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.

[oracle@szvsx017:/opt/oracle/db920/bin]
[ora10g]~$ sqlplus /nolog

sql*plus: release 10.2.0.1.0 - production on 
wed mar 14 13:51:00 2007

copyright (c) 1982, 2005, oracle. all rights reserved.

sql> !
$ csscan system full=y tochar=utf8 array=1024000 process=3 


character set scanner v2.1 : release 10.2.0.0.0 - 
production on wed mar 14 13:51:33 2007

copyright (c) 1982, 2005, oracle. all rights reserved.


password: 

connected to:
oracle database 10g enterprise edition release 
10.2.0.1.0 - 64bit production
with the partitioning, olap and data mining 
options
css-00107: character set migration utility 
schema not installed

scanner terminated unsuccessfully.
$ exit

sql> conn / as sysdba
connected.
sql> @?/rdbms/admin/csminst.sql
grant read on directory log_file_dir to system
*
error at line 1:
ora-22930: directory does not exist


grant read on directory data_file_dir to system
*
error at line 1:
ora-22930: directory does not exist


drop user csmig cascade
*
error at line 1:
ora-01918: user 'csmig' does not exist


please create password for user csmig:
enter value for csmig_passwd: p2ssw0rd
user created.


grant succeeded.


grant succeeded.


grant succeeded.


grant succeeded.


grant succeeded.


grant succeeded.


grant succeeded.


grant succeeded.


grant succeeded.


grant succeeded.


user altered.


1 row created.


1 row updated.


table created.

drop public synonym csm$parameters
*
error at line 1:
ora-01432: public synonym to be dropped does not exist


synonym created.


grant succeeded.


table created.

drop public synonym csm$query
*
error at line 1:
ora-01432: public synonym to be dropped does not exist


synonym created.


grant succeeded.


table created.

drop public synonym csm$tables
*
error at line 1:
ora-01432: public synonym to be dropped does not exist


synonym created.


grant succeeded.


table created.

drop public synonym csm$columns
*
error at line 1:
ora-01432: public synonym to be dropped does not exist


synonym created.


grant succeeded.


table created.

drop public synonym csm$extables
*
error at line 1:
ora-01432: public synonym to be dropped does not exist


synonym created.


grant succeeded.


table created.

drop public synonym csm$errors
*
error at line 1:
ora-01432: public synonym to be dropped does not exist


synonym created.


grant succeeded.


table created.

drop public synonym csm$langid
*
error at line 1:
ora-01432: public synonym to be dropped does not exist


synonym created.


grant succeeded.


table created.

drop public synonym csm$charsetid
*
error at line 1:
ora-01432: public synonym to be dropped does not exist


synonym created.


grant succeeded.


table created.

drop public synonym csm$indexes
*
error at line 1:
ora-01432: public synonym to be dropped does not exist


synonym created.


grant succeeded.


table created.

drop public synonym csm$constraints
*
error at line 1:
ora-01432: public synonym to be dropped does not exist


synonym created.


grant succeeded.


table created.

drop public synonym csm$triggers
*
error at line 1:
ora-01432: public synonym to be dropped does not exist


synonym created.


grant succeeded.


table created.

drop public synonym csm$dictusers
*
error at line 1:
ora-01432: public synonym to be dropped does not exist


synonym created.


grant succeeded.


13 rows created.


view created.

drop public synonym csmv$tables
*
error at line 1:
ora-01432: public synonym to be dropped does not exist


synonym created.


view created.

drop public synonym csmv$columns
*
error at line 1:
ora-01432: public synonym to be dropped does not exist


synonym created.


view created.

drop public synonym csmv$errors
*
error at line 1:
ora-01432: public synonym to be dropped does not exist


synonym created.


view created.

drop public synonym csmv$indexes
*
error at line 1:
ora-01432: public synonym to be dropped does not exist


synonym created.


view created.

drop public synonym csmv$constraints
*
error at line 1:
ora-01432: public synonym to be dropped does not exist


synonym created.


view created.

drop public synonym csmv$triggers
*
error at line 1:
ora-01432: public synonym to be dropped does not exist


synonym created.


view created.


view created.


commit complete.

disconnected from oracle database 10g enterprise 

edition release 10.2.0.1.0 - 64bit production

with the partitioning, olap and data mining options

[oracle@szvsx017:/opt/oracle/db920/bin]

[ora10g]~$ csscan system full=y tochar=utf8 
array=1024000 process=3 


character set scanner v2.1 : release 10.2.0.0.0 - 
production on wed mar 14 13:51:33 2007

copyright (c) 1982, 2005, oracle. all rights reserved.


password: 

connected to:
oracle database 10g enterprise edition release 10.2.0.1.0 - 64bit production
with the partitioning, olap and data mining options

enumerating tables to scan...
. process 3 scanning sys.trusted_list$[aaaabfaabaaaalraaa]
. process 1 scanning sys._default_auditing_options_[aaaacpaabaaaaqxaaa]
. process 3 scanning sys.tabpart$[aaaaekaabaaaahraaa]
. process 1 scanning sys.indop$[aaaaf/aabaaaauhaaa]
. process 1 scanning sys.rls_sc$[aaaag5aabaaaa1xaaa]
. process 3 scanning sys.cdc_propagated_sets$[aaaaiaaabaaabc5aaa]
. process 1 scanning sys.aw$[aaaajcaabaaabhpaaa]
. process 3 scanning sys.streams$_rules[aaaaj9aabaaabm5aaa]
. process 1 scanning sys.dir$instance_actions[aaaal/aadaaaafxaaa]
. process 3 scanning sys.rule_map$[aaabflaabaaacrpaaa]
. process 1 scanning sys.scheduler$_jobqtab[aaabplaabaaactraaa]
. process 3 scanning sys.logmnrg_ts$[aaabxyaabaaadjxaaa]


. process 3 scanning sys.trusted_list$[aaaabfaabaaaalraaa]
. process 1 scanning sys._default_auditing_options_[aaaacpaabaaaaqxaaa]
. process 3 scanning sys.tabpart$[aaaaekaabaaaahraaa]
. process 1 scanning sys.indop$[aaaaf/aabaaaauhaaa]
. process 1 scanning sys.rls_sc$[aaaag5aabaaaa1xaaa]
. process 3 scanning sys.cdc_propagated_sets$[aaaaiaaabaaabc5aaa]
. process 1 scanning sys.aw$[aaaajcaabaaabhpaaa]
. process 3 scanning sys.streams$_rules[aaaaj9aabaaabm5aaa]
. process 1 scanning sys.dir$instance_actions[aaaal/aadaaaafxaaa]
. process 3 scanning sys.rule_map$[aaabflaabaaacrpaaa]
. process 1 scanning sys.scheduler$_jobqtab[aaabplaabaaactraaa]
. process 3 scanning sys.logmnrg_ts$[aaabxyaabaaadjxaaa]
. process 3 scanning sysman.mgmt_created_users[aaamrvaadaaagppaaa]
. process 1 scanning sysman.mgmt_policy_params[aaamn2aadaaagpbaaa]
. process 1 scanning sysman.mgmt_credential_types[aaamllaadaaaf6haaa]
. process 3 scanning sysman.mgmt_bcn_avail_log[aaamkjaadaaaf1xaaa]
. process 1 scanning sysman.mgmt_hc_fs_mount_details[aaamnzaadaaaglzaaa]
. process 3 scanning sysman.mgmt_hc_cpu_details[aaamnraadaaagkzaaa]
. process 1 scanning sysman.mgmt_inv_patch[aaammsaadaaagchaaa]
. process 3 scanning sysman.mgmt_job_output[aaampxaadaaagejaaa]
. process 1 scanning sysman.mgmt_ecm_csa_snapshot_info[aaamohaadaaagrjaaa]
. process 3 scanning sysman.mgmt_db_latest_hdm_findings[aaam0taadaaahhxaaa]
. process 1 scanning sysman.mgmt_privs[aaamrgaadaaagozaaa]
. process 3 scanning system.logmnr_ts$[aaabcfaadaaaafpaaa]
. process 1 scanning sys.wrh$_tablespace_stat[aaacvyaadaaaa/5aaa]
. process 3 scanning system.logmnr_user$[aaabclaadaaaayraaa]
. process 1 scanning sys.wrh$_parameter[aaacvfaadaaaa5raaa]
. process 3 scanning sys.wrh$_sgastat[aaacu9aadaaaa1raaa]
ora-00904: "sys_nc00009$": invalid identifier
css-00144: failed to scan table xdb.xdb$acl


creating database scan summary report...

creating individual exception report...

scanner terminated successfully.
[oracle@szvsx017:/opt/oracle/db920/bin]
[ora10g]~$

然后我们可以检查输出的日志来查看数据库扫描情况: 

[ora10g]~$ ll -st|grep scan
total 1066404
4 -rw-rw-r-- 1 oracle dba 1357 mar 14 13:55 scan.err
148 -rw-rw-r-- 1 oracle dba 74427 mar 14 13:55 scan.out
12 -rw-rw-r-- 1 oracle dba 5700 mar 14 13:55 scan.txt

[ora10g]~$ cat scan.err
database scan individual exception report


[database scan parameters]

parameter value 
------------------------------ ----------------------
csscan version v2.1 
instance name ora10g 
database version 10.2.0.1.0 
scan type full database 
scan char data? yes 
database character set al32utf8 
fromchar al32utf8 
tochar utf8 
scan nchar data? no 
array fetch buffer size 1024000 
number of processes 3 
capture convertible data? no 
------------------------------ -----------------------
[data dictionary individual exceptions]


[application data individual exceptions]

[ora10g]~$

 
 
上一篇: 对一些代码加密后再放到oracle数据库中    下一篇: 详细讲解oracle中isnumeric的三种实现
  相关文档
客户端不安装 Oracle 也可以连接数据库 08-05
用一个示例讲解自治事务和非自治事务的区别 07-25
用Oracle 10g新的行时间戳捕捉变化 04-11
数据库Oracle 11g Alert Log 的新变化 09-01
oracle的共享封锁 独占封锁和共享更新封锁 (1) 05-28
Oracle9i与SYBASE ASE12.5相比的几个不足 08-05
解析:怎样屏蔽oracle中的英文提示信息 11-19
细化解析:oracle 10g的统计信息工具awr 11-15
有关Oracle数据库中并行处理技术剖析 04-11
细化解析:Oracle数据库后台进程的功能 09-01
oracle数据库中管理表空间和数据文件 (1) 04-24
oracle数据库中如何使用超过2g的内存 03-31
在suse中让其他用户也能运行oracle命令 03-06
Oracle数据库物理文件空间设置方法 04-12
Oracle和MySQL的一些简单命令对比 04-11
Oracle中用脚本跟踪存储过程实例讲解 04-11
更改oracle用户名及外部用户验证的授权问题 02-28
rac环境中查询不到其他实例执行的sql 02-27
oracle数据库9i dataguard的安装与维护 06-10
要求例程恢复,无法设置archivelog模式 03-03
返回首页 | 关于我们 | J网章程 | JSP空间合租 | 客服中心 | 免责声明 | 常见问题 | 参观机房
本站主机空间代理至厦门市华众网络科技有限公司
《中华人民共和国增值电信业务经营许可证》
编号:闽B2-20050079
@2005-2008福建JSP技术网 版权所有 闽ICP备05000928号
厦门(总部):13616026886 福州:0591-87655121
邮箱:admin@fjjsp.com 站长QQ,点击这里给我发消息