oracle10g

How to schedule a work to run at particular time using dbms_scheduler

南楼画角 提交于 2019-12-12 18:34:38
问题 Im not clear about this, here in DBMS_SCHEDULER we have CREATE_PROGRAM CREATE_JOB CREATE_SCHEDULE etc., after reading the oracle doc still im unclear what to use, On the Oracle side, i am going to use DBMS_SCHEDULER to insert a new message into the queue at the appropriate time, i planned to create scheduler to execute it on particular time and then create program to execute my PL/SQL block which will enqueue the message in the queue Or instead of using CREATE_SCHEDULE and CREATE_PROGRAM,

Changing data type in oracle without deleting the data

扶醉桌前 提交于 2019-12-12 16:53:43
问题 Product Version Oracle 10g I have a table in oracle with some data in it. There is a column which of type Number(10,0). Now i want to change it to Number(10,2) to allow decimals. But to change, oracle is not allowing without deleting the existing data. I know i can take the data backup -> delete data -> change type -> insert data back. But the problem is there is an auto insert column which gets value from a sequence. So when i insert it back those id will change....I am not sure that if

PLSQL CASE WHEN CONDITION

末鹿安然 提交于 2019-12-12 16:32:44
问题 I have two queries. Query 1. Below PL/SQL is not working. I want to store the output into varable test1 and test2. It's saying ORA-00923: FROM keyword not found. Not sure what is wrong DECLARE file_id NUMBER(10) NOT NULL :=5; test1 varchar(100); test2 varchar(100); BEGIN DBMS_OUTPUT.PUT_LINE('File Id: ' || file_id); SELECT table_name INTO test1, (CASE owner WHEN 'SYS' THEN 'The owner is SYS' WHEN 'SYSTEM' THEN 'The owner is SYSTEM' END) INTO test2 FROM all_tables WHERE rownum <= 1; END; Query

ORACLE/ASP.NET: ORA-2020 - Too many database links… what's causing this?

我是研究僧i 提交于 2019-12-12 15:20:34
问题 Here's the scenario... We have an internal website that is running the latest version of the ODAC (Oracle Client). It opens database connections, runs a stored procedure or packaged method, then disconnects. Connection pooling is turned on, and we are currently under version 11g in both our development and test environments, but under 10gR2 in our production environment. This happens on Production. A few days ago, a process began firing off a ORA-2020 error. The process is called from a

0RA-00952 on inner join with Oracle 10g

◇◆丶佛笑我妖孽 提交于 2019-12-12 14:16:23
问题 This works : SELECT PRODUCT_INFOS.FIELD_VALUE, PRODUCT_INFOS.COIL_ID_SYSTEM, PRODUCT_INFOS.TIME_STAMP, PRODUCT_INFOS.FIELD_NAME FROM PRODUCT_INFOS This works : SELECT COIL_INFOS.TIME_STAMP, COIL_INFOS.IN_THICKNESS, COIL_INFOS.MEASURED_LENGTH, COIL_INFOS.MEASURED_WIDTH, COIL_INFOS.PARAM_SET_TOP_SIDE, COIL_INFOS.PARAM_SET_BOTTOM_SIDE, COIL_INFOS.TIME_STAMP, COIL_INFOS.COIL_ID_SYSTEM FROM COIL_INFOS WHERE (COIL_INFOS.COIL_ID_SYSTEM LIKE '14051800' OR COIL_INFOS.COIL_ID LIKE '14051800') This

How do I find all code, triggers from an oracle database that relate to specific tables?

天涯浪子 提交于 2019-12-12 13:52:38
问题 I have a problem where I need to remove all code and triggers from a database that relate to certain tables in order for a Solaris package to install. Long complicated story but I need to start with a clean slate. I've managed to remove all the existing tables/synonyms, but how to locate the code/triggers from sqlplus that is related? Unfortunately, it's not feasible to drop the database and recreate it. 回答1: Well, it turns out all the table names are prefixed with my module name DAP. So, to

Oracle: exporting only schema

本小妞迷上赌 提交于 2019-12-12 12:30:05
问题 I have an Oracle 10g database, and now I need to export, if possible, only the schema. (Only table structures with index etc... without data!) Is this possible with exp/imp or do I need expdp/impdp? Greets 回答1: It is possible with exp , using parameter ROWS=N . 10g documentation is here. Data pump is preferred these days though; the equivalent parameter is CONTENT=METADATA_ONLY . 回答2: Check scheme2ddl tool from oracle-ddl2svn bundle. scheme2ddl is command line utility for export oracle schema

DBMS_LOB.SUBSTR() throwing “character string buffer too small” error

这一生的挚爱 提交于 2019-12-12 12:16:49
问题 Does oracle have a method to get substring based on number of bytes from a CLOB field? select DBMS_LOB.SUBSTR(a.COMMENTS, 3998, 1) FROM FOO; I am getting error: "ORA-06502: PL/SQL: numeric or value error: character string buffer too small" . The problem was in special characters. Each new special character takes 8 bytes so when I reduce the string limit to 3992 then it works. DBMS_LOB.SUBSTR(a.COMMENTS, 3992, 1) works. For testing purpose I put many special characters and again it throws same

Updating a column in one table through a column in another table

痞子三分冷 提交于 2019-12-12 11:50:19
问题 I have 2 tables 'A' and 'B'. Both have a common column 'name' and linked with each other by a column 'id'. The column 'name' in the table A is empty whereas it has data in table B. My task is to fill all the data in that column from table B to table A with corresponding ids. I'm using the following query: UPDATE A SET A.name = (SELECT B.name from B WHERE A.id = B.id) WHERE EXISTS (SELECT B.name from B) As soon as I run the query in SQL developer, it just freezes and i have to force close it.

What does precision and scale means in the Oracle NUMBER data type

左心房为你撑大大i 提交于 2019-12-12 10:52:49
问题 I have been reading Beginners guide for oracle DB. The definition for precision and scale are quite confusing. Book says: number(6,3) Oracle allows for 2 not 6 significant digitalis. my problem is, 6 means precision. which means number of significant digits. so it should accept 6 significant digits. why does the book says it is 2 significant digits The book i am referring to is Oracle Database 11g A Beginner's Guide by McGraw Hill Professional, Dec 18, 2008, page number 12 回答1: Check out the