Oracle

Trying to get the actual data that cause an exception

杀马特。学长 韩版系。学妹 提交于 2021-02-07 10:30:26
问题 I have a procedure that takes an input of 2 Associative arrays and after some basic count checks, does a FORALL statement to insert the data into a table. Here is the procedure: PROCEDURE INSERT_RECS(P_PROD_TYP IN prod_type, P_PROD_ADD_PK IN prod_pk_type) IS uniq_key EXCEPTION; PRAGMA EXCEPTION_INIT(uniq_key, -00001); loc_cnt NUMBER; BEGIN IF P_PROD_TYP.COUNT = P_PROD_ADD_PK.COUNT THEN FORALL i IN P_PROD_TYP.FIRST .. P_PROD_TYP.LAST INSERT INTO product_table ( pk, id, created_by, created_on,

Trying to get the actual data that cause an exception

雨燕双飞 提交于 2021-02-07 10:29:25
问题 I have a procedure that takes an input of 2 Associative arrays and after some basic count checks, does a FORALL statement to insert the data into a table. Here is the procedure: PROCEDURE INSERT_RECS(P_PROD_TYP IN prod_type, P_PROD_ADD_PK IN prod_pk_type) IS uniq_key EXCEPTION; PRAGMA EXCEPTION_INIT(uniq_key, -00001); loc_cnt NUMBER; BEGIN IF P_PROD_TYP.COUNT = P_PROD_ADD_PK.COUNT THEN FORALL i IN P_PROD_TYP.FIRST .. P_PROD_TYP.LAST INSERT INTO product_table ( pk, id, created_by, created_on,

how to copy the records from output of oracle SQL developer to excel sheet

久未见 提交于 2021-02-07 09:47:45
问题 I got some records from Oracle SQL developer & in the output query result . I want to copy the data & paste into the Excel sheet. How to copy the records from output of oracle SQL developer to Excel sheet. 回答1: It's simple, select all the records from the output query result and copied it by using Ctrl+C then after open new DataBase File on top left side of the Oracle SQL developer . Then after paste all the data there into that DataBase File . Again copied the data from that DataBase files

How to get column name for which PL/SQL object population is failing

天大地大妈咪最大 提交于 2021-02-07 09:15:19
问题 I have PL/SQL table-type and procedure as below. It is just part of code. While populating PL/SQL table type variable I am getting exception. CREATE OR REPLACE TYPE OBJ_EMPLOYEE AS OBJECT ( EMPID NUMBER(12) , EMPLOYEENAME VARCHAR2(100) , /* more attributes */ STATUS VARCHAR2(20) , UPDTDATE DATE , ); CREATE OR REPLACE TYPE TAB_EMPLOYEE IS TABLE OF OBJ_EMPLOYEE; CREATE OR REPLACE PROCEDURE sp_getEmpDetails ( p_ErrorCode_o OUT VARCHAR2, p_ErrorMsg_o OUT VARCHAR2 ) IS TEMP_EMPLOYEE TAB_EMPLOYEE :

How to get column name for which PL/SQL object population is failing

巧了我就是萌 提交于 2021-02-07 09:14:39
问题 I have PL/SQL table-type and procedure as below. It is just part of code. While populating PL/SQL table type variable I am getting exception. CREATE OR REPLACE TYPE OBJ_EMPLOYEE AS OBJECT ( EMPID NUMBER(12) , EMPLOYEENAME VARCHAR2(100) , /* more attributes */ STATUS VARCHAR2(20) , UPDTDATE DATE , ); CREATE OR REPLACE TYPE TAB_EMPLOYEE IS TABLE OF OBJ_EMPLOYEE; CREATE OR REPLACE PROCEDURE sp_getEmpDetails ( p_ErrorCode_o OUT VARCHAR2, p_ErrorMsg_o OUT VARCHAR2 ) IS TEMP_EMPLOYEE TAB_EMPLOYEE :

SSL: 400 no required certificate was sent

此生再无相见时 提交于 2021-02-07 07:19:17
问题 The code and inputs I'm trying to establish SSL connection and I'm getting 400 No required SSL certificate was sent response from the server. I'm doing this in a standard way like it's described for example here; I run Java 8. The sample of my code would be: OkHttpClient client = new OkHttpClient(); KeyStore keyStoreClient = getClientKeyStore(); KeyStore keyStoreServer = getServerKeyStore(); String algorithm = ALGO_DEFAULT;//this is defined as "PKIX" KeyManagerFactory keyManagerFactory =

UPDATE on seemingly key preserving view in Oracle raises ORA-01779

强颜欢笑 提交于 2021-02-07 06:47:58
问题 Problem I'm trying to refactor a low-performing MERGE statement to an UPDATE statement in Oracle 12.1.0.2.0. The MERGE statement looks like this: MERGE INTO t USING ( SELECT t.rowid rid, u.account_no_new FROM t, u, v WHERE t.account_no = u.account_no_old AND t.contract_id = v.contract_id AND v.tenant_id = u.tenant_id ) s ON (t.rowid = s.rid) WHEN MATCHED THEN UPDATE SET t.account_no = s.account_no_new It is mostly low performing because there are two expensive accesses to the large (100M rows

Fastest way to compute for hash of a whole table [duplicate]

夙愿已清 提交于 2021-02-07 06:20:08
问题 This question already has an answer here : Oracle get checksum value for a data chunk defined by a select clause (1 answer) Closed 2 years ago . We need to be able to compute table hashes for an external environment and compare it to pre-computed hash from an internal environment. The use of this is to ensure that data in the external environment is not tampered by a "rogue" database administrator. Users insist this feature . Currently, we do this by computing the individual hashes of each

Oracle equivalent to SQL Server included columns to index

[亡魂溺海] 提交于 2021-02-07 06:16:27
问题 Does Oracle let me include columns to index (like SQL Server INCLUDE clause in CREATE INDEX ) ? Thanks. 回答1: No. An index in Oracle either includes the column in the index itself or it doesn't. Depending on the problem you are trying to solve, however, an index-organized table may be the appropriate analogue in Oracle. 回答2: CREATE TABLE test ( a VARCHAR2(400 char) NOT NULL PRIMARY KEY, b NUMBER(33) NOT NULL ); CREATE TABLE test_2 ( a VARCHAR2(400 char) NOT NULL, b NUMBER(33) NOT NULL );

Oracle equivalent to SQL Server included columns to index

流过昼夜 提交于 2021-02-07 06:14:03
问题 Does Oracle let me include columns to index (like SQL Server INCLUDE clause in CREATE INDEX ) ? Thanks. 回答1: No. An index in Oracle either includes the column in the index itself or it doesn't. Depending on the problem you are trying to solve, however, an index-organized table may be the appropriate analogue in Oracle. 回答2: CREATE TABLE test ( a VARCHAR2(400 char) NOT NULL PRIMARY KEY, b NUMBER(33) NOT NULL ); CREATE TABLE test_2 ( a VARCHAR2(400 char) NOT NULL, b NUMBER(33) NOT NULL );