Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

ORA-01400 Error in application

656867Sep 8 2008 — edited Sep 11 2008
Hello:

I'm receiving the following error when I try to create a new client.
ORA-01400: cannot insert null into ("client.id")

This is my table structure:
id Number Not Null PK
clientid varchar2
client_code varchar2
client_name varchar2

I created a report which displays all the clients from the table. I also have a CREATE button on the report so my users can create new clients. The CREATE button branches to the next page which is a form.

I click CREATE and the form appears. The form displays all the fields except for id which is the primary key and in the Items area of Page Rendering it appears as Hidden.

I attempt to add a client, I click Create, and I receive the above message.

I changed the id item from Hidden to Text Field and attempted another create and this time it worked.

The id field should also be auto-incremented which I am unable to figure out how to set it. I have a sequence created, ID2_SEQ.NEXTVAL, which when I do an actual insert statement via SQL*Plus the ID field does increment by one.

When I created the report, I couldn't find a way to reference that sequence for the CREATE button. I think that my error message may have something to do with the fact that I'm not inserting a value for the primary key. Yet, in APEX I read that the primary key is not supposed to be editable. I am totally confused here.

Basically, when the user clicks CREATE I want the following INSERT statement to work:
INSERT INTO client (id, clienid,client_code,client_name) VALUES (id2.seq.nextval, :P1_clientid, :P1_client_code, :P1_client_name);

The documentation for APEX is not very clear on how to do this.

Can someoene help me out? This shouldn't be this complicated.

Thanks for all the help.
This post has been answered by ATD on Sep 10 2008
Jump to Answer

Comments

Andris Perkons-Oracle

Hi,

make sure you are comparing apples with apples. Did the T4-4 use the same storage? Same disks with the same disk layout? Same filesystem with exactly the same mount options?

What happens to the run times if you leave out the "sync" command?

Andris

Andris Perkons-Oracle

And when running this from within guest domains:

Is the storage attached the same way on both the T4-4 and the T5? How is it attached - does the domain access the storage directly or is the storage virtualized (vdisk or vhba)?

Are the control domains sized equally (CPU, RAM)?

3260775

Hi Andris

Thank you for your return.

I will return with the answers as soon as possible

3260775

Sorry for delay

below the specification of the two platforms

T4-4

T5-4

File System

vxfs

zfs

Storage array

Oracle  STK 2540 M2

Oracle FS1-2

Connection type between storage array and server

Directly

Via switch Brocade

                      

T4-4

T5-4

File System

vxfs

zfs

Storage array

Oracle    STK 2540 M2

Oracle FS1-2

Connection type between storage array and server

Directly

Via switch Brocade

Andris Perkons-Oracle

Hi,

well, apples and oranges...

Unless your primary use case is to copy data with "dd", your comparison is useless.

I would bet that the vxfs has no mountoptions, which translates to "delaylog", meaning that you have a –3 second window where your data is not necessarily persistent. Try setting your mountoptions to "log,convosync=direct" and you'll see that your vxfs performance will drop dramatically.

Then, your workload is just small enough (800 MB resp 1,2GB) to fit into the STK 2540's cache. I don't know how large the cache for the FS1-2 is, but I guess that with larger workloads, the performance differences will level out.

The STK uses 15k RPM disks. How fast are the disks inside the FS1? Then, you don't mention how many disks make up your file systems.

The connection of the storage arrays also has different latencies. A direct connection should be slightly faster than a connection via a switch. Not much faster, but "100000 x not much faster" adds up.

Then on the topic of ZFS: What recordsize are you using? How is the zpool set up? Mirrored or Raid-Z-something? How full is the file system?

Andris

Nik

Hi.

For compare need select base. This can allow say that some feature or hardware is better or not.

You have whole different.

Different  servers, different arrays ( with different disks), different FS.

Any from this can be point of the problem.

You test:

root@T5_ldm_app:/# time sh -c " dd if=/dev/zero of=test.img bs=8k count=100000 && sync"

You copy 8k * 100 000 ~ 800 MB   Speed ~ 41 MB/s

root@T5_ldm_app:/# time sh -c " dd if=/dev/zero of=test.img bs=128k count=10000 && sync"

You copy 128k * 10 000  ~1280 MB Speed ~ 32 MB/s

But you sync all file systems. So it's not clear do you have any other activity on other file systems.

According  man:

     Unlike fsync(3C), which  completes  the  writing  before  it

     returns,  sync() schedules but does not necessarily complete

     the writing before returning.

So when you run only one sync, you can not be sure that buffers is real  flushed.

Regards,

Nik.

3260775

Hi All,

We use a delaylog mount option and raid 10 for T4-4.

disk used on STK 2540 ( 7200 rpm)

Regards.

1 - 7
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Oct 9 2008
Added on Sep 8 2008
15 comments
836 views