Solved

PL-SQL ERROR 201 / 0

Posted on 2004-09-23
9
2,072 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
  • 6
  • 2
9 Comments
 
LVL 1

Expert Comment

by:OraSoln
Comment Utility
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
Comment Utility
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
Comment Utility
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
 

Author Comment

by:ptreves
Comment Utility
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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
LVL 1

Accepted Solution

by:
OraSoln earned 500 total points
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
CREATE PUBLIC SYNONYM TBFIELD_SEQ FOR ALCIE.TBFIELD_SEQ;

TIM
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

Background In several of the companies I have worked for, I noticed that corporate reporting is off loaded from the production database and done mainly on a clone database which needs to be kept up to date daily by various means, be it a logical…
Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
Via a live example show how to connect to RMAN, make basic configuration settings changes and then take a backup of a demo database
This video shows how to recover a database from a user managed backup

772 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now