- 论坛徽章:
- 0
|
spawn telnet 172.16.8.228
Trying...
Connected to 172.16.8.228.
Escape character is '^]'.
Local flow control on
Telnet TERMINAL-SPEED option ON
HP-UX vm-qw02 B.11.31 U ia64 (te)
login: ucapes
Password:
Last successful login: Thu Jul 5 15:29:15 EAT 2012 172.16.8.229
Last authentication failure: Thu Jul 5 10:32:08 EAT 2012 ::ffff:172.16.8.227
Please wait...checking for disk quotas
(c)Copyright 1983-2006 Hewlett-Packard Development Company, L.P.
(c)Copyright 1979, 1980, 1983, 1985-1993 The Regents of the Univ. of California
(c)Copyright 1980, 1984, 1986 Novell, Inc.
(c)Copyright 1986-2000 Sun Microsystems, Inc.
(c)Copyright 1985, 1986, 1988 Massachusetts Institute of Technology
(c)Copyright 1989-1993 The Open Software Foundation, Inc.
(c)Copyright 1990 Motorola, Inc.
(c)Copyright 1990, 1991, 1992 Cornell University
(c)Copyright 1989-1991 The University of Maryland
(c)Copyright 1988 Carnegie Mellon University
(c)Copyright 1991-2006 Mentat Inc.
(c)Copyright 1996 Morning Star Technologies, Inc.
(c)Copyright 1996 Progressive Systems, Inc.
Confidential computer software. Valid license from HP required for
possession, use or copying. Consistent with FAR 12.211 and 12.212,
Commercial Computer Software, Computer Software Documentation, and
Technical Data for Commercial Items are licensed to the U.S. Government
under vendor's standard commercial license.
You have mail.
$ ssh ucapes\@172.16.8.228
Password:
Last successful login: Thu Jul 5 15:30:03 2012 vm-qw02
Last authentication failure: Thu Jul 5 10:32:08 2012 ::ffff:172.16.8.227
Last login: Thu Jul 5 15:30:11 2012 from 172.16.8.227
(c)Copyright 1983-2006 Hewlett-Packard Development Company, L.P.
(c)Copyright 1979, 1980, 1983, 1985-1993 The Regents of the Univ. of California
(c)Copyright 1980, 1984, 1986 Novell, Inc.
(c)Copyright 1986-2000 Sun Microsystems, Inc.
(c)Copyright 1985, 1986, 1988 Massachusetts Institute of Technology
(c)Copyright 1989-1993 The Open Software Foundation, Inc.
(c)Copyright 1990 Motorola, Inc.
(c)Copyright 1990, 1991, 1992 Cornell University
(c)Copyright 1989-1991 The University of Maryland
(c)Copyright 1988 Carnegie Mellon University
(c)Copyright 1991-2006 Mentat Inc.
(c)Copyright 1996 Morning Star Technologies, Inc.
(c)Copyright 1996 Progressive Systems, Inc.
Confidential computer software. Valid license from HP required for
possession, use or copying. Consistent with FAR 12.211 and 12.212,
Commercial Computer Software, Computer Software Documentation, and
Technical Data for Commercial Items are licensed to the U.S. Government
under vendor's standard commercial license.
You have mail.
$ ssh ucapes\@172.16.8.229
Password:
Last successful login: Thu Jul 5 15:30:09 2012 172.16.8.228
Last authentication failure: Thu Jul 5 14:37:50 2012 172.16.8.228
Last login: Thu Jul 5 15:30:21 2012 from 172.16.8.228
(c)Copyright 1983-2006 Hewlett-Packard Development Company, L.P.
(c)Copyright 1979, 1980, 1983, 1985-1993 The Regents of the Univ. of California
(c)Copyright 1980, 1984, 1986 Novell, Inc.
(c)Copyright 1986-2000 Sun Microsystems, Inc.
(c)Copyright 1985, 1986, 1988 Massachusetts Institute of Technology
(c)Copyright 1989-1993 The Open Software Foundation, Inc.
(c)Copyright 1990 Motorola, Inc.
(c)Copyright 1990, 1991, 1992 Cornell University
(c)Copyright 1989-1991 The University of Maryland
(c)Copyright 1988 Carnegie Mellon University
(c)Copyright 1991-2006 Mentat Inc.
(c)Copyright 1996 Morning Star Technologies, Inc.
(c)Copyright 1996 Progressive Systems, Inc.
Confidential computer software. Valid license from HP required for
possession, use or copying. Consistent with FAR 12.211 and 12.212,
Commercial Computer Software, Computer Software Documentation, and
Technical Data for Commercial Items are licensed to the U.S. Government
under vendor's standard commercial license.
You have mail.
$ export PS1='<ucapes/>'
<ucapes/>===================select a from t where b=''dfsdf好的''===============
export NLS_LANG='AMERICAN_AMERICA.ZHS16GBK'
echo ...........sql start...........
<ucapes/>...........sql start...........
<ucapes/>sqlplus -S ucapes/ucapes\@capes227 <<EOF
> SET line 255
> SET FEED off
> set serveroutput on size 1000000
> declare
> v_cursor integer;
> v_desc_tab dbms_sql.desc_tab;
> v_rows integer;
> v_value varchar2(1024);
> begin
> v_cursor := dbms_sql.open_cursor;
> dbms_sql.parse(v_cursor, 'select a from t where b=''dfsdf:C5D''', dbms_sql.native);
> dbms_sql.define_column(v_cursor, 1, v_value,1024);
> v_rows := dbms_sql.execute(v_cursor);
> if dbms_sql.fetch_rows(v_cursor) > 0 then
> dbms_sql.column_value(v_cursor, 1, v_value);
> dbms_output.put_line(v_value);
> else
> dbms_output.put_line(SQLERRM);
> end if;
> dbms_sql.close_cursor(v_cursor);
> exception
> when others then
> dbms_sql.close_cursor(v_cursor);
> dbms_output.put_line(SQLERRM);
> end;
> /
> exit
> EOF
ORA-0000: normal, successful completion
<ucapes/>echo ...........cmd end...........
...........cmd end...........
<ucapes/>exit
exit
logout
Connection to 172.16.8.229 closed.
$ exit
logout
Connection to 172.16.8.228 closed.
$ exit
logout
Connection closed by foreign host.
以上是我的输出日志,puts出来的中文时正常的,在exp_send时产生了乱码。其中 dfsdf好的 变成了 dfsdf:C5D
主机的字符集设置的是 LANG=zh_CN.hp15CN 请大侠么告之我,也试图用iconv转编码 不过不成功 |
|