oracle11g

How to schedule a job to run twice a day using dbms_scheduler

社会主义新天地 提交于 2019-12-24 08:18:05
问题 I have created a job using DBMS_SCHEDULER, which will call a SP and the SP does the required stuff. Now my question is how to schedule that job to run twice a day ? I mean I want that job to run everyday @ 1 PM and 4PM (this is just an example. I may have to run @ diff time, but will be running daily twice). Thanks Sachi 回答1: it's easy. Using PL/SQL Developer, open Jobs and edit certain job. In Job properties in Schedule section set "Frequency" to Daily and "By hour" parameter to "1,4". Using

Unable to Extract XML value from Oracle CBLOB

本小妞迷上赌 提交于 2019-12-24 08:17:09
问题 I am trying to select a specific xml value as column in a Oracle 11G table which is stored as XML - Huge CLOB, but unable to. Kindly help Contents of XML as Below <Bid xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/LCC.Crew.FAReserves.wsvc.Entities.FAReserves"> <AggressiveBidType></AggressiveBidType> <BidCriteria> <BidCriteria i:type="RapBidCriteria"> <Value xmlns:d4p1="http://www.w3.org/2001/XMLSchema" i:type="d4p1:string">BAC</Value> <

Alter table, add column / ORA-00984: column not allowed here PLSQL

梦想与她 提交于 2019-12-24 07:58:26
问题 The next statement SQL give me a "ORA-00984: column not allowed here": ALTER TABLE USUVCB.TVCB_RUT_SII ADD (Fecha_Inicio VARCHAR2(10 BYTE) DEFAULT TO_CHAR(SYSDATE, "YYYY-MM-DD") NOT NULL); It's into a PL-SQL, like this: SET SERVEROUTPUT ON DECLARE Fecha VARCHAR2(8) := TO_CHAR (SYSDATE, 'YYYYMMDD'); Tabla VARCHAR2(28) := 'USER.TABLE_' || Fecha; BEGIN SAVEPOINT START; BEGIN EXECUTE IMMEDIATE 'CREATE TABLE ' || Tabla || ' AS SELECT FIELD_1, FIELD_2, FIELD_3 FROM USER.TABLE'; EXCEPTION WHEN

How to force accept a SQL Plan Baseline?

折月煮酒 提交于 2019-12-24 07:23:07
问题 In Oracle (looking at this in Oracle Enterprise Manager) I have a particular SQL Plan Baseline which is set to Enabled = YES. However, I can't get the ACCEPTED = YES to work. According to the documentation, you need ENABLED and ACCEPTED both. I tried to "evolve" the Baseline but OEM complains (via a Report) that it's 1.06 times worse. That's not true though. Also I would like to know how to ensure it does not auto-purge over time and that's it's fixed. Thanks! 回答1: To enable baseline usage,

human readable URLs in Oracle APEX

为君一笑 提交于 2019-12-24 07:16:49
问题 how to make human readable URLs in oracle apex currently my url seems like https://example.com/apex/f?p=107:1:13482402024834::::: what i want my database application url looks like. https://example.com/apex/home i am using oracle apex 18.2 回答1: You can define DAD in the database, and provide name for the apex application in user-interface of application properties the url will have the name of application instead app number, aslo to mask the page numbers you can give alias to pages. 来源: https

ORA-31011: XML parsing failed - invalid characters (oracle sql)

流过昼夜 提交于 2019-12-24 06:48:09
问题 I'm producing an XML document using SQL on Oracle 11g database. But I'm having a problem with a database field, because the title field holds many characters some of which XML see's as invalid, I'm trying to use the below statement to catch as many as possible and convert them to NULL. REGEXP_REPLACE (title, '’|£|&|*|@|-|>|/|<|;|\', '', 1, 0, 'i') as title I'm still getting the parse problem so I know there must be more invalid characters I've missed. I know it's failing on this field as when

Oracle stored procedure error on select

人走茶凉 提交于 2019-12-24 06:39:08
问题 I am getting ORA-06550: line 2, column 1: PLS-00306: wrong number or types of arguments in call to 'GET_EMP_RS' ORA-06550: line 2, column 1: PL/SQL: Statement ignored Error while executing select command stored procedure in oracle. My Procedure is CREATE OR REPLACE PROCEDURE get_emp_rs (p_deptno IN emp.EMPNO%TYPE, p_recordset OUT SYS_REFCURSOR) AS BEGIN OPEN p_recordset FOR SELECT ENAME, JOB, MGR FROM emp WHERE EMPNO = p_deptno ORDER BY ENAME; END; / 回答1: You are not calling the procedure

oracle duplicate rows based on a single column

﹥>﹥吖頭↗ 提交于 2019-12-24 06:06:26
问题 How can I find out duplicate rows based on a single column. I have a table in oracle which has data as given below and it has duplicates. I'm trying to select and view all rows with duplicate employee ids as explained below EMP table: EmpId Fname Lname Mname Jobcode Status exp_date 1 Mike Jordan A IT W 12/2014 1 Mike Jordan A IT A 12/2014 2 Angela ruth C sales P 12/2015 2 Angela ruth C IT W 12/2015 3 Kelly Mike B sales W 12/2015 From the above table i want to select all rows which duplicate

Stored Procedure with multiple IN Parameter

血红的双手。 提交于 2019-12-24 05:07:20
问题 I got the following Procedure: create or replace PROCEDURE create_indexes (tbl_name_index IN VARCHAR2, tbl_name_vehicle IN VARCHAR2, tbl_name_dealer IN VARCHAR2, tbl_name_hst IN VARCHAR2, tbl_name_dms IN VARCHAR2, tbl_name_usertype IN VARCHAR2, tbl_name_search IN VARCHAR2) as COUNT_INDEXES INTEGER; BEGIN SELECT COUNT(*) INTO COUNT_INDEXES FROM USER_INDEXES WHERE table_name = tbl_name_index and index_name not like '%UNIQUE%'; IF COUNT_INDEXES <= 0 THEN EXECUTE IMMEDIATE 'COMMAND'; end If; end;

How to use ASPNET BoilerPlate with Oracle Database

断了今生、忘了曾经 提交于 2019-12-24 03:59:27
问题 We are using .Net Core template of ASPNET BoilerPlate framework. It works fine with SQL Server, but now we need to use Oracle 11g instead. Is it possible? If yes, how can we implement it for our project? Thanks and sorry for my English. 来源: https://stackoverflow.com/questions/54840503/how-to-use-aspnet-boilerplate-with-oracle-database