免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
12下一页
最近访问板块 发新帖
查看: 5567 | 回复: 13
打印 上一主题 下一主题

[函数] 急!OCI-SCO UNIX 8i client olog 函数连不上Oracle9i [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2005-03-17 09:02 |显示全部楼层 |倒序浏览
己经搞了好几天了.又遇到如下问题: oci 函数oolog .在sco unix 下安装oracel 8i client 以访问oracle 9i .现己经可以通过sqlplus 来访问9i数据库,[b]但通过OCI 函数.olog来连接的时候,总是"log out!",如下代码,
if(olog(&lda1,&hda,(text *)uid,-1,(text *)passwd,-1,(text *)0,-1,OCI_LM_DEF))
{printf(" LOG OUT!!";}
经测试:1) 如果以此环境来连接oracle 7数据库,可以正常调用.
           2) 将此段程序放在oracle 9i客户端来访问oracle 7i数据库,也可以正常调用.


肯高手赐教!!!!!!

论坛徽章:
0
2 [报告]
发表于 2005-03-17 10:25 |显示全部楼层

急!OCI-SCO UNIX 8i client olog 函数连不上Oracle9i

oci 8 的 函数OCIlogon 也试了,不行。急!!!!

论坛徽章:
0
3 [报告]
发表于 2005-03-17 10:46 |显示全部楼层

急!OCI-SCO UNIX 8i client olog 函数连不上Oracle9i

希望能马上你联系一下。我的电话13810362442(北京)。你打一下,我不接,给你打过去。谢谢/!

论坛徽章:
0
4 [报告]
发表于 2005-03-17 11:00 |显示全部楼层

急!OCI-SCO UNIX 8i client olog 函数连不上Oracle9i

源:
打出日志:


uid : glxt@OLD97,passwd : guv14grl
open of async device failed: Permission denied

-- ORACLE error
ORA-01034: ORACLE not available

log on failed!

论坛徽章:
0
5 [报告]
发表于 2005-03-17 11:19 |显示全部楼层

急!OCI-SCO UNIX 8i client olog 函数连不上Oracle9i

通过悠改chmod 777 /dev/async 权限,错误"open of async device failed: Permission denied"己经不报了,但是-- ORACLE error
ORA-01034: ORACLE not available ,仍报.,郁闷中。!!

论坛徽章:
0
6 [报告]
发表于 2005-03-17 11:47 |显示全部楼层

急!OCI-SCO UNIX 8i client olog 函数连不上Oracle9i

重新登陆仍然不行。

论坛徽章:
0
7 [报告]
发表于 2005-03-17 12:17 |显示全部楼层

急!OCI-SCO UNIX 8i client olog 函数连不上Oracle9i

//                if(olog(&lda1,&hda,(text *)uid,-1,(text *)passwd,-1,(text *)0,-1,OCI_LM_DEF))
                if(olog(&lda1,(ub1 *)hda,(text *)user,-1,(text *)passwd,-1,(text *)0, -1,(ub4)OCI_LM_DEF))
                {

                        err_report((Cda_Def *)&lda1);
                        printf("log on failed!\n";
                        free(dblink);

                        dblink=NULL;
                        return dblink;
                }
这是此段代码。后来的测试都是基于你的代码得到的结果。

论坛徽章:
0
8 [报告]
发表于 2005-03-17 12:23 |显示全部楼层

急!OCI-SCO UNIX 8i client olog 函数连不上Oracle9i

如果用我以前的代码:                if(olog(&lda1,&hda,(text *)uid,-1,(text *)passwd,-1,(text *)0,-1,OCI_LM_DEF))会得到如下错误:
ORA-12154: TNS:could not resolve service name

论坛徽章:
0
9 [报告]
发表于 2005-03-17 13:46 |显示全部楼层

急!OCI-SCO UNIX 8i client olog 函数连不上Oracle9i

我使用的非本机数据库:
                printf("user :%s uid : %s,passwd : %s\n",user,uid,passwd);
                if(olog(&lda1,(ub1 *)hda,(text *)user,-1,(text *)passwd,-1,(text *)uid, -1,(ub4)OCI_LM_DEF))
                {

                        err_report((Cda_Def *)&lda1);
                        printf("log on failed!\n";
                        free(dblink);

                        dblink=NULL;
                        return dblink;
                }

结果:
user :new97test uid : @CFNEW97,passwd : new97test

-- ORACLE error
ORA-12154: TNS:could not resolve service name


看来还是不行。

论坛徽章:
0
10 [报告]
发表于 2005-03-17 14:13 |显示全部楼层

急!OCI-SCO UNIX 8i client olog 函数连不上Oracle9i

ok 我再试一下。
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP