Solved

PL-SQL ERROR 201 / 0

Posted on 2004-09-23
9
2,280 Views
Last Modified: 2011-10-03
Hello,

Compiling some Forms under my Linux Box, I got these errors as well:
-----
Compiling PRE-INSERT trigger on FIELD_LOG data block...
Compilation error on PRE-INSERT trigger on FIELD_LOG data block:
PL/SQL ERROR 201 at line 4, column 9
identifier 'TBFIELD_SEQ.NEXTVAL' must be declared
PL/SQL ERROR 0 at line 4, column 2
SQL Statement ignored
 
=====cltinv
Compilation error on function CHECK_ID:
PL/SQL ERROR 201 at line 2, column 35
identifier 'TED.SECURITY2' must be declared
PL/SQL ERROR 0 at line 2, column 14
SQL Statement ignored

=====

Any ideas about what might be the cause ?
(looks like TED.SECURITY2 and TB_FILED_SEQ.NEXTVAL might not be defined/exit)

Your  toughts ?

PT
0
Comment
Question by:ptreves
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 2
9 Comments
 
LVL 1

Expert Comment

by:OraSoln
ID: 12134870
If possible, show us the code in your pre-insert trigger.

For the 1st error: Your oracle database either does not have a sequence TB_FILED_SEQ or you have misspelt it or it can be under some other schema. Check your code.

For the 2nd error: TED seems to be a table to me. If so, then the column SECURITY2 does not exist or the table is under a different schema.
0
 

Author Comment

by:ptreves
ID: 12135983
Hello,

I have been checking my database.
I did not find any tables called TED. Also, I did find the sequence TBFIELD_SEQ using the Oracle Enterprise Manager.
I tried the following under SQLPLUS:

desc alcie.tbfield_seq;
SP2-0381: Describe sequence is not available

1) What can I do to this sequence in order to compile my form correctly ?

Your toughts ?

PT
0
 

Author Comment

by:ptreves
ID: 12136018
Hello,

I get the same type of error with another sequence:
-----
Compiling WHEN-VALIDATE-ITEM trigger on CUSTOMER item in CLIENT_INFO data block...
Compilation error on WHEN-VALIDATE-ITEM trigger on CUSTOMER item in CLIENT_INFO data block:
PL/SQL ERROR 201 at line 3, column 24
identifier 'SEQ_CUST.NEXTVAL' must be declared
PL/SQL ERROR 0 at line 3, column 17
SQL Statement ignored
-----

1) What should I do with these sequence errors ? declare synonyms ?
PT

0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 

Author Comment

by:ptreves
ID: 12136146
Hello,

Looking in the Forms Builder Oracle 9i, I do not find a CLIENT_INFO data block.
I only found: B1, B2, CONTROL and TOOLBAR datablocks.

Your toughts ...?

1) Where could I find the SEQ_CUST.NEXTVAL sequence ?

PT
0
 
LVL 1

Accepted Solution

by:
OraSoln earned 500 total points
ID: 12136519
1. Do this in SQL*PLUS
   SELECT TBFIELD_SEQ.NEXTVAL FROM DUAL;
This should tell you if you have access to the sequence.

2. Do you use the same oracle user to log into Oracle Forms as the one you use to test sequence in SQL*Plus?

3. If you have access to the sequence and still get the error, then something is messed up in the code. You would need to show us the code.


0
 

Author Comment

by:ptreves
ID: 12136588
Hello,

This is what I get:
---
1) select tbfield_seq.nextval from dual;
    error at line 1
    ora-02289: sequence does not exist

2) select alcie.tbfield_seq.nextval from dual;
    NEXTVAL
    ----------
       2160

The sequence exists under the ALCIE user.

1) How can I make the sequence public ? using synonym ?

Your toughts ....

PT
0
 

Author Comment

by:ptreves
ID: 12136598
Hello again,

If the sequence seems to exists for the ALCIE user,

1) why I could not do this : desc alcie.tbfield_seq;      ????
SP2-0381: Describe sequence is not available


Your toughts ?..

PT
0
 

Author Comment

by:ptreves
ID: 12136612
Hello,

I did an import under the SYSTEM/MANAGER user and logged in as the SYSTEM/MANAGER also.
All tables that were giving me compilation errors, I create public synonyms for them.

How can I make the sequence public ?

PT
0
 
LVL 3

Expert Comment

by:oratim
ID: 12141536
CREATE PUBLIC SYNONYM TBFIELD_SEQ FOR ALCIE.TBFIELD_SEQ;

TIM
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Working with Network Access Control Lists in Oracle 11g (part 1) Part 2: http://www.e-e.com/A_9074.html So, you upgraded to a shiny new 11g database and all of a sudden every program that used UTL_MAIL, UTL_SMTP, UTL_TCP, UTL_HTTP or any oth…
Cursors in Oracle: A cursor is used to process individual rows returned by database system for a query. In oracle every SQL statement executed by the oracle server has a private area. This area contains information about the SQL statement and the…
This video explains at a high level about the four available data types in Oracle and how dates can be manipulated by the user to get data into and out of the database.
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Suggested Courses

617 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question