Python论坛  - 讨论区

标题:[python-chinese] 请教:python连接Oracle的问题

2005年09月19日 星期一 20:37

martin.xus martin.xus at gmail.com
Mon Sep 19 20:37:05 HKT 2005

我想用python去处理oracle的数据,可是我今天下了个DCOracle2却一直用不了?


>>> import DCOracle2
这个没试成功。
>>> dbc=DCOracle2.Connect("etasadmin/etasadmin at etas")
Traceback (most recent call last):
File "", line 1, in ?
File "DCOracle2\DCOracle2.py", line 166, in connect
db = dco2.connect(u, p, dbname)
dco2.DatabaseError: (12154, 'ORA-12154: TNS: 
\xce\xde\xb7\xa8\xb4\xa6\xc0\xed\xb
7\xfe\xce\xf1\xc3\xfb')


然后我按jdbc的样式又试了一下,可是还没有成功。
>>> dbc=DCOracle2.Connect("etasadmin/etasadmin at 192.168.0.160:1521:etas")
Traceback (most recent call last):
File "", line 1, in ?
File "DCOracle2\DCOracle2.py", line 166, in connect
db = dco2.connect(u, p, dbname)
dco2.DatabaseError: (6401, 'ORA-06401: NETCMN: 
\xce\xde\xd0\xa7\xb5\xc4\xc7\xfd\
xb6\xaf\xb3\xcc\xd0\xf2\xd6\xb8\xca\xbe\xb7\xfb')

不明白这个错误怎么回事。


还有问一下,访问oracle还有别的好的lib吗?
各位给点建议?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.exoweb.net/pipermail/python-chinese/attachments/20050919/f4829173/attachment-0001.html

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2005年09月19日 星期一 20:46

张骏 zhangj at foreseen-info.com
Mon Sep 19 20:46:00 HKT 2005

用cx_Oracle
http://sourceforge.net/projects/cx-oracle/
----------------------- Original Message -----------------------
From:    "martin.xus" <martin.xus at gmail.com>
To:      python-chinese at lists.python.cn
Date:    Mon, 19 Sep 2005 20:37:05 +0800
Subject: [python-chinese] 请教:python连接Oracle的问题?
----------------------------------------------------------------
> 我想用python去处理oracle的数据,可是我今天下了个DCOracle2却一直用不了?
> 
> 
> >>> import DCOracle2
> 这个没试成功。
> >>> dbc=DCOracle2.Connect("etasadmin/etasadmin at etas")
> Traceback (most recent call last):
> File "", line 1, in ?
> File "DCOracle2\DCOracle2.py", line 166, in connect
> db = dco2.connect(u, p, dbname)
> dco2.DatabaseError: (12154, 'ORA-12154: TNS: 
> \xce\xde\xb7\xa8\xb4\xa6\xc0\xed\xb
> 7\xfe\xce\xf1\xc3\xfb')
> 
> 
> 然后我按jdbc的样式又试了一下,可是还没有成功。
> >>> dbc=DCOracle2.Connect("etasadmin/etasadmin at 192.168.0.160:1521:etas")
> Traceback (most recent call last):
> File "", line 1, in ?
> File "DCOracle2\DCOracle2.py", line 166, in connect
> db = dco2.connect(u, p, dbname)
> dco2.DatabaseError: (6401, 'ORA-06401: NETCMN: 
> \xce\xde\xd0\xa7\xb5\xc4\xc7\xfd\
> xb6\xaf\xb3\xcc\xd0\xf2\xd6\xb8\xca\xbe\xb7\xfb')
> 
> 不明白这个错误怎么回事。
> 
> 
> 还有问一下,访问oracle还有别的好的lib吗?
> 各位给点建议?

--------------------- Original Message Ends --------------------


[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2005年09月19日 星期一 20:50

martin.xus martin.xus at gmail.com
Mon Sep 19 20:50:25 HKT 2005

谢谢,我这就去试一下。

On 9/19/05, 张骏 <zhangj at foreseen-info.com> wrote: 
> 
> 用cx_Oracle
> http://sourceforge.net/projects/cx-oracle/
> ----------------------- Original Message -----------------------
> From: "martin.xus" <martin.xus at gmail.com>
> To: python-chinese at lists.python.cn
> Date: Mon, 19 Sep 2005 20:37:05 +0800
> Subject: [python-chinese] 请教:python连接Oracle的问题?
> ----------------------------------------------------------------
> > 我想用python去处理oracle的数据,可是我今天下了个DCOracle2却一直用不了?
> >
> >
> > >>> import DCOracle2
> > 这个没试成功。
> > >>> dbc=DCOracle2.Connect("etasadmin/etasadmin at etas")
> > Traceback (most recent call last):
> > File "", line 1, in ?
> > File "DCOracle2\DCOracle2.py", line 166, in connect
> > db = dco2.connect(u, p, dbname)
> > dco2.DatabaseError: (12154, 'ORA-12154: TNS:
> > \xce\xde\xb7\xa8\xb4\xa6\xc0\xed\xb
> > 7\xfe\xce\xf1\xc3\xfb')
> >
> >
> > 然后我按jdbc的样式又试了一下,可是还没有成功。
> > >>> dbc=DCOracle2.Connect("etasadmin/etasadmin at 192.168.0.160:1521:etas")
> > Traceback (most recent call last):
> > File "", line 1, in ?
> > File "DCOracle2\DCOracle2.py", line 166, in connect
> > db = dco2.connect(u, p, dbname)
> > dco2.DatabaseError: (6401, 'ORA-06401: NETCMN:
> > \xce\xde\xd0\xa7\xb5\xc4\xc7\xfd\
> > xb6\xaf\xb3\xcc\xd0\xf2\xd6\xb8\xca\xbe\xb7\xfb')
> >
> > 不明白这个错误怎么回事。
> >
> >
> > 还有问一下,访问oracle还有别的好的lib吗?
> > 各位给点建议?
> 
> --------------------- Original Message Ends --------------------
> 
> _______________________________________________
> python-chinese list
> python-chinese at lists.python.cn
> http://python.cn/mailman/listinfo/python-chinese
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.exoweb.net/pipermail/python-chinese/attachments/20050919/3218e032/attachment.htm

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

如下红色区域有误,请重新填写。

    你的回复:

    请 登录 后回复。还没有在Zeuux哲思注册吗?现在 注册 !

    Zeuux © 2025

    京ICP备05028076号