ITPUB??ì3
2010数据库技术大会
ITPUB论坛 » Oracle数据库管理 » 是不是原因字符集

您有 2 条公共消息
  • 来自: 公共消息 标题: 新开"PLM/PDM产品 ... 内容: 讨论范围包括:产品研发管理(PDM),产品生命周期管理(PLM),工艺/ ...
  • 来自: 公共消息 标题: 2010数据库技术大 ... 内容: “2010数据库技术大会”将于2010年4月2日~4月3日,在北京歌华开元大酒 ...

    标题: 是不是原因字符集
    离线 missroad20
    初级会员



    精华贴数 0
    个人空间 0
    技术积分 26 (52692)
    社区积分 0 (644014)
    注册日期 2005-9-27
    论坛徽章:0
          
          

    发表于 2005-10-17 18:07 
    是不是原因字符集

    从其它数据库备份出来的dmp,导入到本数据库时发现所有的表名为中文的表都没有导进来,而且如果存储过程中用到中文表时,导过来时表名变为????,乱码!
    同样的道理如果从本机导出dmp,如果表名为中文的话,导的时候显示为I_????(本来为I_光缆接头),这些表根本导不出来!
    用select  *  from  V$NLS_PARAMETERS;查看发现:
    NLS_LANGUAGE------AMERICAN,
    NLS_TERRITORY----AMERICA,
    NLS_DATE_LANGUAGE---AMERICAN,

    NLS_CHARACTERSET却是ZHS16GBK,
    总觉得有点不对!
    请问各位大哥大姐这个问题如何解决!不胜感激!
    谢谢!
    紧急!


    只看该作者    顶部
    离线 zflying2000
    该如何选择呢?


    精华贴数 0
    个人空间 30
    技术积分 1884 (1065)
    社区积分 521 (1717)
    注册日期 2003-4-9
    论坛徽章:8
    会员2006贡献徽章每日论坛发贴之星    
          

    发表于 2005-10-17 18:38 
    查看一下备份文件的文件头。或者你的导入日志应该可以看出来原来的数据库字符集!


    __________________
    ---------------------------------------------------------------
    MSN GROUP:oracle.dba.china@hotmail.com
    电信相关群:2596683 只添加从事电信相关的人,请自觉!
    -----------------------------
    越学习越发现自己无知.很困惑!学习学习在学习...
    -----------------------------
    不懂不懂真不懂!!
    ---------------------------
    只看该作者    顶部
    离线 missroad2004
    初级会员



    精华贴数 0
    个人空间 0
    技术积分 26 (52692)
    社区积分 0 (644014)
    注册日期 2005-9-27
    论坛徽章:0
          
          

    发表于 2005-10-18 10:39 
    我看了一下备份日志!是这样的:
    连接到: Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production
    With the Partitioning, OLAP and Oracle Data Mining options
    JServer Release 9.2.0.1.0 - Production
    已导出 ZHS16GBK 字符集和 AL16UTF16 NCHAR 字符集
    那是不是说我用的备份的dmp文件字符集是ZHS16GBK ,与我现在的是一样啊!为什么中文表名导不进去!


    只看该作者    顶部
    离线 eygle
    天下有雪


    精华贴数 65
    个人空间 0
    技术积分 207914 (1)
    社区积分 6464 (302)
    注册日期 2001-10-8
    论坛徽章:81
    现任管理团队成员2007年度ITPUB杰出贡献年度精华徽章ITPUB元老ITPUB维基人2009架构师大会纪念徽章
    参与2009年中国云计算大会纪念ITPUB北京2009年会纪念徽章八级虎吧徽章2010新春纪念徽章生肖徽章2007版:鸡祖国60周年纪念徽章

    发表于 2005-10-18 11:27 
    不建议使用中文表名,俺是从来没有用过
    不过测试一下也是没有问题的,请看
    PHP code:


    SQL
    create table 测试 as select username from dba_users;



    Table created.



    Elapsed00:00:00.08

    SQL
    select from 测试;



    USERNAME

    ------------------------------

    SYS

    SYSTEM

    OUTLN

    EYGLE

    CSMIG

    TEST

    REPADMIN

    SCOTT

    CJH

    CJWEE

    MLQIN



    USERNAME

    ------------------------------

    DBSNMP

    WMSYS



    13 rows selected
    .



    Elapsed00:00:00.00

    SQL
    > !

    [
    oracle@jumper oracle]$ exp eygle/eygle file=a.dmp          



    Export
    Release 9.2.0.4.0 Production on Tue Oct 18 10:58:24 2005



    Copyright 
    (c19822002Oracle Corporation.  All rights reserved.





    Connected toOracle9i Enterprise Edition Release 9.2.0.4.0 Production

    With the Partitioning option

    JServer Release 9.2.0.4.0 
    Production

    Export done in ZHS16GBK character set 
    and AL16UTF16 NCHAR character set



    About to export specified users 
    ...

    exporting pre-schema procedural objects and actions

    exporting foreign function library names for user EYGLE 

    exporting PUBLIC type synonyms

    exporting private type synonyms

    exporting object type definitions for user EYGLE 

    About to export EYGLE
    's objects ...

    . exporting database links

    . exporting sequence numbers

    . exporting cluster definitions

    . about to export EYGLE'
    s tables via Conventional Path ...

    . . 
    exporting table                     PLAN_TABLE          0 rows exported

    . . exporting table                             T1          5 rows exported

    . . exporting table                             T2         13 rows exported

    . . exporting table                           测试         13 rows exported

    exporting synonyms

    exporting views

    exporting stored procedures

    exporting operators

    exporting referential integrity constraints

    exporting triggers

    exporting indextypes

    exporting bitmapfunctional and extensible indexes

    exporting posttables actions

    exporting materialized views

    exporting snapshot logs

    exporting job queues

    exporting refresh groups and children

    exporting dimensions

    exporting post-schema procedural objects and actions

    exporting statistics

    Export terminated successfully without warnings
    .

    [
    oracle@jumper oracle]$ exit

    exit



    SQLdrop table 测试

      2  
    /



    Table dropped.



    Elapsed00:00:00.36

    SQL


    SP2
    -0042unknown command "" - rest of line ignored.

    SQL> !

    [
    oracle@jumper oracle]$ imp eygle/eygle file=a.dmp tables=测试



    Import
    Release 9.2.0.4.0 Production on Tue Oct 18 10:59:03 2005



    Copyright 
    (c19822002Oracle Corporation.  All rights reserved.





    Connected toOracle9i Enterprise Edition Release 9.2.0.4.0 Production

    With the Partitioning option

    JServer Release 9.2.0.4.0 
    Production



    Export file created by EXPORT
    :V09.02.00 via conventional path

    import done in ZHS16GBK character set 
    and AL16UTF16 NCHAR character set

    importing EYGLEs objects into EYGLE

    . . importing table                         "测试"         13 rows imported

    Import terminated successfully without warnings
    .

    [
    oracle@jumper oracle]$ exit

    exit



    SQLselect from 测试



    USERNAME

    ------------------------------

    SYS

    SYSTEM

    OUTLN

    EYGLE

    CSMIG

    TEST

    REPADMIN

    SCOTT

    CJH

    CJWEE

    MLQIN



    USERNAME

    ------------------------------

    DBSNMP

    WMSYS



    13 rows selected
    .



    Elapsed00:00:00.01

    SQL
    >




    __________________
    只看该作者    顶部
     
        

    相关内容


    CopyRight 1999-2006 itpub.net All Right Reserved.
    北京皓辰网域网络信息技术有限公司. 版权所有
    E-mail:Webmaster@itpub.net
    网站律师 隐私政策 知识产权声明
    京ICP证:060528号 联系我们