Alter Sequence In Procedure Will Not Compile?

Dec 31, 2005

When I try to compile a procedure with this command:

alter sequence myschema.seqmessages increment by 100;

The error says "encountered symbol "ALTER" when expecting...

Is there another way to alter a sequence from a procedure? In this case, I am altering a sequence in another schema that has granted the alter and select privileges for the sequence.

View 7 Replies


ADVERTISEMENT

SQL & PL/SQL :: Alter Sequence With No Max Value?

May 4, 2010

is there any way to alter only max value in sequence without specifying the max value.

i know we can alter it like :

-- Alter sequence
alter sequence TEST_SEQ
maxvalue 99999999;

can we alter it without providing the max value and let oracle choose default value for the same, same as we can do it when creating a new sequence.

View 5 Replies View Related

Error Call A Function Which Alter Sequence Value

Jun 22, 2011

error call a function which alter sequence value..I created a function to reset a sequence value as below

CREATE OR REPLACE FUNCTION rebuildSequence
return number
As
l_csmsgid1 PLS_INTEGER;
l_csmsgid2 PLS_INTEGER;
l_val PLS_INTEGER;
plsql_block VARCHAR2(500);
[code]....

I verified and executed the pl/sql block without a problem. but when only put into a fuction and call it, got then error.

View 7 Replies View Related

SQL & PL/SQL :: Compile Specific Packaged Procedure

Jul 20, 2012

I want to recompile a single procedure that is part of a package, without re-compiling other procedure/functions present in that package, is it possible?

View 1 Replies View Related

SQL & PL/SQL :: Cursor And Variable - Procedure Will Not Compile?

May 20, 2013

I am running this procedure but it will not compile. I get the error "PLS-00356: 'REC.XX' must name a table to which the user has access"

All of the query results from the cursor are correct.

create or replace procedure SWDCADMIN.Hard_Delete_Client( cltId IN number)
IS
cursor c1 IS
select
t1.table_name xx,
t1.owner || '.' || t1.TABLE_NAME uu,

[code]...

View 15 Replies View Related

Create Trigger To Execute A Stored Procedure During Source Code Compile?

Nov 9, 2009

I would like to create a trigger that will execute a stored procedure when a package/function/procedure is compiled. I tried creating an update trigger on user_objects, but it statues aI cannot create that trigger tyoe on views.

View 1 Replies View Related

SQL & PL/SQL :: Compile A Procedure Within Another Procedure?

Mar 19, 2012

I wanted to Compile a Procedure within another procedure.

Step 1:

CREATE OR replace PROCEDURE Compile_test
IS
var1 NUMBER(20);
BEGIN
SELECT user_id
INTO var1
FROM dummy;
dbms_output.Put_line('the output is '
||var1);
END;

Step 2:

CREATE OR replace PROCEDURE Compile_test_in (proc_name VARCHAR2)
IS
var2 VARCHAR2(20);
BEGIN
var2 := 'proc_name';
EXECUTE IMMEDIATE ('alter procedure ||var2|| compile');
END;

Step 3:
exec compile_test_in ('compile_test')

When trying the step 3, i am getting the below error message.

Error at line 1
ORA-04050: invalid or missing procedure, function, or package name
ORA-06512: at "MUTHU.COMPILE_TEST_IN", line 6
ORA-06512: at line 1

View 5 Replies View Related

SQL & PL/SQL :: ALTER TABLE Causing Procedure To Go INVALID?

Aug 3, 2010

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.

"A system error has occurred.

View 3 Replies View Related

SQL & PL/SQL :: Sequence In Stored Procedure

Apr 18, 2011

I have a sequence my_seq in schema schema1. I have granted select on this sequence to schema2. Doing :

select schema1.my_seq.nextval from dual

in schema2 work as expected. However when I try to compile a package body in schema2 using my_seq in an insert statement, it fails with:

PLS-00302: component 'MY_SEQ' must be declared

What's even stranger is that I have stored procedures that are using the exact same code that are currently compiled and working. Recompiling them yields this error. How is this possible?

View 7 Replies View Related

PL/SQL :: Sequence Of Data Generation Through Procedure?

Sep 11, 2012

I have a base table by name EMP_MASTER.The Create Statement goes something like this....

CREATE TABLE EMP_MASTER(ST_CODE NUMBER,EMP_CODE NUMBER);We would like to insert records in such a way that there are 10 st_codes and for each st_code we need to insert 100 records.

FOR EX : for st_code 1 we need to have emp_code from 1 to 100 and then we need to insert st_code 2 and the emp_code must be from 101 to 200 and so on...... It must go in this way till we have st_code 10 and hope the emp_code will be in the range of 901 to 1000.

We need some thing similar to proc or PL/SQL block(declare begin..... end)

View 5 Replies View Related

SQL & PL/SQL :: Difference Between Alter Session And Alter System

Jun 19, 2013

What is the difference between alter session and alter system?

View 2 Replies View Related

SQL & PL/SQL :: Procedure To Update Double Subcategory Sequence

Dec 6, 2010

I need to write a procedure to be able to reuse it to clean up subcategory sequence. Here is a problem: two tables: Category and subcategory:

create table Category
(category_id number,
Name varchar2(20))
/
create table Sub_Category
(sub_category_id number,
category_id number,
sequence number)
/

In the ideal world each subcategory of a single category would have unique sequence so if there are 3 subcategory for the same category then each of them would have 1,2,3 in sequence, if there are 5 subcategories then 1,2,3,4,5 for each of them etc.

Problem I'm facing is that some of the subcategories sequences for the same category has the same values . For instance for 4 subcategories of the same category, each of them has 1 (1,1,1,1) in a sequence.

So ideal world is :

Insert into Category values (123 ,'Category1');
Insert into Category values (234 ,'Category2');
Insert into Category values (345 ,'Category3');
Insert into Category values (456 ,'Category4');
Insert into Category values (567 ,'Category5');
Insert into Sub_Category values (1,123,1);
Insert into Sub_Category values (2,123,2);
Insert into Sub_Category values (3,123,3);

But I've also bad rows like this:

Insert into Sub_Category values (4,234,1);
Insert into Sub_Category values (5,234,1);
Insert into Sub_Category values (6,234,1);
Insert into Sub_Category values (7,345,1);
Insert into Sub_Category values (8,345,1);
[code].....

Fix for this and my goal is to select all such cases where subcases have mixed up sequences as above and give them randomly numbers starting from 1. So if there are 3 subcategories like for CATEGORY 2 then just apply random number to the sequence of the subCATEGORIES like 1,2,3. For CATEGORY 3 : 1,2,3 to 7.

I was thinking to write two procedures one selecting all the categories and passing category ID to the other procedure that would actually update sequence, like this:

CREATE OR REPLACE PROCEDURE SCHEMA.SELECT_CATEGORY
IS
CURSOR c1
IS
select category_ID from category where ...;
BEGIN
FOR a IN c1 LOOP
UPDATE_SUBCATEGORY(a.Category_id);
COMMIT;
END LOOP;
END;
/

And the actual procedure updating subcategory:

CREATE OR REPLACE PROCEDURE SCHEMA.UPDATE_SUBCATEGORY
BEGIN
............
END;
/

write PROCEDURE SCHEMA.SELECT_CATEGORY cursor to not miss any of the categories ID having mixed up subcategory. There can be any of the doubled sequences like doubled 1 value (this is majority) but there can be any other doubles (or at least I need to make sure that there aren't any other doubles 2 values or 3 values in sequence etc.)

And how to write SCHEMA.UPDATE_SUBCATEGORY to loop through rows of subcategory and update sequence with values starting from 1 ?

View 17 Replies View Related

SQL & PL/SQL :: Compile Invalid Objects

Jul 16, 2012

I am Modifying a table structure, so dependent objects(triggers,packages etc) are getting invalid. So i thought of compiling those invalid objects which are related with the modified table. I used below query to get the invalid objects,

select obj.object_name,obj.object_type from user_objects obj,all_dependencies dep
where referenced_name='DEPT' and obj.object_name=dep.name and dep.owner='SCOTT' and obj.status='INVALID'

Q1)What is wrong with this query, sometimes it works sometime it doesn't.?
Q2)All_dependencies : does this view show all dependent object on a table even the Invalid one's?
Q3) Is there any alternative to find the dependent invalid objects or even dependent object on a table ?

View 4 Replies View Related

PL/SQL :: How To Use Toad To Compile New Package

Nov 14, 2012

I am not very familiar with Toad, if developer gives modified package, I need to replace this package and compile it . How to do it in Toad .

View 4 Replies View Related

Forms :: FMB Do Not Compile - Segmentation Fault

Jul 15, 2011

If I copy a fmb from Linux to Windows after saving the fmb without any changes I can not compile it. I get

"ROS ERRORL -200
Segmentation fault(coredump).

I have noticed that the form has increased a lot in size.

View 20 Replies View Related

Forms :: Compile Multiple Fmb Files At Once In 6i?

Feb 21, 2012

I need to compile multiple fmb files at once in FORMS6i.

View 1 Replies View Related

SQL & PL/SQL :: Continue To Get Compile Errors Attempting While Loop

Mar 19, 2010

I continue to get compile errors attempting a While Loop. Should I being using a For Loop?

DECLARE
v_item VARCHAR2(20) := &v_item;
v_cost vm_inventory.cost%TYPE;
v_expense CHAR(1) := '$';
loop_count Binary_Integer := 1000;
BEGIN
SELECT item, cost
[code]....

View 5 Replies View Related

Client Tools :: Unable To Compile The Triggers?

Jan 15, 2013

i have huge sets of triggers, when i try to compile any one of those it notifies me with below error

Error: ORA-00603: ORACLE server session terminated by fatal error
ORA-00600: internal error code, arguments: [kqlidchg1], [], [], [], [], [], [], [], [], [], [], []
ORA-00604: error occurred at recursive SQL level 1
ORA-00001: unique constraint (SYS.I_PLSCOPE_SIG_IDENTIFIER$) violated

View 3 Replies View Related

Precompilers, OCI & OCCI :: How To Compile Code To SO File

Nov 19, 2010

I wrote the below C code and I don't How can compile to so file

/* Include standard IO. */
#include <stdio.h>
#include <string.h>
#include <sqlca.h>
#include <stdlib.h>
[code].......

View 3 Replies View Related

Mview Always Showing Status Needing Compile?

Sep 14, 2012

we have a routine which refreshes matrerilized view every day

dbms_mview.refresh('MVIEW_NAME>,'C') refresh ok but in user_ mviews always has status needing compile afterwarsd when compile isfine.

using 11.2.0.3

View 2 Replies View Related

PL/SQL :: Can't Compile And Execute Function (Create Or Replace)

Jun 6, 2013

I cant compile & execute this function.

create or replace
FUNCTION get_branding_testing
RETURN r_brand
IS
BEGIN
CURSOR c1
IS
SELECT b.branding_code, c.name_desc     
[code]....

View 6 Replies View Related

Auto Compile Invalid Database Objects

Nov 11, 2013

If i modify any procedure then auto compile should happen dependended objects.

Oracle Version: 10g

View 1 Replies View Related

Precompilers, OCI & OCCI :: Convert Compile (o) Files To C Code?

Oct 28, 2010

I compiled my c program to o file using the flowing command,

$gcc first.c -o first.o

the source code was lost.

How can I convert the o file to C code?

View -1 Replies View Related

Precompilers, OCI & OCCI :: How To Compile Simple PRO*C Code In Linux

Nov 6, 2008

Linux 2.4.21-37.ELsmp #1 SMP Wed Sep 7 13:28:55 EDT 2005 i686 i686 i386 GNU/Linux...As you'll see I do not understand anything about PRO*C. I need to compile this PRO*C code to use it to retrieve DBMS PIPES being sent.

I'm trying to compile it using the following command:
gcc -o IAPIPE IAPIPE.c

The code - file IAPIPE.c
#include <stdio.h>
#include <string.h>

EXEC SQL BEGIN DECLARE SECTION;
VARCHAR username[20];
int status;
int msg_length;
char retval[2000];
EXEC SQL END DECLARE SECTION;
[code]....

View 3 Replies View Related

Reports & Discoverer :: Compile RDFs / REPs Not Generating

Oct 24, 2011

When i am trying to compile the rdf's, the reps's are not generating. Also while compiling these reports everytime it is asking to add the libraries and it is successfully compiling but the rep's are not generating at all.

View 1 Replies View Related

Precompilers, OCI & OCCI :: Unable To Compile Pro C Code With Oracle 11g In Windows Env

Jul 15, 2010

I am trying to compile a .pc file. I am working with Oracle 11gR1 and windows env. I am able to create .c file from .pc file. I am able to produce .o file from .obj file. But i am not able to link it and produce .exe. My installation does not contain / precomp /demo folder.

View 7 Replies View Related

Precompilers, OCI & OCCI :: Compile ProC File - Failed Assertion

Aug 13, 2010

I am trying to compile a pro c file. Rest of the pro c file is compiling fine. But one particular file is showing following error.

INTERNAL ERROR: Failed Assertion [Code=40706]

View 11 Replies View Related

C++ Call Interface :: Occi 11.1 Error On Compile - Undefined Reference To Oracle?

Jul 11, 2012

I'm trying to compile an hello world example on my computer. I've read the documentation for requirements occi on the site

[URL]....

It says that the g++ compiler 3.4.6 or later is supported. I have:

Ubuntu 12.04
gcc 4.6.3
oracle instant client 11.2

g++ main.cpp -c -I/home/tim/skrivbord/bin/oracle/instantclient_11_2/include/ -D_REENTRANT -g -Wall
g++ -o pippo -L/home/tim/skrivbord/bin/oracle/instantclient_11_2/ -locci -lclntsh -lociei -lnnz11 main.o
main.o: In function `main':
/home/tim/skrivbord/dev/cpp/main.cpp:21: undefined reference to

[code]....

View 1 Replies View Related

Way To Alter Tablespace

Jan 22, 2013

I have issue of TABLESPACES on test instance. Tablespace files are TEMP1,TEMP2 and APPS_UNDOTS1. Initially TEMP1 and TEMP2 were of 4 GB but now the have grown to 32 GB each respectively. Resulting an occupied space of 64 GB on test server. I want to reuse that space on test instance as those tablespaces never crosses used space of 1%. Reason of this problem was my DBA set AUTOEXTEND as ON for tablespaces.

Attached File(s)

 1.jpeg ( 1.8MB )
Number of downloads: 1

 2.jpeg ( 1.6MB )
Number of downloads: 1

 3.jpeg ( 1.52MB )
Number of downloads: 0

View 1 Replies View Related

SQL & PL/SQL :: How To Alter PCTFREE

Oct 1, 2010

I have a table Employee which gets updated and Inserted very frequently. Wanted to increase the PCTFREE value for this table

select table_name,pct_free,chain_cnt from user_tables
where table_name='EMPLOYEE'

EMPLOYEE NULL 0

is the output. I altered the pctfree like below

ALTER TABLE EMPLOYEE PCTFREE 30

and I can see Table altered but the value is not reflecting in above command again. Where else I should alter the value and cross check that value is changed.

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved