Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - 64bit Production PL/SQL Release 11.1.0.6.0 - Production "CORE 11.1.0.6.0 Production"
I altered existing table EVENT_SUB - added 3 columns. After that, I noticed all the procedures which had mention of this table name went in INVALID status, even if its simple SELECT, ALTER OR INSERT as shown below..
SELECT * FROM EVENT_SUB
OR INSERT INTO EVENT_SUB... OR ALTER TABLE EVENT_SUB WHERE....
So I had to recompile all the procedures associated with it. Is there any other ways to achieve this, like a line of code to add in the procedure itself, right after this DDL statements.
Sometimes i use this: select object_name, object_type from all_objects where owner='TOYCOM' and status='INVALID' Then, I would simply recompile the invalid objects.
For indexes, i do...
alter index <name> rebuild;
BTW, I did try to preview message, and then click on Create Topic, it gave me error..again.
SQL> ALTER SYSTEM SET NLS_LANG='AMERICAN_AMERICA.AR8MSWIN1256'SCOPE=SPFILE; ALTER SYSTEM SET NLS_LANG=' PORTUGUESE_PORTUGAL.WE8MSWIN1252'SCOPE=SPFILE * ERROR at line 1: ORA-02065: illegal option for ALTER SYSTEM
create or replace p_aggop(dno number, maxi number,mini number,avgi number,tot number,cnt number) is cursor c1 is select * from emp1 WHERE DEPTNO=dno GROUP BY DEPTNO; v_emp1 c1%rowtype; begin open c1; loop fetch c1 into v_emp1; select min(v_emp1.sal),max(v_emp1.sal),avg(v_emp1.sal),sum(v_emp1.sal),count(*) into mini,maxi,avgi,tot,cnt from v_emp1; exit when c1%notfound; Dbms_output.put_line('EXECUTED '); end loop; dbms_output.put_line('The minimum salaray in dept is :'||v_emp1.mini); dbms_output.put_line('The maximum salaray in dept is :'||v_emp1.maxi); dbms_output.put_line('The average salaray in dept is :'||v_emp1.avgi); dbms_output.put_line('The total salaray in dept is :'||v_emp1.tot); dbms_output.put_line('The total members in dept is :'||v_emp1.cnt); CLOSE C1; end;
I am creating a stored procedure to create a table during run time using 3 passed in parameters to build the table name. Oracle is giving me the ORA-00922 missing or invalid operation error message on the EXECUTE IMMEDIATE statement of my stored procedure. I am new to writing stored procedures in Oracle. I am pasting a copy of the stored procedures. I have also changed the names of the field names to be generic so I can post the code in this forum.
CREATE OR REPLACE PROCEDURE createTable(PARAMETER1 in string, PARAMETER2 in string, PARAMETER3 in string) IS
TABLE_NAME NVARCHAR2(50); QUERY_STRING LONG; BEGIN
What is the Best option for SQL/sybase server Temp table to use/for data manipulation (Insert/update/delete) inside the procedure in oracle Other then global temporary table.
Since we are porting from SQL/Sybase to Oracle we don't want to Create too many global temporary table.
if a user have alter table gant but could not alter .. what additional grant it need
SQL> alter table HRS_PERS_FIELDS_INC modify(PER0000252 NUMBER(19,3)); alter table HRS_PERS_FIELDS_INC modify(PER0000252 NUMBER(19,3)) * ERROR at line 1: ORA-00942: table or view does not exist
I am trying out the COMPRESS option along with CREATE TABLE. just wanted to understand if we need the "Advanced Compression" option enabled. Does this require extra license?
I have a table with usernames and passwords. The passwords are stored in plaintext. I would like to issue an ALTER command on the password field to store a hash instead, and then repopulate those fields with an encrypted version of the plaintext passwords that were there before.
I would prefer to do this in a procedure, as I am going to perform it in a test environment first, then eventually in the production environment.
I need to Modify the column(MSGID) data type from RAW to BLOB for a Queue Table, I'm getting the following error.
BANNER --------------- Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production PL/SQL Release 11.2.0.2.0 - Production CORE11.2.0.2.0Production
YUV >
YUV > DESC PDA_REPORT_MESSAGE_QTAB Name Null?Type ----------------------------------------------------- -------- ------------------------------------ Q_NAME VARCHAR2(30) MSGID NOT NULL RAW(16)
YUV > YUV > YUV > ALTER TABLE PDA_REPORT_MESSAGE_QTAB MODIFY (MSGID BLOB); ALTER TABLE PDA_REPORT_MESSAGE_QTAB MODIFY (MSGID BLOB) * ERROR at line 1: ORA-22858: invalid alteration of datatype
YUV > YUV > YUV > YUV > YUV > ALTER TABLE PDA_REPORT_MESSAGE_QTAB ADD (MSGID_NEW BLOB); ALTER TABLE PDA_REPORT_MESSAGE_QTAB ADD (MSGID_NEW BLOB) * ERROR at line 1: ORA-24005: Inappropriate utilities used to perform DDL on AQ table PDADBA.PDA_REPORT_MESSAGE_QTAB YUV >
how to play around with NDS dynamic sql and I'm trying to add a column on the fly.Basically the procedure is trying to take a table name, column name, and eventually a data type and adds it to a table.
It works fine without the bind variable for the column name, accepting the table name on the fly.As soon as it tries to use the column name I get an ORA-00904 invalid identifier exception.
Here is the procedure I'm using
CODEcreate or replace procedure test(tbl_name varchar2, col_name varchar2) IS qry varchar2(500); begin
I've heard that this statement causes a table lock but cant find any information on this.if it is so, is it a write lock or also a read lock of the table?
l am loading data i.e text file of huge size into oracle 9i db using sqlldr through command prompt, but my table contains already some data so while loading it shows error as
SQL*Loader-601: For INSERT option, table must be empty.
i cant truncate my table since present data is important.
We have some tables in our database in which for loading data we have the setup in place to do Exchange partition after data load into staging. Today we did changes to column length to one pair of main and staging table. Post that Exchange partition stop working.
i need a trigger with alter commands to alter the table structure,it will be captured in a separate meta data table(META)
CREATE OR REPLACE TRIGGER meta_alter AFTER Alter ON SCHEMA BEGIN update meta set column_name=:new where table_name=ora_dict_obj_name column_name=:old; END; /
Meta table contains Table name and column name..i attached the table data in atext file
I have xml data in one oracle table as records. I want to get the node name from each record (Next node of rowset and row). Total no.of records in oracle table is 15465. By using for loop i have try to get this but got the following error.
code is...
1 CREATE OR REPLACE PROCEDURE DDI_TEST.SCHEMA_IMPORT9 2 AUTHID CURRENT_USER 3 AS 4 V_Xml XMLTYPE; 5 V_Xml_Ind XMLTYPE; 6 V_Node VARCHAR2 (50); 7 V_Cnt NUMBER := 1;
[code]....
ERROR is..
ORA-31186: Document contains too many nodes ORA-06512: at "SYS.XMLTYPE", line 111 ORA-06512: at "DDI_TEST.SCHEMA_IMPORT8", line 18 ORA-06512: at line 1
Even i used one more 'for loop' (at line 18 )to get additional nodes, same thing happens.
CREATE OR REPLACE TRIGGER LOGONTRIG AFTER LOGON ON DATABASE DECLARE v_temp NUMBER; V_bypass_trg_flag VARCHAR2(1);
[code],...
This trigger got successfully compiled. and when am trying to connect to the db with other user its giving me error "ora-06512 : at dbms_session".When i grant dba privillage to that user am successfully able to login to db.
On the weekend, I ran the repair chained rows in Toad and compile invalid objects in Toad.I don't know this problem is associated with that job, it has no problem first day and today some problem was detected from customer side. It shows Ora-12516 and Ora-96512, I will attach package sql and error screen shot, could you interpret what is wrong with the Oracle?
I can post up screen shot cause I don't have right.It was Korean and if I translate to English, kind of "Server can't proceed - Ora-12516 TNS: listener can't find appropriate handler with protocol stack.
Ora-06512: "CWMED.PKG_MEDI_AS_TOCALL" line 226 Ora-06512: "CWMED.PKG_PDA_MEDI_AS" line 1765 Ora-06512: "line 1".