停止空想

老张的空中之家

存档于 四月, 2009

powerdesigner 生成sql自动加引号的问题

作者:admin 发表时间:四月 - 28 - 2009

下午有同事问,为何在user_constraints 能查出来一个fk,但为何无法删除约束条件-

报错不存在的约束条件,无法删除。

原因:

<网友回复>pd9 以上不版本在生成脚本的时候默认是带有引号的,你看看是不是引号导致的问题,假如是的话,删除那些表重新导下脚本,去掉引号的方法如下:在PDM中右键, 弹出菜单中选择Properties属性选项,然后选择General选项卡,点击DBMS标签右侧那个带小手的图表标记,查看DBMS属性,在弹出的窗 口中选择Script- >SQL- >Format,单击列表中的 “CaseSensitivityUsingQuote ” ,它的值默认为Yes,把它的值更改为No,然后保存.

将fk的名字加上引号就搞定了。

Popularity: 54% [?]

类别:Oracle

9.2.0.8 连接dblink,创建存储过程出错

作者:admin 发表时间:四月 - 27 - 2009

9.2.0.8 连接dblink,创建存储过程出错

SQL> begin
2  select count(*) from t_table where rownum<10;
3  end;
4  /
select count(*) from t_table where rownum<10;
*
ERROR at line 2:
ORA-06550: line 2, column 1:
PL/SQL: ORA-04052: error occurred when looking up remote object
ANBPROD.T_TABLE@ORA9I_LINK
ORA-00604: error occurred at recursive SQL level 1
ORA-03106: fatal two-task communication protocol error
ORA-02063: preceding line from ORA9I_LINK
ORA-06550: line 2, column 1:
PL/SQL: SQL Statement ignored

发现

ORA-00604 ORA-04052 ORA-03106 ORA-02063 With Any PLSQL Call Via Database Link To Remote

发现是一个bug Bug 5671074

Popularity: 50% [?]

类别:Oracle

Excel特殊字符导入Oracle 所带来的问题

作者:admin 发表时间:四月 - 24 - 2009

update table set fa=replace(fa,chr(13),”) ; — 除去回车符
update table set fa=replace(fa,’ ‘,”) ; — 除去空格符

我们的例子

select user_nm,user_code,length(user_code),length(replace(replace(user_code,chr(9),”),’ ‘,”)) from flow_user where length(replace(replace(user_code,chr(9),”),’ ‘,”))!=length(user_code); 阅读全文 »

Popularity: 50% [?]

类别:Oracle