简体   繁体   English

oracle occi连接池报告ORA-00001:违反唯一约束(%s。%s)错误

[英]oracle occi connection pool reports ORA-00001: unique constraint (%s.%s) violated error

I tried below code 我尝试下面的代码

bool Database::initializePool()
    {
        connPool_ = env_->createConnectionPool(userName_, password_, connectString_, minConn_, maxConn_, incrConn_);
        if (!connPool_)
            return false;
        else
            return true;
    }

And it reported the error of : terminate called after throwing an instance of 'oracle::occi::SQLException' what(): ORA-00001: unique constraint (%s.%s) violated 并且它报告了以下错误:抛出'oracle :: occi :: SQLException'what()实例后调用调用终止:ORA-00001:违反了唯一约束(%s。%s)

I guess it maybe because my laptop lost power and shutdown abnormally. 我猜可能是因为我的笔记本电脑掉电并异常关机。 What can I do to make it right? 我该怎么做才能正确?

Thank you. 谢谢。

I exp and deleted and imp the database again. 我exp并删除并再次显示数据库。 so it is solved. 这样就解决了。

We where able to solve identical issuer. 我们在哪里能够解决相同的发行人。

Looks like the occi driver initialises error codes to 1, so every single time the driver "panics" is will look like "ORA-00001: unique constraint (%s.%s) violated" 看起来occi驱动程序将错误代码初始化为1,因此驱动程序每次“恐慌”都将看起来像“ ORA-00001:违反唯一约束(%s。%s)”

In your case the database where returning additional information about password expiration date and that was crashing the driver. 在您的情况下,数据库将返回有关密码到期日期的其他信息,并导致驱动程序崩溃。 Reseting the password fixed the problem. 重置密码解决了该问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM