execute dbms_connection_pool.start_pool(); not able to execute - oracle

I am not able to execute this command, Even I am in system user. I tried with both that is in command prompt even in Oracle SQL developer tool.
When i am executing the below command in System user
execute dbms_connection_pool.start_pool();
I am getting error as
Error starting at line : 1 in command -
EXECUTE DBMS_CONNECTION_POOL.START_POOL()
Error report -
ORA-06550: line 1, column 7:
PLS-00201: identifier 'DBMS_CONNECTION_POOL.START_POOL' must be declared
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
06550. 00000 - "line %s, column %s:\n%s"
*Cause: Usually a PL/SQL compilation error.
*Action:
For your information I am user oracle express 12c

The database resident connection pool (DRCP) reduces the resource requirements of applications that currently don't support connection pooling, either because it is not supported by the application infrastructure, or it has not been implemented. DRCP is only supported for database connections using the OCI driver. The pool is managed using the dbms_connection_pool package. And the operation is started by start_pool procedure.
You can call this procedure in these two ways :
SQL> exec dbms_connection_pool.start_pool( pool_name => 'my_connection_pool');
or
SQL> exec dbms_connection_pool.start_pool;
but not like in the below way :
SQL> exec dbms_connection_pool.start_pool();

I had the same issue
conn / as sysdba
and
exec dbms_connection_pool.start_pool;
worked for me
and
SELECT connection_pool, maxsize
FROM dba_cpool_info;
to get the info about pool

Related

SQL Error: ORA-00904 "SYS"."DBMS_CRYPTO"."HASH": invalid identifier error while updating a table in Oracle12C

Below is the update statement that i am trying to run
update
IFTEST_DBF
set
M_TEST_SIG=lower(sys.dbms_crypto.hash(utl_raw.cast_to_raw(replace(M_A||M_B||M_C||M_D||M_E||M_F,' ','')),3))
where
M_TYPE='PRIMARY'
and M_NEW='Y'
Below is the error while i am updating a table in oracle12c , The same statement used to run very fine in oracle 11g but after migrating it to 12C , i am facing this issue. Am i missing something .
Error at Command Line : 6 Column : 22
Error report -
SQL Error: ORA-00904: "SYS"."DBMS_CRYPTO"."HASH": invalid identifier 00904. 00000 - "%s: invalid identifier"
*Cause:
The DBMS_CRYPTO is a package, which by default, is owned by SYS schema. So, before to use it, you have to grant the execute privilege to the user/schema you are going to use it, e.g.:
GRANT EXECUTE ON dbms_crypto TO "my_schema";

Non useful ORA error when working with KafkaConnect JdbcDriver with Oracle 11g (Strimzi Operator)

I'm using strimzi Kafka operator to work with a Confluent Cluster to achieve an Oracle2Kafka type KafkaConnector with JdbcSourceConnector from confluent.
The KafkaConnector spec
# connector
connection.url: jdbc:oracle:thin:#HOST:PORT/SERVICE
connection.user: USER
connection.password: PASS
dialect.name: OracleDatabaseDialect
topic.prefix: test-topic-
mode: bulk
db.timezone: Europe/Madrid
table.whitelist: TEST_TABLE
But I get the following error in the strimzi-cluster-operator logs.
io.strimzi.operator.cluster.operator.assembly.ConnectRestException: PUT /connectors/confluent-cluster-int-20200706-02/config returned 400 (Bad Request): Connector configuration is invalid and contains the following 2 error(s):
Invalid value java.sql.SQLException: ORA-00604: error occurred at recursive SQL level 1
ORA-06502: PL/SQL: numeric or value error: character string buffer too small
ORA-06512: at line 43
for configuration Couldn't open connection to jdbc:oracle:thin:#***:1534/***
Invalid value java.sql.SQLException: ORA-00604: error occurred at recursive SQL level 1
ORA-06502: PL/SQL: numeric or value error: character string buffer too small
ORA-06512: at line 43
for configuration Couldn't open connection to jdbc:oracle:thin:#***:1534/***
You can also find the above list of errors at the endpoint `/connector-plugins/{connectorType}/config/validate`
at io.strimzi.operator.cluster.operator.assembly.KafkaConnectApiImpl.lambda$null$2(KafkaConnectApi.java:208) ~[io.strimzi.cluster-operator-0.18.0.jar:0.18.0]
If I modify the source I get a much specific stacktrace
2020-07-14 09:33:46,636 ERROR SQLException (io.confluent.connect.jdbc.source.JdbcSourceConnectorConfig) [qtp742672280-21]
java.sql.SQLException: ORA-00604: error occurred at recursive SQL level 1
ORA-06502: PL/SQL: numeric or value error: character string buffer too small
ORA-06512: at line 43
at oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:509)
at oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:456)
at oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:451)
at oracle.jdbc.driver.T4CTTIfun.processError(T4CTTIfun.java:1123)
at oracle.jdbc.driver.T4CTTIoauthenticate.processError(T4CTTIoauthenticate.java:552)
at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:553)
at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:269)
at oracle.jdbc.driver.T4CTTIoauthenticate.doOAUTH(T4CTTIoauthenticate.java:501)
at oracle.jdbc.driver.T4CTTIoauthenticate.doOAUTH(T4CTTIoauthenticate.java:1292)
at oracle.jdbc.driver.T4CTTIoauthenticate.doOAUTH(T4CTTIoauthenticate.java:1025)
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:747)
at oracle.jdbc.driver.PhysicalConnection.connect(PhysicalConnection.java:793)
at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:57)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:747)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:562)
at java.sql.DriverManager.getConnection(DriverManager.java:664)
at java.sql.DriverManager.getConnection(DriverManager.java:208)
at io.confluent.connect.jdbc.dialect.GenericDatabaseDialect.getConnection(GenericDatabaseDialect.java:223)
at io.confluent.connect.jdbc.source.JdbcSourceConnectorConfig$TableRecommender.validValues(JdbcSourceConnectorConfig.java:606)
at io.confluent.connect.jdbc.source.JdbcSourceConnectorConfig$CachingRecommender.validValues(JdbcSourceConnectorConfig.java:653)
at org.apache.kafka.common.config.ConfigDef.validate(ConfigDef.java:607)
at org.apache.kafka.common.config.ConfigDef.validate(ConfigDef.java:622)
at org.apache.kafka.common.config.ConfigDef.validate(ConfigDef.java:530)
at org.apache.kafka.common.config.ConfigDef.validateAll(ConfigDef.java:513)
at org.apache.kafka.common.config.ConfigDef.validate(ConfigDef.java:495)
at org.apache.kafka.connect.connector.Connector.validate(Connector.java:135)
Some things I already checked
KafkaConnect image is a self-made one with the required addons for the JdbcSourceConnector with an OracleDriver
Dockerfile
FROM strimzi/kafka:0.18.0-kafka-2.5.0
USER root:root
COPY ./kafka-connect-jdbc-5.4.0.jar /opt/kafka/plugins/
COPY ./ojdbc6.jar /opt/kafka/libs/
USER 1001
KafkaConnect resource is deployed successfully, as KafkaConnect topics are being populated on confluent cluster (connect-cluster-configs, connect-cluster-configs, ...)
Oracle driver seems to be successfully loaded. If I add a typo in the credentials or connection chain the error is self-explanatory and makes sense. I also tried other versions of oracle drivers.
Back in time (4 months ago), this same config was working (both on a local strimzi-deployed-cluster and confluent). Now the local cluster works fine, but confluent one fails with the described error.
Tried several upgraded latest versions of strimzi operator and kafka-jdbc-connector
(edit) As suggested in strimzi slack, tried the PUT /connector-plugins/JdbcSourceConnector/config/validate rest endpoint of KafkaConnect and got same 2 errors, in the whitelist and blacklist fields
result
"value": {
"name": "table.blacklist",
"value": "",
"recommended_values": [],
"errors": ["Invalid value java.sql.SQLException: ORA-00604: error occurred at recursive SQL level 1\nORA-06502: PL/SQL: numeric or value error: character string buffer too small\nORA-06512: at line 43\n for configuration Couldn't open connection to jdbc:oracle:thin:#***:1534/***"],
"visible": true
}
(edit) I've tried to leave whitelist field empty and error is the same. The database seems not have been changed and the connection chain works fine from source code spring-data access.
I'm out of ideas, any hint is welcome x)
I don't know tools you use, but - the error you got means this:
SQL> declare
2 l_var varchar2(1); -- note length, only 1 character
3 begin
4 l_var := 'Littlefoot'; -- I'm little, but can't fit
5 end;
6 /
declare
*
ERROR at line 1:
ORA-06502: PL/SQL: numeric or value error: character string buffer too small
ORA-06512: at line 4
SQL>
What to do?
SQL> declare
2 l_var varchar2(20); -- is that enough?
3 begin
4 l_var := 'Littlefoot';
5 end;
6 /
PL/SQL procedure successfully completed. --> Yes, it is!
SQL>
Therefore, check the sizes in your code.

Oracle 12c impdp fails when executed fromt the command line

Trying to use impdp to do a data refresh on an Oracle 12c database:
Receive the following error after invoking the impdp from the command line:
ORA-39006: internal error
ORA-39065: unexpected master process exception in DISPATCH
ORA-00942: table or view does exist
ORA-06512: at "SYS.KUPU$UTILITIES_INT", line 1579
ORA-06512: at "SYS.KUPM$MCP", line 2710
ORA-39097: Data Pump encountered unexpected error -942
I found a post that made reference to GSM objects not being available, but there was no confirmation or response to this.
All the GSM schemas have been removed from the database I am working in.

Oracle 11g error when starting trace for other session

In Oracle 11g, I tried to trace a session, but failed. The tool is SQL Developer. I don't have permissions ? but I can query v$session.
Thanks
BEGIN
DBMS_MONITOR.SESSION_TRACE_ENABLE(session_id=>72,
serial_num=>36449,
waits=>TRUE,
binds=>TRUE);
END;
Error report:
ORA-06550: line 2, column 3:
PLS-00201: identifier 'DBMS_MONITOR' must be declared
ORA-06550: line 2, column 3:
PL/SQL: Statement ignored
06550. 00000 - "line %s, column %s:\n%s"
*Cause: Usually a PL/SQL compilation error.
*Action:
You don't have the execute privilege for the dbms_monitor package.
Ask your DBA to run
GRANT execute ON dbms_monitor TO your_username;

Oracle DB Providers installation scripts errors

After installing Oracle XE DB and ODP.NET, i tried to run included scripts to establish tables for .NET providers. When i try to run for example InstallOracleMembership.sql, the operation fails with folowing errors:
IF ( ora_aspnet_TableExists('ORA_ASPNET_MEMBERSHIP') = 0) THEN
*
ERROR at line 2:
ORA-06550: line 2, column 11:
PLS-00201: identifier 'ORA_ASPNET_TABLEEXISTS' must be declared
ORA-06550: line 2, column 6:
PL/SQL: Statement ignored
Then comes some warnings -> Warning: Function created with compilation errors.
And the more errors:
GRANT SELECT ON ora_vw_aspnet_Applications TO ora_aspnet_Mem_ReportAccess
*
ERROR at line 1:
ORA-00942: table or view does not exist
.
.
.
GRANT ora_aspnet_Mem_BasicAccess TO ora_aspnet_Mem_FullAccess
*
ERROR at line 1:
ORA-01917: user or role 'ORA_ASPNET_MEM_FULLACCESS' does not exist
For this purpose i created user and added him privileges like create role, view, table according to this tutorial Oracle tutorial
I am using ODAC 11.2 Release 4 (11.2.0.3.0) 32bit, Oracle 11g R2 XE DB, Win7 Professional 64bit and VS2010.
Am i something missing? What i am doing wrong? Thanks for help.
The manual says you need to run $ORACLE_HOME\ASP.NET\sql\InstallOracleASPNETCommon.sql install script before any other install scripts.
http://docs.oracle.com/cd/E11882_01/appdev.112/e10767/installation.htm

Resources