Advanced Replication And Foreign Keys
Sep 10, 2010
I have few BDs replicated using Advanced Replication, some tables are read only (Basic Replication) and another ones are Updatable (Advanced Replication).
The infraestucture is Materialized View Replication, my trouble is, I do not know how to should treat the updatable tables that have foreign keys, I read in another FAQs that you should replicate the indexes using the same way to replicate tables (dmbs_repcat.create_master_repobject)
Which is the correct manner to treat the foreign keys with this kind of updatable snapshots,
View 2 Replies
ADVERTISEMENT
Oct 7, 2010
In my sql developer I have created a table. Created primary keys. Using alter table I have also created the foreign key. Now I need to add one more foreign key to the same table. Do I have to drop the existing foreign key and then create the 2 new foreign keys using the alter table condition or can I retain the existing FK and just use alter table to add another FK.
View 9 Replies
View Related
Jul 22, 2010
I have to create indexes on foreign key columns ,now if composite index is already there with foreign key column then that will work or i will have to create a single column index.
View 17 Replies
View Related
May 19, 2007
How can I create a list of items in a field, for instance lets say I have a table called car and one of the sub categories is parts. How can I make it so that parts can be any number of pre-defined entities? Or even table, for instance if I make a table called parts how can I use that in the car table in place of parts?
My second question is about using foreign keys as primary keys. If I am writing an email sql DB and I decided to use the members usrname as the primary key in the member table but then made another table that lists all the emails and decided to make the foreign key member username the primary key there.
Is that safe to do or should i create a sequence in which to identify a primary key for the email list table? Also what if I extend member to several other tables and use it as a primary key there too, seems like a kind of dangerous way to do things...
View 1 Replies
View Related
Aug 25, 2010
Create table Car
(Car_cd VARCHAR2(5),
Car_Desc VARCHAR2(50)
);
alter table Car
add constraint Car_PK primary key (Car_CD);
INSERT INTO Car (Car_Cd, Car_Desc) VALUES ('CORLA','COROLLA');
Commit;
[code]....
The requirement necessitates a new table to map car to manufacturer. This mapping table may later be expanded to contain other attributes Engine, MPG, etc to hold details specific to a car.But this is in future.
Create Table Car_Mapping_Details
(Car_Cd VARCHAR2(5),
Manufacturer_Cd VARCHAR2(5));
--Primary Key Constraint
ALTER TABLE Car_Mapping_Details
ADD CONSTRAINT Car_Mapping_Details_pk PRIMARY KEY (Car_Cd );
--Not able to create this as Car_cd is already a PK in this table and therefore has Unique Index
ALTER TABLE Car_Mapping_Details ADD CONSTRAINT Car_Mapping_Details_fk1
FOREIGN KEY (Car_Cd)REFERENCES Car (Car_Cd);
[code]....
But in this case the Car_Mapping_Details.Car_cd is itself is a primary key and therefore has Unique index.Although I was able to create foreign key constraint on Car_mapping_details.car_cd column (which is also Primary Key), I was not able to create Foreign Key Index on this column. It gives me Quote:ORA-01408: such column list already indexed.In other words, not creating foreign index for foreign key column lead to table-level lock? Or will the Unique Index in that primary key column be sufficient to avoid table-level lock?
View 2 Replies
View Related
Aug 8, 2012
Hybrid Columnar Compression is dependent on the underlying storage system. See Oracle Database Licensing Information for more information.
The below is from the Oracle® Database PL/SQL Packages and Types Reference
Compression Constant Compression Level Description
COMP_FOR_OLTP 2 OLTP compression
COMP_FOR_QUERY_HIGH 4 High compression level for query operations
COMP_FOR_QUERY_LOW 8 Low compression level for query operations
COMP_FOR_ARCHIVE_HIGH 16 High compression level for archive operations
COMP_FOR_ARCHIVE_LOW 32 Low compression level for archive operations
To use Compression Level 4 or higher do we have to have ZFS or Pillar storage ?
View 4 Replies
View Related
Jun 9, 2010
I am researching a performance problem on an Oracle Preprd DB in a RAC cluster using AQ. The queue table has 88 records, is about 900Meg in size, takes 90+ seconds to do a select count(*). In Prod the same table is about 44 records, 80 Meg in size, and takes about 9 seconds to query the table. The DB is at 10.2.0.4 running on a LINUX/Sun host. In the USER_DATA column I am seeing an entry in the STR_VALUE that displays 'Unable to successfully deliver a message after "MaxDeliveryCnt" attempts. Please verify that the onMessage() method of the MDB does not throw a RuntimeException' for each record in the table. I don't have direct access to the PROD DB so I can not verify this message in that environment. My question, is this table holding onto records that should be cleared out and should this table be dropped and rebuilt to reduce its size. I have seen this technique improve performance for other non-queueing tables. But I don't know if this is possible with a queue table.
View 5 Replies
View Related
Sep 20, 2012
I have Oracle Advanced Security installed on database:
SQL> set line 400
SQL> select NAME
*2 from DBA_FEATURE_USAGE_STATISTICS*
*3 WHERE name IN ('Advanced Security')*
*4 /*
NAME
------------------------------------------------------
Advanced Security
Advanced Security
I need to uninstall this option, how to uninstall oracle advanced security ?
View 7 Replies
View Related
Apr 7, 2010
I want to know whether OAS(oracle advanced security) is enabled in our database or not?
View 9 Replies
View Related
Sep 11, 2012
I have noticed that Oracle text related objects, particularily the $I tables are some of the largest objects in our database. I have been actively pursuing utilizing Oracle advanced compression in our databases for OLTP table compression and LOB object compression. I have been unable to find any documentation or notes on if it is advisable to implement either table OLTP or LOB compression for Oracle text objects.
View 1 Replies
View Related
Aug 18, 2010
How does standard vs advanced handle index compression? Is there an advantage to having one vs the other besides the incurred cost?
View 3 Replies
View Related
Feb 22, 2012
Actually am trying to replicate two db servers from one in hong kong and another in china. when am trying to establish the replication, am getting error 'ORA-04052: error occurred when looking up remote object' like this...
but the same way i have tried in my local network, it is working fine.i have tried schema replication through enterprise manager grid control..
View 6 Replies
View Related
Apr 1, 2010
what are the recommended network requirements for implementing Oracle Multi Master replication.
View 1 Replies
View Related
Sep 4, 2009
i need to set up a central server with all the master tables and two other local database which will hold the updatable materialized view of the master table...the databases must be synchronized with central server..and user will work on the materialized view database...
View 10 Replies
View Related
Aug 21, 2008
I want to set up advance replication for 3 master site (multimaster) I created 3 master site named orc1,orc2,orc3 and followed up oracle replication management of API book instruction I created 2 tables(tes1,test2) in hr schema in all 3 master site with the same data. then I created the following steps
1-CONNECT repadmin/repadmin@orc1
2-Create the master group named hr_test_repg
BEGIN
DBMS_REPCAT.CREATE_MASTER_REPGROUP(
gname => 'hr_test_repg');
END;
/
4-add tables test1 and test2 to the group
BEGIN
DBMS_REPCAT.CREATE_MASTER_REPOBJECT(
gname => 'hr_test_repg',
type => 'TABLE',
oname => 'test1',
[code]....
I could create DBMS_REPCAT.GENERATE_REPLICATION_SUPPORT for test2 but not for test1 and it produces error
RROR at line 1:
RA-23309: object hr.test1 of type TABLE exists
RA-06512: at "SYS.DBMS_SYS_ERROR", line 105
RA-06512: at "SYS.DBMS_REPCAT_MAS", line 2552
RA-06512: at "SYS.DBMS_REPCAT", line 562
RA-06512: at line 2
View 5 Replies
View Related
Jul 3, 2008
Trying to delete duplicate rows from a table. The problem is, they aren't exactly duplicate rows. Let me explain.
I am migrating data from a Oracle 8.1.7 db to a 10.2.1 db. In the older db, this certain table does not have a PK/Unique Index, but in the new db there is a unique index. The fields that the index is unique on are:
SUBSCR_NO, SUBSCR_NO_RESETS, EXTERNAL_ID, EXTERNAL_ID_TYPE, ACTIVE_DATE.
In the old db, when I run this query I get 1229 rows. With a count of 2 each.
select SUBSCR_NO, SUBSCR_NO_RESETS, EXTERNAL_ID, EXTERNAL_ID_TYPE, ACTIVE_DATE, count(*)
from customer_id_equip_map
group by SUBSCR_NO, SUBSCR_NO_RESETS, EXTERNAL_ID, EXTERNAL_ID_TYPE, ACTIVE_DATE
having count(*)>1;
They are duplicates on those fields, but they are not totally duplicate rows because there is a field called is_current that has 0 in one row and has 1 in the other. What I need to do, is delete the 1229 rows with is_current=0.
View 4 Replies
View Related
Dec 26, 2012
Any documentation supporting Oracle 11G and Advanced Security stating encryption at rest is FIPS 140-2 compliant?
View 3 Replies
View Related
Aug 4, 2009
I have one 10g database in other country. I want part of their db (selected tables or tablespaces) and import that data to my 10g DB and i want keep to date this data.
I know two ways
1. Data Pump Imp/Emp via FTP, but i can't send only data that have changed (incremental), i must pumping whole selected part of database (i want only new data from their DB, but consistanse with my DB)
2. RMAN etc. or other archivisation tool, i can do incremental achivisation, but can i send files to another instances (my db) and load only that data? Can i do that with SQL*Loader?
View 1 Replies
View Related
Aug 22, 2010
For using replication in our production, here i am testing golden gate as replication tool. I tested all scenario in Uni direction ( source to destination). Now have to test replication with DDL support in Bi-Direction. Not getting any Doc for doing replication in Bi-direction( Two Way). If any one has done the same, then please share limitation of replication in Bi-direction through Golden Gate.
View 7 Replies
View Related
Oct 14, 2008
I have 8 databases in a multi master replication. I want to refresh the tables in the replication.
View 3 Replies
View Related
Jan 28, 2011
I Have configured the replication between two database's at table level. After few miniuts of successful configuration of replication between two db's at table level, I am getting the ORA-00001: unique constraint (%s_PK) violated error in dba_apply_error.
I checked constraint name,type and status on table replicated is same on both source and destination db.
View 4 Replies
View Related
Jul 26, 2008
I am implementing one-way replication between 2 databases.
Do people leave the target database in archive-log mode? Do they backup the target database?
View 4 Replies
View Related
Feb 24, 2007
the relationship on my script.What I want to do is make it possible to assign many courses to a student.But I have read a few books on foreign keys and primary keys, and I still dont get how to go on doing this....
This is how the table creation with the keys looks right now...
CREATE TABLE CAMPUS (
CAMPUSID NUMBER(4) NOT NULL,
NAME VARCHAR2(80) NOT NULL,
CONSTRAINT CAMPUS_PK PRIMARY KEY (CAMPUSID));
[code]...
View 3 Replies
View Related
Feb 19, 2013
I need to copy the changed and deleted data in an other table. I have searched this site ,asktom and other sites also. I found the following solution from asktom website. But it gives me the changed columns data only and i need the primary key with changed data and deleted rows also.
DROP TABLE emp;
CREATE TABLE emp AS (SELECT * FROM scott.emp);
CREATE TABLE audit_table
[Code].....
View 10 Replies
View Related
Apr 3, 2006
how to disable function keys in forms6i(i.e., i want to deactivate the default function keys when running a form)
View 5 Replies
View Related
Dec 27, 2012
why function keys are not working in forms9i?
Like whenever I press F7 for query or F8 to fetch records or F10 to save records they are not functioning.
View 2 Replies
View Related
Mar 6, 2012
i need to delete a record from table but it showed a error for foreign key constraint so i disabled the constraint and again deleted, now the row is deleted.
Again inserted another values instead the deleted value. after that i tried to alter the constraint but i received the error ORA-02298 cannot validate - Parent keys not found
alter table t1 enable constraint FK_T1;
But i am not able to enable the key. what to do?
View 6 Replies
View Related
Jun 9, 2011
I used
SELECT USER_CONS_COLUMNS.CONSTRAINT_NAME,
COLUMN_NAME,
CONSTRAINT_TYPE,
[Code]...
to create a parent key table sort of thing, but for some reason there are rows that display multiple times
CONSTRAINT_NAME COLUMN_NAME CONSTRAINT_TYPE R_CONSTRAINT_NAME DELETE_RU
-------------------- -------------------- --------------- ------------------------------ ---------
SYS_C00135225 PATIENT_STATUS C
SYS_C00135226 BALANCE C
SYS_C00135227 PATIENT_STATUS C
PK_PATIENT PATIENT_NUMBER C
[Code] ..........
is it something to do with the join command
View 4 Replies
View Related
Feb 3, 2009
Inside procedure,I need to validate all the columns (Ex:col1 should not accept more than 40 chars) and update status(containing error or not) of these columns into another column in the same table.For this,I mentioned only 'UPDATE' statements.So 'WHERE' clause of some update statements not using Primary keys.
In that table composite primary key was created.This procedure is successfully complied & executed now.But this procedure took more than 10 mins to execute.I need to reduce the time to less than a min.
View 8 Replies
View Related
Feb 27, 2013
Every time I hit up, down, left, and right arrow keys to return to a previous sql command I got ^[[D, fix this issue? The backspace works fine with me.
View 2 Replies
View Related