Direct path SQLLDR allows duplicates in the primary key
I would use sqlldr path direct to charge millions of records in the table but direct way allows duplicates on the primary key constraints.inserts of duplicates
sqlldr control deploy_ctl/deploy_ctl@dba01mdm = direct ctl_test.ctl = true
primary key is enabled
I do not understand the behavior that's why the primary key is always enabled--(logiquement il doit avoir désactivé que doublons insérés)
Inserts no duplicates
sqlldr control = ctl_test.ctl deploy_ctl/deploy_ctl@dba01mdm
primary key is enabled
Please can I know if there is any work around to use direct path with constraints of primary school in place.
The only solution is to not use direct load, if your dataset contains records in duplicate, of the documentation:
/*
A record that violates a UNIQUE constraint is not rejected (the file is not available in the memory when the constraint violation is detected).
*/
Tags: Database
Similar Questions
-
Stuck at this part: 3.6 "Duplicate of the primary backup..."
Hi all.
I'm setting up a Data Guard environment. The two 11rg2 Oracle databases are on the same server called gg.oracle.localdomain
I followed this document here: _ http://romain.novalan.fr/wiki/Oracle: _Data_Guard_with_two_single_instance_11gR2_databases #Duplicate_from_the_primary_backup
I'm STUCK at 3.6 duplicate of the primary backup part. I found that this document is incomplete and that it lets just all kinds of things...
I need someone who really knows how to set up a Data - Guard 11 GR 2 2 Database environment.
Here is all of my information to show you all what I did...
hostname gg.oracle.localdomain
Here is information on the primary database.
ID: oradest
echo $ORACLE_HOME
/U03/app/oradest/product/11.2.0/db_dest
echo $ORACLE_SID
destiny
#########################################################################################
Now, I'm going to list all the parameters in the database of the fate which are related to the Data Guard configuration.
SQL > show the fal parameter
VALUE OF TYPE NAME
------------------------------------ ----------- ------------------------------
fal_client string destiny_prim
fal_server string source_sec
SQL > Show parameter dg_broker_config_file1
VALUE OF TYPE NAME
------------------------------------ ----------- ------------------------------
dg_broker_config_file1 string/u03/app/oradest/oradata/desti
NY/dg1db_prim.dat
SQL > Show parameter dg_broker_start
VALUE OF TYPE NAME
------------------------------------ ----------- ------------------------------
dg_broker_start boolean FALSE
SQL > Show parameter log_archive_config
VALUE OF TYPE NAME
------------------------------------ ----------- ------------------------------
string log_archive_config = (destiny_prim, source DG_CONFIG
_sec)
SQL > Show parameter log_archive_dest_1
VALUE OF TYPE NAME
------------------------------------ ----------- ------------------------------
Log_archive_dest_1 string LOCATION = u03/app/oradest/EC
FATE/h_recovery_area/archiv
ELOG = VALID_FOR (ALL_LOGFILES, A).
LL_ROLES) DB_UNIQUE_NAME = desti
ny_prim
SQL > Show parameter log_archive_dest_2
VALUE OF TYPE NAME
------------------------------------ ----------- ------------------------------
chain of LOG_ARCHIVE_DEST_2 SERVICE = source_sec VALID_FOR =)
ONLINE_LOGFILE, PRIMARY_ROLE) D
B_UNIQUE_NAME = source_sec
SQL > Show parameter remote_login_passwordfile
VALUE OF TYPE NAME
------------------------------------ ----------- ------------------------------
Remote_login_passwordfile channel SHARED
SQL > Show parameter name
VALUE OF TYPE NAME
------------------------------------ ----------- ------------------------------
db_file_name_convert chain
fate of string db_name
db_unique_name string destiny_prim
global_names boolean FALSE
instance_name fate of string
lock_name_space string
log_file_name_convert chain
service name string destiny_prim.oracle.localdomain
Here are my files listener.ora and tnsname.ora for the database of PRIM 'DESTINY '...
I don't know if they're just?
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >
[oradest@gg admin] $ cat listener.ora
listener.ora # Network Configuration file: /u03/app/oradest/product/11.2.0/db_dest/network/admin/listener.ora
# Generated by Oracle configuration tools.
LISTENER2 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP (PORT = 1522))(HOST = gg.oracle.localdomain))
)
SID_LIST_LISTENER2 =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = DESTINY. ORACLE. LOCALDOMAIN)
(ORACLE_HOME = u03/app/oradest/product/11.2.0/db_dest)
(SID_NAME = fate)
)
)
ADR_BASE_LISTENER2 = / u03/app/oradest
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >
[oradest@gg admin] $ cat tnsnames.ora
SOURCE =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = gg.oracle.localdomain) (PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = source.oracle.localdomain)
)
)
DESTINY =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP (PORT = 1522))(HOST = gg.oracle.localdomain))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = destiny.oracle.localdomain)
)
)
ORACLONE =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = gg.oracle.localdomain) (PORT = 1523))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = oraclone.oracle.localdomain)
)
)
#######################################################################################
#######################################################################################
Now, I'll list all the parameters in the database oraclone that are related to the Data Guard configuration.
It's the secondary database...
Here is information on the secondary database.
ID: oraclone
echo $ORACLE_HOME
/U05/app/oraclone/product/11.2.0/db_5
echo $ORACLE_SID
oraclone
SQL > show the fal parameter
VALUE OF TYPE NAME
------------------------------------ ----------- ------------------------------
fal_client string orclone_sec
fal_server string destiny_prim
SQL > Show parameter dg_broker_config_file1
VALUE OF TYPE NAME
------------------------------------ ----------- ------------------------------
dg_broker_config_file1 string/u05/app/oraclone/oradata/orac
Lone/dg1db_prim.dat
SQL > Show parameter dg_broker_start
VALUE OF TYPE NAME
------------------------------------ ----------- ------------------------------
dg_broker_start boolean FALSE
SQL > Show parameter log_archive_config
VALUE OF TYPE NAME
------------------------------------ ----------- ------------------------------
string DG_CONFIG = (destiny_prim, oraclo log_archive_config
ne_sec)
SQL > Show parameter log_archive_dest_1
VALUE OF TYPE NAME
------------------------------------ ----------- ------------------------------
Log_archive_dest_1 string LOCATION = / u05/app/oraclone/fla
sh_recovery_area/ORACLONE/arch
ivelog VALID_FOR = (ALL_LOGFILES
ALL_ROLES) DB_UNIQUE_NAME = ora
clone_sec
SQL > Show parameter log_archive_dest_2
VALUE OF TYPE NAME
------------------------------------ ----------- ------------------------------
chain of LOG_ARCHIVE_DEST_2 SERVICE = oraclone_sec VALID_FOR
= (ONLINE_LOGFILE, PRIMARY_ROLE)
DB_UNIQUE_NAME = destiny_prim
SQL > Show parameter remote_login_passwordfile
VALUE OF TYPE NAME
------------------------------------ ----------- ------------------------------
Remote_login_passwordfile channel SHARED
SQL > Show parameter name
VALUE OF TYPE NAME
------------------------------------ ----------- ------------------------------
db_file_name_convert chain
db_name string DESTINY > > > > > > > > > > > > > > > > IS this CORRECT?
db_unique_name string oraclone_sec
global_names boolean FALSE
instance_name string oraclone
lock_name_space string
log_file_name_convert chain
service name string oraclone_sec.oracle.localdomain
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > OK.
The secondary database of Data-Guard is supposed to have the same as the primary database db_name?
Here's the listener.ora and tnsnames.ora on the secondary database...
I don't know if they're just?
[oraclone@gg admin] $ cat listener.ora
listener.ora # Network Configuration file: /u03/app/oradest/product/11.2.0/db_dest/network/admin/listener.ora
# Generated by Oracle configuration tools.
LISTENER3 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = gg.oracle.localdomain) (PORT = 1523))
)
SID_LIST_LISTENER3 =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = ORACLONE. ORACLE. LOCALDOMAIN)
(ORACLE_HOME = u05/app/oraclone/product/11.2.0/db_5)
(SID_NAME = oraclone)
)
)
ADR_BASE_LISTENER2 = / u05/app/oraclone
[oraclone@gg admin] $ cat tnsnames.ora
SOURCE =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = gg.oracle.localdomain) (PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = source.oracle.localdomain)
)
)
DESTINY =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP (PORT = 1522))(HOST = gg.oracle.localdomain))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = destiny.oracle.localdomain)
)
)
ORACLONE =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = gg.oracle.localdomain) (PORT = 1523))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = oraclone.oracle.localdomain)
)
)
DESTINY_PRIM =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP (PORT = 1522))(HOST = gg.oracle.localdomain))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = destiny_prim.oracle.localdomain)
)
)
I can't do the DESTINY_PRIM do a tnsping!
Now <
I connect to the database 'oraclone', using the oraclone environment, using the source as oraclone rman executable...
I have this "startup nomount" command for the oraclone...
Now <
I have this command by using the environment of oraclone...
RMAN target sys/PWD auxiliary sys/PWD@destiny
Then I AM connected and it is feedback from RMAN...
Recovery Manager: release 11.2.0.1.0 - Production on Mon Aug 25 22:37:44 2014
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
connected to target database: DESTINY (DBID = 2366452012)
connected to the auxiliary database: DESTINY (unassembled)
Ths IS correct?
NOW, I RUN THE DUPLICATE DATABASE COMMAND... AND THAT IS WHAT I HAVE...
RMAN > duplicate target DATABASE for the nofilenamecheck ensure;
From duplicate Db 25 August 14
using the control file of the target instead of recovery catalog database
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID = 54 type device = DISK
content of Script memory:
{
Restore controlfile Eve clone;
}
execution of Script memory
From restoration to 25 August 14
using the ORA_AUX_DISK_1 channel
channel ORA_AUX_DISK_1: from the restore backup set data file
channel ORA_AUX_DISK_1: restore the control file
channel ORA_AUX_DISK_1: reading from the backup /u03/app/oradest/flash_recovery_area/DESTINY_PRIM/backupset/2014_08_25/o1_mf_ncsnf_TAG20140825T012420_9zol5lqp_.bkp piece
channel ORA_AUX_DISK_1: part handle=/u03/app/oradest/flash_recovery_area/DESTINY_PRIM/backupset/2014_08_25/o1_mf_ncsnf_TAG20140825T012420_9zol5lqp_.bkp tag = TAG20140825T012420
channel ORA_AUX_DISK_1: restored the backup part 1
channel ORA_AUX_DISK_1: restoration complete, duration: 00:00:03
output file name=/u05/app/oraclone/oradata/oraclone/control01.ctl
output file name=/u05/app/oraclone/flash_recovery_area/oraclone/control02.ctl
Finished restore at 25 August 14
content of Script memory:
{
SQL clone 'alter database sleep mounting database';
}
execution of Script memory
SQL statement: alter database mount rescue
content of Script memory:
{
the value of newname for tempfile 1 to
"/ u03/app/oradest/oradata/destiny/temp01.dbf";
clone tempfile switch all;
the value of newname for datafile 1 to
"/ u03/app/oradest/oradata/destiny/system01.dbf";
the value of newname for datafile 2 to
"/ u03/app/oradest/oradata/destiny/sysaux01.dbf";
the value of newname for datafile 3 to
"/ u03/app/oradest/oradata/destiny/undotbs01.dbf";
the value of newname for datafile 4 to
"/ u03/app/oradest/oradata/destiny/users01.dbf";
the value of newname for datafile 5 to
"/ u03/app/oradest/oradata/destiny/example01.dbf";
restoration
clone database
;
}
execution of Script memory
executing command: SET NEWNAME
renamed tempfile 1-/u03/app/oradest/oradata/destiny/temp01.dbf in the control file
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
From restoration to 25 August 14
using the ORA_AUX_DISK_1 channel
channel ORA_AUX_DISK_1: from the restore backup set data file
channel ORA_AUX_DISK_1: specifying datafile (s) to restore from backup set
channel ORA_AUX_DISK_1: restore datafile 00001 to /u03/app/oradest/oradata/destiny/system01.dbf
channel ORA_AUX_DISK_1: restore datafile 00002 to /u03/app/oradest/oradata/destiny/sysaux01.dbf
channel ORA_AUX_DISK_1: restore datafile 00003 to /u03/app/oradest/oradata/destiny/undotbs01.dbf
channel ORA_AUX_DISK_1: restore datafile 00004 in /u03/app/oradest/oradata/destiny/users01.dbf
channel ORA_AUX_DISK_1: restore datafile 00005 to /u03/app/oradest/oradata/destiny/example01.dbf
channel ORA_AUX_DISK_1: reading from the backup /u03/app/oradest/flash_recovery_area/DESTINY_PRIM/backupset/2014_08_25/o1_mf_nnndf_TAG20140825T012420_9zol44nk_.bkp piece
channel ORA_AUX_DISK_1: ORA-19870: error when restoring the backup /u03/app/oradest/flash_recovery_area/DESTINY_PRIM/backupset/2014_08_25/o1_mf_nnndf_TAG20140825T012420_9zol44nk_.bkp piece
ORA-19504: cannot create the file ' / u03/app/oradest/oradata/destiny/system01.dbf '.
ORA-27041: could not open the file
Linux-x86_64 error: 13: permission denied
Additional information: 4
switch to the previous backup
channel ORA_AUX_DISK_1: from the restore backup set data file
channel ORA_AUX_DISK_1: specifying datafile (s) to restore from backup set
channel ORA_AUX_DISK_1: restore datafile 00001 to /u03/app/oradest/oradata/destiny/system01.dbf
channel ORA_AUX_DISK_1: restore datafile 00002 to /u03/app/oradest/oradata/destiny/sysaux01.dbf
channel ORA_AUX_DISK_1: restore datafile 00003 to /u03/app/oradest/oradata/destiny/undotbs01.dbf
channel ORA_AUX_DISK_1: restore datafile 00004 in /u03/app/oradest/oradata/destiny/users01.dbf
channel ORA_AUX_DISK_1: restore datafile 00005 to /u03/app/oradest/oradata/destiny/example01.dbf
channel ORA_AUX_DISK_1: reading from the backup /u03/app/oradest/flash_recovery_area/DESTINY_PRIM/backupset/2014_08_25/o1_mf_nnndf_TAG20140825T005245_9zoj8xy1_.bkp piece
channel ORA_AUX_DISK_1: ORA-19870: error when restoring the backup /u03/app/oradest/flash_recovery_area/DESTINY_PRIM/backupset/2014_08_25/o1_mf_nnndf_TAG20140825T005245_9zoj8xy1_.bkp piece
ORA-19505: impossible to identify the file ' / u03/app/oradest/flash_recovery_area/DESTINY_PRIM/backupset/2014_08_25/o1_mf_nnndf_TAG20140825T005245_9zoj8xy1_.bkp '.
ORA-27037: unable to get file status
Linux-x86_64 error: 2: no such file or directory
Additional information:
switch to the previous backup
channel ORA_AUX_DISK_1: from the restore backup set data file
channel ORA_AUX_DISK_1: specifying datafile (s) to restore from backup set
channel ORA_AUX_DISK_1: restore datafile 00001 to /u03/app/oradest/oradata/destiny/system01.dbf
channel ORA_AUX_DISK_1: restore datafile 00002 to /u03/app/oradest/oradata/destiny/sysaux01.dbf
channel ORA_AUX_DISK_1: restore datafile 00003 to /u03/app/oradest/oradata/destiny/undotbs01.dbf
channel ORA_AUX_DISK_1: restore datafile 00004 in /u03/app/oradest/oradata/destiny/users01.dbf
channel ORA_AUX_DISK_1: restore datafile 00005 to /u03/app/oradest/oradata/destiny/example01.dbf
channel ORA_AUX_DISK_1: reading from the backup /u03/app/oradest/flash_recovery_area/DESTINY_PRIM/backupset/2014_08_25/o1_mf_nnndf_TAG20140825T004843_9zoj1d0f_.bkp piece
channel ORA_AUX_DISK_1: ORA-19870: error when restoring the backup /u03/app/oradest/flash_recovery_area/DESTINY_PRIM/backupset/2014_08_25/o1_mf_nnndf_TAG20140825T004843_9zoj1d0f_.bkp piece
ORA-19505: impossible to identify the file ' / u03/app/oradest/flash_recovery_area/DESTINY_PRIM/backupset/2014_08_25/o1_mf_nnndf_TAG20140825T004843_9zoj1d0f_.bkp '.
ORA-27037: unable to get file status
Linux-x86_64 error: 2: no such file or directory
Additional information:
switch to the previous backup
channel ORA_AUX_DISK_1: from the restore backup set data file
channel ORA_AUX_DISK_1: specifying datafile (s) to restore from backup set
channel ORA_AUX_DISK_1: restore datafile 00001 to /u03/app/oradest/oradata/destiny/system01.dbf
channel ORA_AUX_DISK_1: restore datafile 00002 to /u03/app/oradest/oradata/destiny/sysaux01.dbf
channel ORA_AUX_DISK_1: restore datafile 00003 to /u03/app/oradest/oradata/destiny/undotbs01.dbf
channel ORA_AUX_DISK_1: restore datafile 00004 in /u03/app/oradest/oradata/destiny/users01.dbf
channel ORA_AUX_DISK_1: restore datafile 00005 to /u03/app/oradest/oradata/destiny/example01.dbf
channel ORA_AUX_DISK_1: reading from the backup /u03/app/oradest/flash_recovery_area/DESTINY_PRIM/backupset/2014_08_23/o1_mf_nnndf_TAG20140823T190612_9zl7m6xg_.bkp piece
channel ORA_AUX_DISK_1: ORA-19870: error when restoring the backup /u03/app/oradest/flash_recovery_area/DESTINY_PRIM/backupset/2014_08_23/o1_mf_nnndf_TAG20140823T190612_9zl7m6xg_.bkp piece
ORA-19505: impossible to identify the file ' / u03/app/oradest/flash_recovery_area/DESTINY_PRIM/backupset/2014_08_23/o1_mf_nnndf_TAG20140823T190612_9zl7m6xg_.bkp '.
ORA-27037: unable to get file status
Linux-x86_64 error: 2: no such file or directory
Additional information:
switch to the previous backup
channel ORA_AUX_DISK_1: from the restore backup set data file
channel ORA_AUX_DISK_1: specifying datafile (s) to restore from backup set
channel ORA_AUX_DISK_1: restore datafile 00001 to /u03/app/oradest/oradata/destiny/system01.dbf
channel ORA_AUX_DISK_1: restore datafile 00002 to /u03/app/oradest/oradata/destiny/sysaux01.dbf
channel ORA_AUX_DISK_1: restore datafile 00003 to /u03/app/oradest/oradata/destiny/undotbs01.dbf
channel ORA_AUX_DISK_1: restore datafile 00004 in /u03/app/oradest/oradata/destiny/users01.dbf
channel ORA_AUX_DISK_1: restore datafile 00005 to /u03/app/oradest/oradata/destiny/example01.dbf
channel ORA_AUX_DISK_1: reading from the backup /u03/app/oradest/flash_recovery_area/DESTINY_PRIM/backupset/2014_08_23/o1_mf_nnndf_TAG20140823T163736_9zkywp8n_.bkp piece
channel ORA_AUX_DISK_1: ORA-19870: error when restoring the backup /u03/app/oradest/flash_recovery_area/DESTINY_PRIM/backupset/2014_08_23/o1_mf_nnndf_TAG20140823T163736_9zkywp8n_.bkp piece
ORA-19505: impossible to identify the file ' / u03/app/oradest/flash_recovery_area/DESTINY_PRIM/backupset/2014_08_23/o1_mf_nnndf_TAG20140823T163736_9zkywp8n_.bkp '.
ORA-27037: unable to get file status
Linux-x86_64 error: 2: no such file or directory
Additional information:
switch to the previous backup
RMAN-00571: ===========================================================
RMAN-00569: = ERROR MESSAGE STACK FOLLOWS =.
RMAN-00571: ===========================================================
RMAN-03002: failure of Db in dual at 25/08/2014 22:41:11
RMAN-05556: not all data files have backups can be picked up at the compatible SNA
RMAN-03015: an error has occurred in the script stored memory Script
RMAN-06026: some targets not found - abandonment of restoration
RMAN-06023: no backup or copy of datafile 5 found to restore
RMAN-06023: no backup or copy of the file 4 found to restore
RMAN-06023: no backup or copy of datafile 3 found to restore
RMAN-06023: no backup or copy of datafile 2 found to restore
RMAN-06023: no backup or copy of datafile 1 found to restore
It is as if she is trying to replace the primary database instead of creating the new secondary database...
Help, please...
Hello;
I agree with Hemant. Looks like you have skipped before too much too quickly without doing the reading.
Here are my notes for duplication on the same host, but this is not a duplication of Eve. However it should give you an idea and not on a single host.
http://www.Visi.com/~mseberg/RMAN/create_a_duplicate_database_on_the_same_host.html
Best regards
mseberg
-
APEX do not allow to change the lines of the columns that are the primary key?
I have pictures:
http://img508.imageshack.us/my.php?image=21269582oe8.jpg
Book (id_book - 'Primary key', title, year); book_author (id_author id_book - 'Primary key', - 'Primary key'); author (id_author - "Primary key", name)
I created a new page-> Form-> form of 'author' table because I want to add new authors, modification and deletion. During the creation of this page, I have chosen column 'id_author' as '1 primary key column' and everything is OK (I can't edit the 'id_author' column - this column is autoincrement and I can change the 'name' column).
BUT I also created a new page-> Form-> table for table "book_author" because I like to write numbers like id_book and id_author, change and remove them (so add relations between tables: book, book_author and author). During the creation of this page, I have chosen column 'id_book' as '1 primary key column' and 'id_author' as 'column primary key 2'. And on the Web site, I can't edit these fields. And I can not add also new line because I see in each new line: (null).
http://img444.imageshack.us/my.php?image=11324615yk9.jpg
APEX do not allow to change the lines of the columns that are the primary key? It's stupid... What can I do?
Edited by: user10731158 2008-12-20 11:40Column unique and not meaningful if you ever want to update. In the case of your example, you need to add an ID column in the intersection of book_author table. Honestly, I was so blown away (and pleasantly surprised) by the absence of rebuttal and the "thx" I advanced and set up an example of how I would define the book_author table:
create table book_author (id varchar2(32), book_id varchar2(32), author_id varchar2(32), modified_on date, modified_by varchar2(255), constraint book_author_pk primary key (id), constraint book_auth_book_fk foreign key (book_id) references books(id), constraint book_auth_author_fk foreign key (author_id) references authors(id) ) / create unique index book_author_uq on book_author (book_id,author_id) / create or replace trigger biu_book_author before insert or update on book_author for each row begin if inserting then :new.id := sys_guid(); end if; modified_on := sysdate; modified_by := nvl(v('APP_USER'),user); end; /
Good luck
Tyler -
implement the primary key on the field of forms
Hello experts,
I have a form with deptno single base table.
dept_name and deptno. DEPTNO is a primary key in the database table.
When I get the records, it prevents to insert the value that is duplicated in the deptno text box when I insert or update.
the form I create a block with the base table, apply the primary key property of this Dept block. is Yes.
then I put the key property primary deptno fields to yes.
When I get duplicate records and then save, it prevents insertion but I want the following:
I run the form, when I enter the first record, if it exists in the table can prevent to insert. also after the first record was inserted.
If I insert to new deptno even into the next record, it must also prevent.
Please help me.
Thank you
YoannYou have built your data forms to help block the "data block Wizard? If so, it already identified DEPTNO as the PK column. If it does not, or you have built your data manually block, you can open the palette property for the DEPTNO element and set the primary key property Yes. When this property is set on an element, the corresponding property of block, primary to apply key must also be set to yes. Please remember, however, that the Act of mark the DEPTNO as a PK does not 'Real time' checking for duplicates. Checking for duplicates occur when validation occurs. If you need a real-time duplicate check, you will need to write code to allow audits in double 'real time '.
There are numrous examples in the forum to check duplicate in real-time as well as examples on the Internet. A search on Google for 'Check' the locker double shaped will give you lots of good examples.
Craig...
-
Hello
I am trying to open the Console of the IOM of Sysadmin,
try checking the research,
search specific "Lookup.USR_PROCESS_TRIGGERS".
and get the error on the screen
Houston-25013: too many objects match the [primary key Lookup.USR_PROCESS_TRIGGERS USR_EMP_TYPE] oracle.jbo.Key.
This known issue?
This patch it for it?
tried searching discussion forums, nothing here
Thank you
Check from the console design. Looks like you have a duplicate key Code value.
-Kevin
-
Too many objects correspond to the primary key oracle.jbo.Key
I get this error:
Too many objects match the primary key oracle.jbo.Key
when I tried to look for in a display object where theprimary key
is consists of more than one filed.Use case:
In
Jdeveloper 11.1.2.3
IEntity object
calledsomeTable
this table has three fieldsA,B and C
where theprimary key
is consist class towingA and B
.I created different towing
View object
ofsomeTable
object enity that aresomeTableVO1
andsomeTableVO2
. RatedA
in the view objectsomtableVO1
is aList Of Value(LOV)
and the data are coming form filedA
in thesomeTableVO2
.In application I have a search page that contains a drop-down list of registered
A
insomTableVO1
. Based on certain conditions, the drop-down list of the values in the list is not static. The value of the drop-down list is editable based on aselect
query run onsomeTableVO1
and it is based on the class thriedC
is NOT part of theprimary key
.The page displays the drop down menu with the correct values. But I have a
ValeChangeListener
method that will be activated whenever the user selects a value form the drop-down list.The problem is:
The error
Too many objects match the primary key
is occur whenever I am executing this method.Support:
I think the problem is with multiple fields for the primary key. of curse, there is an overlap in a part of the
primary key
(IE that paidA
orB
) but the combination ofA
andB
are always unique.Notes:
1. I check the query by executing
SQL Developer
and it shows not all duplicate values.2 I don't attach code, because I think that the problem is not on (how to) this is (what to do).
I hope that the idea is clear
Problem solved.
My goal was to show a summer that
A
formsomeTableVO1
as a list of value and I was trying to achieve by creating the list of value the same formEntity object
. I understand that it was the wrong approach (correct me if I'm wrong). to achieve this inADF
technology, I have to do the following:- Simply to drag and drop the view object from the
Data Controls
page. - List of options appears asking how you want to display the view object (shape, chart, table, only one selection,...).
3. Select
Single Selection
->ADF one Selection
4. Select the attributes that you want to show the user a list of values.
Thanks for your comments.
- Simply to drag and drop the view object from the
-
How to manage too many objects correspond with the exception of the primary key
Greetings,
IM using JDeveloper 11.1.2.4.0 and im trying to manage the "too many objects match the primary key' exception.
I try to add a try catch in bean when I run the validation operation, but he didn't catch it.
then I add a plug on the setter, but he ignores the value and try to insert a null on my primary key.
I want just to handle this exception and display an appropriate message that it is a duplicate primary key
(and of course do not try to continue the validation operation if there are duplicate key)
Thanks in advance.
You can find samples for error messages personalized here:
http://www.adftutorials.com/ADF-custom-error-handler-to-display-custom-message-to-user.html
http://smconsultants.in/2013/07/ADF-BC-error-messages-customization.html
-
best method to update the primary key
Can someone tell me the best possible method to update the primary key so that the foreign key is also updated.
Please explain with example940340 wrote:
Can someone tell me the best possible method to update the primary key so that the foreign key is also updated.
Please explain with exampleYou're after a mechanism that lets you update the primary key sometimes on some lines, or did you just impossible, which means that you must update all the data because of some kind of change in the structural definition?
If all you need is a rational method to change keys sometimes (and this isn't quite mortal sin that other posters have been suggesting) then recreate your foreign key as a constraint can be delayed may help.
Oracle allows no you cascading updates automatically for primary keys, but if the foreign key is carried forward you can proceed as follows:
set constraint {foreign key constraint name} deferred; update parent primary key; update child foreign key; set constraint {foreign key constraint name} immediate;
Concerning
Jonathan Lewis -
How to find the primary key columns in the tables in MS Access using SQL queries
How to find the primary key columns in the tables in MS Access using SQL queries
Hello
This is the forum for Windows Vista programs related issues.
For better assistance, please try instead the Forums in SQL Server .
Thank you! Vincenzo Di Russo - Microsoft MVP Windows Internet Explorer, Windows Desktop Experience & security - since 2003. ~ ~ ~ My MVP profile: https://mvp.support.microsoft.com/profile/Vincenzo
-
Make required error appears only the primary key generated in prior Database Table insert trigger
Dear all,
I am a beginner in the ADF and am under Jdeveloper Studio Edition Version 12.2.1.0.0.
I'm trying to insert a record, I created the trigger for insertion prior to get the primary key and set some other default values.
On the page, I did read-only primary key column and false required.
When I try to save - commit (Programmatic), I get errors for the required value. How can I stop this errors.
Secondly, I also tried changing the agent to disabled on the attribute View object that raised the error below:
< oracle.dfw.impl.incident.DiagnosticsDataExtractorImpl > < DiagnosticsDataExtractorImpl > < createADRIncident > < incident created 148 to key problem "DFW-99998 [oracle.jbo.PersistenceException] [oracle.jbo.server.RowReference.verifyPrimaryKeys] [Proposals]" >
Hoping for help.
Thanks and greetings
Arif Khadas
If the primary key values from DB sequence, you can follow this approach:
Using the sequence of database in ADF - Souza Waslley Blog
Oracle Fusion Middleware Technologies: ADF 11 G: generate the primary key sequence number
Otherwise, instead of DB trigger, create the DB function that retrieves the value of the PK and call stored function in the overloaded method create() entity:
-
Comparison of the data of several rows in a table - based on the primary key
Currently I have a select statement that returns hundreds of records. Each returned record is linked to A NUMBER of ORDER this order number has a recipe. (a bit like a cooking recipe). Each recipe has many records in the database related to this order number and records should be compared to records in a table that bind to a specific primary key... (I have already developed the logic to isolate what PK I need). If all these records that are returned by the select statement below does not match all the records containing PK in the table below, I need to get the next PK and compare all these recordings for select statements return.
See below for a better understanding. Need a good example detailed on how to solve my problem here.
Just to help you understand:
Each element of the recipe is 3 parts (side, ref_des, part_number). 1 single recipe can have several parts (where the part_number), and each of these pieces should be placed on the lower side or top of the Board that is there "side" comes into play. Same thing with Ref_Des.
What is going on
Select statement returns the RECIPE of ORDER NUMBER A. There will be multiple records returned by this query.
Select the Return statement:
- Side
- Ref_Des
- Part_Number
Example of return:
B c17 75145-2
T f14 89242-8
B s12 45123-3
etc,
In general - what I need to do:
There is a table called AUTO_RECIPE_DETAILS. I take all of the records returned by the select query above and compare for each record in this table relating to the recipe 30319-000001. 30319-000001 a number of records. It is the primary key for a whole recipe as seen above. This primary key is bound the number of data records in this table. The comparison is to see if all records under RECIPE_NAME 30319 -000001 match all the records returned by the select statement.
IF IT DOES NOT MATCH: recover the following recipe in this table below 30319 -000002 and make the same comparison.
Here's a perfect example of what the table looks like: (AUTO_RECIPE_DETAILS)
RECIPE_NAME SIDE REF_DES PART_NUM
-30319-000001 C16 87595-1 B
-30319-000002 T B14 74150-4
-30319-000001 T B14 34251-2
-30319-000001 T F24 84180-7
-30319-000002 T B12 13710-8
It is the solution to my original question. By this thread, it's the right answer and I hope this helps someone who is trying to compare two arrays element-by-element. In the end, the advice given in this thread were correct and I will be using all of your suggestions and the scrapping of this. Thank you everyone for your help though.
FOR index_p IN pid_recipe. FIRST... pid_recipe. LAST
LOOP
Result WHEN the OUTPUT = 1;
FOR index_d IN details_recipe. FIRST... details_recipe. LAST
LOOP
IF (pid_recipe (index_p). SIDE = details_recipe (index_d). SIDE)
AND (pid_recipe (index_p). REF_DES = details_recipe (index_d). REF_DES)
AND (pid_recipe (index_p). PART_NUM = details_recipe (index_d). PART_NUM)
THEN
EXIT;
ON THE OTHER
DBMS_OUTPUT. Put_line("IT WAS NOT a MATCH");
result: = 1;
EXIT;
END IF;
END LOOP;
END LOOP;
DBMS_OUTPUT. Put_line('LOOP OUT');
-
generate a numerical value to use as the primary key
Can someone correct me, in an interview that the question was asked.
How not one generates a numeric value to use as the primary key?
Years
We can get it using the sequence. For example:
CREATE SEQUENCE cust_seq
START BY
1000INCREMENT OF
1NOCACHE
NOCYCLE;
Hi Shu,
sequence would be my choice and 12 c new type called identity.
-
How to fill out the table foreign key to the primary key form
Hi all
I'm stuck in this problem for 3 days, and I'm about to research and implement solutions on the internet.
I have two tables
create table prim (a number primary key, b varchar2 (100));
create table CHILD (a number references (a) prim, varchar2 (100)) c;
I created a page for PRIM table.
= page name form on PRIM2
I have manually two columns for the CHILD table to know
P26_A_1 (for the primary key in the CHILD table)
P26_C (for the column in the CHILD Table c)
now when the user clicks on the button CREATE, a row must be inserted into the child table.
I want to assign the P26_A to P26_A_1 during the validation process, so that a line must be inserted into the PRIM table as well as in the CHILD table.
How to do this?
I downloaded my application page in https://apex.oracle.com
my workspace identifiers are inferior to
name of the workspace = IMBERT
username = demo
password = demo
kindly guide me.
Thank you.
Hello
I created a new page (page 30) similar to your page and added the insertion of the child. It just check the page and code. It works now, when you insert the prim file is triggered a second trial which inserts the child record manually.
On page 26 it was some sort of mistake, was easier to create a new as it was almost a standard form.
Concerning
Bottom
-
How to refer to the primary key column of newly inserted rows of tabular form
Hello
I use APEX 4.2.0.00.27 with Oracle DB 11.2.0.3.0.
I work with a tabular presentation wizard-created for insert and update a table using the integrated SRM process (sequence 10). I'm trying to use a process of anonymous block of PL/SQL (sequence 30) to make another manipulation of table after the records were inserted or updated. The manual process is associated with my tabular form and I use the variables of name of column binding in my program block.
My (rsn_test) table has 3 columns: test_id (number), test_nbr (number), test_id2 (number). Test_id column is identified as the primary key and the type of the source already exists a sequence rsn_test_seq. Column test_id2 gets its default value 0 to a hidden page element.
I would use my manual process for updating the value of the test_id2 column. If it's 0 then I want to put the value of the column test_id. If it is any other value, then it must remain at this value. My logic works very well for an existing line, but I'm running into a problem with the newly added lines. The new lines get inserted, but the test_id2 column remains the default value 0. I can tell the debugger that the SRM process is triggered first and inserts the line, then my manual dealing with fires. The problem seems to be that the connection variable: TEST_ID for the primary key column remains NULL after insertion. I don't know how to get the value of the column test_id of my newly created line to use in my PL/SQL block to my update.
Process of PL/SQL:
DECLARE BEGIN :P7_SHOW := NULL; :P7_SHOW := NVL(:TEST_ID2,555) || ' and ' || NVL(:TEST_ID,787) || ' and ' || NVL(:TEST_NBR,9999); IF :TEST_ID2 = 0 AND :TEST_ID IS NOT NULL THEN UPDATE rsn_test SET test_id2 = :TEST_ID WHERE test_id = :TEST_ID; ELSE :TEST_ID2 := :TEST_ID2; END IF; END;
Excerpt from the debugger:
0.01625 0.00010 Processes - point: ON_SUBMIT_BEFORE_COMPUTATION 0.01635 0.00008 Branch point: Before Computation 0.01643 0.00003 Process point: AFTER_SUBMIT 0.01646 0.00022 Tabs: Perform Branching for Tab Requests 0.01668 0.00008 Branch point: Before Validation 0.01676 0.00024 Validations: 0.01700 0.00135 Perform basic and predefined validations: 0.01835 0.00020 Perform custom validations: 0.01855 0.00049 ...Validation "TEST_NBR must be numeric" - Type: ITEM_IS_NUMERIC 0.01904 0.00007 ......Skip for row 1 because row hasn't changed 0.01911 0.00016 ......Skip for row 2 because row hasn't changed 0.01927 0.00012 ...Validation "TEST_ID2 must be numeric" - Type: ITEM_IS_NUMERIC 0.01939 0.00007 ......Skip for row 1 because row hasn't changed 0.01945 0.00018 ......Skip for row 2 because row hasn't changed 0.01964 0.00005 Branch point: Before Processing 0.01968 0.00004 Processes - point: AFTER_SUBMIT 0.01972 0.00588 ...Process "ApplyMRU" - Type: MULTI_ROW_UPDATE 0.02560 0.00154 ...Execute Statement: declare function x return varchar2 is begin begin for c1 in ( select "RSN_TEST_SEQ".nextval pk from sys.dual ) loop return c1.pk; end loop; end; return null; end; begin wwv_flow.g_value := x; end; 0.02714 0.00140 ......Row 3: insert into "APPPCSRSN"."RSN_TEST" ( "TEST_ID", "TEST_NBR", "TEST_ID2") values ( :b1, :b2, :b3) 0.02854 0.00011 ...Process "ApplyMRD" - Type: MULTI_ROW_DELETE 0.02865 0.00004 ......Skip because condition or authorization evaluates to FALSE 0.02869 0.00015 ...Process "Process Submit" - Type: PLSQL 0.02884 0.00007 ......Skip for row 1 because row hasn't changed 0.02891 0.00012 ......Skip for row 2 because row hasn't changed 0.02903 0.00012 ......Process row 3 0.02915 0.00429 ...Execute Statement: begin DECLARE BEGIN :P7_SHOW := NULL; :P7_SHOW := NVL(:TEST_ID2,555) || ' and ' || NVL(:TEST_ID,787) || ' and ' || NVL(:TEST_NBR,9999); IF :TEST_ID2 = 0 AND :TEST_ID IS NOT NULL THEN UPDATE rsn_test SET test_id2 = :TEST_NBR WHERE test_id = :TEST_ID; ELSE :TEST_ID2 := :TEST_ID2; END IF; END; end; 0.03344 0.00013 ...Session State: Saved Item "P7_SHOW" New Value="0 and 787 and 1300" 0.03356 0.00004 Branch point: After Processing 0.03360 0.00048 ...Evaluating Branch: "AFTER_PROCESSING" Type: REDIRECT_URL Button: (No Button Pressed) Condition: (Unconditional) 0.03407 0.00013 Redirecting to f?p=290:7:8717971109610:::::&success_msg=0%20row(s)%20updated%2C%201%20row(s)%20inserted.Success%2FEBD244168556408CBA714E3974918C09%2F 0.03420 0.00012 Stop APEX Engine detected 0.03432 0.00007 Stop APEX Engine detected 0.03439 - Final commit
Any suggestions?
I have run tests on
https://apex.Oracle.com/pls/apex/f?p=83488:1 demo/demo
to see your problem.
I have 2 solution for your problem.
I add trial NOT tabular just usual block of PL/SQLBEGIN I'm IN (SELECT TEST_ID FROM RSN_TEST WHERE TEST_ID2 = 0) LOOP UPDATE RSN_TEST SET test_id2 = TEST_ID WHERE test_id = i.TEST_ID; END LOOP; END; and works very well, you can see in the sample.
The other solution is to show new generated TEST_ID
Adding a sequence as a default value for a column in a table field
And to execute your procedure.
I get how is with the good luck of time.
By
-
How to generate the primary key element and move to another page?
How to make the primary key value to another page in a table?
Hello
I am a beginner in the apex,
Please, now I want to add the primary key to page 1 for item id in page 2...
Notice:
Before, I created (process of pl/sql in the rendering of page @ after the header section) to get the id of secuance.
BEGIN :P17_ID := seq_t_items_id.NEXTVAL; END;
primary key is generated for the element ID of page 1... BUT When I update 'page 1' I see error and solved when shut down my browser and open it again...
Please help me to...
- Generate a primary key (article id @ page 1)... without refresh error. ?
- Pass him (item_id) on page 2
Thank you all for...
Sorry I'm beginner in apex,
I don't know how Pass value of the item_id TO page 1 page 2 "in the form ID", turn to the first PHOTO... .
Help me..Thank you
Maybe you are looking for
-
Hey,. I buy a new Mac. What is the diffrence between Mac Vs the new Macbook air? Is what I want from the computer to surf the Web, watch movies and TV shows and download things like movies and music. The type will be the best for me? Thank you!
-
I also noticed that, in another browser, my homepage preference disappears after each stop, so I guess that these are related since both of which happened after the download of 34.0.5. Any help is appreciated. Don't tell me to check my preferences on
-
Satellite Pro M40 - where battery CMOS
Hello Could someone please tell me where the CMOS battery on an M40 225, also do you know what it takes? Thank you
-
I have disabled all media, selected uninstall several applications, I deleted as much as I can, and again, it will not move to the new iOS. I have an iPad 16 GB Mini iOS 9.1 trying to pass to 9.2. The iPad will not synchronize until the iOS is update
-
DirectX error "internal system error".
DirectX is killing me. I was unable to start some games, namely fallout 3 and flaws today online. I'm running DirectX errors. I run diag and everything happens without any problem. Win7 directx 11 is installed. Any time that a game trying to aut