Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2439
  • Last Modified:

PL-SQL ERROR 201 / 0

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
ptreves
Asked:
ptreves
  • 6
  • 2
1 Solution
 
OraSolnCommented:
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
 
ptrevesAuthor Commented:
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
 
ptrevesAuthor Commented:
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
Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

 
ptrevesAuthor Commented:
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
 
OraSolnCommented:
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
 
ptrevesAuthor Commented:
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
 
ptrevesAuthor Commented:
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
 
ptrevesAuthor Commented:
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
 
oratimCommented:
CREATE PUBLIC SYNONYM TBFIELD_SEQ FOR ALCIE.TBFIELD_SEQ;

TIM
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

  • 6
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now