Problem in PK Constraints??????????????
Dear All,
i have created this table and the Tablespace is VIDI, but while creating PK Constraints the constarint is taking up the Default Tablespace APREGS. Is this a problem. Or wat is the syntax to Create constraints into a tablespace.
Below is my Script. Plz reply.
-- Create table
create table VIDI_ACCT_MATERIALS
TRANSACTION_DATE DATE,
TRANSACTION_ID CHAR(9) not null,
WORK_CODE CHAR(18) not null,
AMOUNT NUMBER,
SUPPLIER_CODE CHAR(7),
CHEQUE_NO CHAR(6),
CHEQUE_DATE DATE,
SRC_ID CHAR(8),
PCC_INFO_CODE VARCHAR2(9) not null,
CREATED_DATE DATE not null,
CREATED_BY VARCHAR2(20) not null
tablespace VIDI
pctfree 10
pctused 40
initrans 1
maxtrans 255
storage
initial 64K
minextents 1
maxextents unlimited
-- Create/Recreate primary, unique and foreign key constraints
alter table VIDI_ACCT_MATERIALS
add constraint PK_VIDI_ACCT_MATERIALS primary key (TRANSACTION_ID,PCC_INFO_CODE)
using index
tablespace APREGS
pctfree 10
initrans 2
maxtrans 255
storage
initial 64K
minextents 1
maxextents unlimited
Thanks
In any case, your constraints won't go to the tablespace where your tables resides, rather this information always go into data dictionary, which always
be in system tablespace, however you can force your associated index to be placed in different tablespce.
hare krishna
Alok
Similar Messages
-
Problem in enabling constraint - after disabling and truncation of table .
Hello Friends,
I have a table called DRR_TABLES that has list of table names . The requirement is to truncate the tables present in DRR_TABLES except KEY_IDS table and table_name like '%TYPE%' table.
written a procedure . successfullly truncating the tables from DRR_TABLES but while enabling constraints after truncation , I am getting problem in enabling constraints .
ERROR at line 1:
ORA-02270: no matching unique or primary key for this column-list
ORA-06512: at "schema123.TRUNCATE_DRR_TABLES ", line 49
ORA-06512: at line 1
Heres is the code .
PROCEDURE TRUNCATE_DRR_TABLES is
x varchar2(200);
v_tablecount number := 0;
cursor c is select TABLE_NAME from DRR_TABLES where population_source='PUBLISHING' and TABLE_NAME != 'KEY_IDS' and TABLE_NAME NOT LIKE '%TYPE%';
BEGIN
DBMS_OUTPUT.PUT_LINE (' TRUNCATING DRR TABLES ...........');
OPEN c ;
LOOP
FETCH c INTO x ;
EXIT WHEN c%NOTFOUND;
for c1 in (select table_name, constraint_name from user_constraints where TABLE_NAME = x and status ='ENABLED' ORDER BY CONSTRAINT_TYPE DESC )
loop
begin
execute immediate ('alter table '||c1.table_name||' disable constraint '||c1.constraint_name|| ' cascade');
NULL;
end;
end loop;
EXECUTE IMMEDIATE 'TRUNCATE TABLE ' || x ;
v_tablecount := v_tablecount + 1 ;
DBMS_OUTPUT.PUT_LINE('TABLE TRUNCATED :'|| x );
END LOOP ;
DBMS_OUTPUT.PUT_LINE (' TOTAL TABLES TRUNCATED ' || v_tablecount );
CLOSE c;
OPEN c ;
LOOP
FETCH c INTO x ;
EXIT WHEN c%NOTFOUND;
for c2 in (select table_name, constraint_name from user_constraints where TABLE_NAME = x and status = 'DISABLED' ORDER BY CONSTRAINT_TYPE)
loop
begin
execute immediate ('alter table '||c2.table_name||' enable constraint '||c2.constraint_name);
NULL;
end;
end loop;
END LOOP ;
CLOSE c ;
END TRUNCATE_DRR_TABLES ;
LINE 49 is the line corresponding to enable constraint statement.
Edited by: kumar73 on 3 Sep, 2012 11:44 PMIt is such a pity that a user having 321 posts till date is unaware of basics of Posting a Question.
1. You need to provide us with your Oracle version
select * from v$version;2. You need to understand and get accustomed to using tags before and after Code or SQL's for better readability.
3. You need to provide us with the Table Structure and the Constraints Definition.
There are many things that looks like Bad Coding practices:
<font face="Times New Roman" size=2>
1. Avoid RBAR (Loops).
2. Implement Bulk Collect.
3. Why do you need to disable the constraints before truncating? Are you kind of handling the Referential Integrity Constraints?
4. Duplicate checking of Disabled Constraints.
5. When the procedure is being executed at Production Environment, are you going to Monitor the DBMS_OUTPUT? Why not Log the Statements into a LOG Table?
6. Why use a TableCount variable? Would the TableCount Variable be not equal to the Number of Records returned by Cursor C?
7. What is the need to use a NULL statement after every Execute Immediate?
8. What is the Need to surround each execute Immediate with Begin .. End block?
9. Where is your Exception handling Block? Forgot to write?
</font>
What has been your effort in finding which Constraint/Table is causing you the trouble? -
Hi friends,
I have a scenario in the sense, i'm a Apex Developer.......Im developing an database application in apex by using two tables..........
One table is the one that im taking from my production instance, in my scenario i have taken the table from the HRMS.......The table name is
*) per_all_people_f
Other table is the one that im creating in the customly in apex itself, the table name is
*) xx_l_org_emp_details
Since the Apex and the production instance are of in the different server, so what i did inorder to access my production table to apex means, in the sense i created a db link between the two server and through this db link i have taken the production table in the apex........
so, according to my scenario i need to build the application using these both tables, that is the table from production instance and the table that i creating in the apex.......
According to my scenario, i shouldnot make any DML operations in the production instance table due to the security purpose.....What all i need to do is just fetch the datas from it, inorder to use it in the application.....But i can perform the DML operations in my custom table that i created in the apex(xx_l_org_emp_details).......
So inorder to use the two tables in my application i need to join the two tables,
For that in the table*"per_all_people_f"* person_id, is the primary key column...So what i did is i created a some of the columns in the custom table along with person_id in it inorder to give join between the two.....
Okay by using the two tables i have created the application......This is what the steps so far i have done.........
My problem comes over here......Since the name of the application that i was developing is the salary certificate....
So, a single person can raise more than twice or thrice the salary certificate according to his need........And all these details will be stored in the custom table xx_l_org_emp_details only...
But my problem is a single person cannot raise more than one salary certifcate request, because i have taken"person_id" as a primary key column which is unique constraint and it will not allow duplicate values.....
At that time, what i did is i disabled the unique constraint in the table and i started to insert more than three salary request by a single person........Hence all the three records raised by a single person is inserted in my custom table as i disabled the constraint.....( If the constraint is enabled means i cannot insert more than one that's why i disabled it )....
But incase, if i want to update any three of the request raised by the single person means, i need to update it......But it is not allowing me to update as it is throwing error like
>ORA-01422: exact fetch returns more than requested number ...
I know that this error will occur, as it doesnt know which record it needs to take inorder to update that's why it is throwing the above error.......
But according to my scenario i need to update all the three records raised by the single person, and also he can apply more than 3 request by himself...for this case what can i do.......Any idea friends....
Help me to achieve this........
Thanks,
GTA...Are you using an update for this? Or a merge?
Please post the statement.
An update statement updates both the rows for a given person_id with the same value.
SQL> CREATE TABLE UPDTEST
2 AS
3 SELECT 1 PERSON_ID, LEVEL * 10 SAL
4 FROM DUAL
5 CONNECT BY LEVEL < 3;
Table created.
SQL> SELECT * FROM UPDTEST;
PERSON_ID SAL
1 10
1 20
2 rows selected.
SQL> UPDATE UPDTEST SET SAL=100 WHERE PERSON_ID=1;
2 rows updated.
SQL> SELECT * FROM UPDTEST;
PERSON_ID SAL
1 100
1 100
2 rows selected.
SQL> -
Problem about FK constraints generation
I have a problem with the generation of foreign keys constraints.
I have defined FK columns and Foreign Keys on tables but when I do "Generate database from server model", in the constraint script I can't see the FK constraint and during the generation I have this warning message :"CDI-11302 Warning: foreign key XXX contains no Column/Primary Key object".
But I have defined as primary key in a table the column that I use as foreign key in this table! It born from a relation.
What can I do?
I use Design Editor version 2.0.20.5.0 configuration 2.17.
Please help me.
thank youThank you for your kind reply.
But I have just done it.
The FK has the column description and the relation to the table (and in that table this column is a primary key).
So, what else can I do?
I think that the problem must be in some general parameters but I don't know what they are.
<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Willem Laan ([email protected]):
In the FK you have to submit the columns which are connected in the two tables. i think you didn't do that yet.
Open the FK and you will see Columns. Add the columns there.<HR></BLOCKQUOTE>
null -
hi..
i am attempting to create a primary constraint on one table which containts
more than 50 lacs records.when i tried to add constraints with enable novalidate,but its failed to create a constraints on the table.
we have to preserve the data which already presented in the table. there is no way to delete and change the records which is presented now.
please in what way to over come this problem.
by
ravikumarBANNER
Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - Prod
PL/SQL Release 10.1.0.2.0 - Production
CORE 10.1.0.2.0 Production
TNS for 32-bit Windows: Version 10.1.0.2.0 - Production
NLSRTL Version 10.1.0.2.0 - Production
desc hp_tran_dtls
Name Null? Type
TC VARCHAR2(3)
DOC_NO VARCHAR2(15)
DOC_DT DATE
AGR_NO VARCHAR2(10)
TRAN_DTLS_SRNO NUMBER(6)
GL_CODE NOT NULL VARCHAR2(5)
SUB_CODE VARCHAR2(15)
REF_NO VARCHAR2(15)
REF_DT DATE
CHQ_NO VARCHAR2(10)
CHQ_DT DATE
ACT VARCHAR2(5)
DIV VARCHAR2(5)
EMP VARCHAR2(5)
PARTICULARS VARCHAR2(60)
DBCR CHAR(1)
AMT NOT NULL NUMBER(16,2)
TRN_TYPE CHAR(1)
LOCK_REC_FLG CHAR(1)
TMP_RECNO VARCHAR2(10)
VALUE_DT DATE
CHQ_BANK VARCHAR2(10)
BRANCH NOT NULL VARCHAR2(5)
SECTOR VARCHAR2(5)
PRODUCT VARCHAR2(5)
PORTFOLIO VARCHAR2(5)
FUTURE1 VARCHAR2(5)
FUTURE2 VARCHAR2(5)
BRANCHNM VARCHAR2(30)
REASON1 VARCHAR2(5)
TMP_REC_DT DATE
ADDL_AMT NUMBER(14,2)
TRANS_NAT VARCHAR2(5)
REC_STATUS CHAR(1)
BUSI_AREA VARCHAR2(5)
FA_TRANSFER CHAR(1)
CHQ_HNDL VARCHAR2(60)
CHQ_HNDL_TAG CHAR(1)
INS_CHECK VARCHAR2(2)
FA_POST_IND VARCHAR2(3)
FA_POST_DOC_NO VARCHAR2(10)
i have to create primary(tc,doc_no,TRAN_DTLS_SRNO) -
Problem in Dropping Constraints..
Hi All,
I am facing problem while dropping and recreating constraint.Requirement is i have table there is 4 check(C) type constraint and all are having different search condition.I need to alter table and drop one of them C type constraint and again recereate it.
select * from user_constraints where constraint_type='C' AND TABLE_NAME='xyz'
It will return multiple rows.
when i do
select * from user_constraints where constraint_type='C' AND TABLE_NAME='xyz' and search_condition = 'V_PARAM_CDE IN ''(''F_RECEP_PATCH'', ''NLS_LANGUAGE'')'
its throwing error : ORA-00997 illegal use of long datatype
Now i am not able to drop and recreate constraint.I need to write a script and through script need to drop and recreate it.
Please help me to sort out above problem.
Thanks n advance.
Anwar1) Rather than dropping and recreating a constraint, you're better off disabling and re-enabling it. Depending on what you're trying to do, you could also make the constraint deferrable and defer validation to the end of the transaction.
2) Do you name your constraints? If not, could you? The easiest way to be able to uniquely identify a constraint is generally to give it an informative name.
Justin -
Problem with check constraint in mysql
I am using mysql v8.14 and I have a problem on CHECK which is given below. I want to insert just 'friends' and 'all' on privacy attribute
but mysql inserts everything.
Can anyone help me, please? Thanks
CREATE TABLE `customer`
`cid` NUMERIC(6),
`cname` VARCHAR(25),
`password` VARCHAR(6),
`email` VARCHAR(25),
`phone` NUMERIC(12),
`privacy` VARCHAR(10),
PRIMARY KEY (`cid`),
CHECK (`privacy`= `friends` OR `privacy`= `all`)
);I am not familiar with MySQL syntax, but I would offer this observation:
In your definition of the check constraint:
CHECK (`privacy`= `friends` OR `privacy`= `all`)you are using the same delimiters (`) around both your column names and your literals. Is that correct?
i.e. in Oracle I would use
CHECK(privacy = 'friends' OR privacy = 'all')because privacy is not a literal, it is a column name.
Is your syntax correct? -
Problem with security-constraint use
Hola!
I need help for my j2ee 1.4 application, about using security-constraint in web.xml file.
This is my web.xml...at the bottom i'll expplain my problem:
<?xml version="1.0" encoding="UTF-8"?>
<web-app id="WebApp_ID" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<display-name>
Prova14Web</display-name>
<servlet>
<display-name>
action</display-name>
<servlet-name>action</servlet-name>
<servlet-class>
org.apache.struts.action.ActionServlet</servlet-class>
<init-param>
<param-name>config</param-name>
<param-value>/WEB-INF/struts-config.xml</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>action</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>jsp/index.jsp</welcome-file>
</welcome-file-list>
<jsp-config>
<taglib>
<taglib-uri>/WEB-INF/struts-bean.tld</taglib-uri>
<taglib-location>/WEB-INF/struts-bean.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>/WEB-INF/struts-html.tld</taglib-uri>
<taglib-location>/WEB-INF/struts-html.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>/WEB-INF/struts-logic.tld</taglib-uri>
<taglib-location>/WEB-INF/struts-logic.tld</taglib-location>
</taglib>
</jsp-config>
<security-constraint>
<display-name>
vincolo1</display-name>
<web-resource-collection>
<web-resource-name>Restricted</web-resource-name>
<url-pattern>/jsp/*</url-pattern>
<http-method>GET</http-method>
<http-method>POST</http-method>
</web-resource-collection>
<auth-constraint>
<role-name>operatore</role-name>
</auth-constraint>
</security-constraint>
<login-config>
<auth-method>FORM</auth-method>
<form-login-config>
<form-login-page>/html/login.html</form-login-page>
<form-error-page>/html/error.html</form-error-page>
</form-login-config>
</login-config>
<security-role>
<role-name>operatore</role-name>
</security-role>
</web-app>
The problem is the that when i connect to my application at http://localhost:9081/Prova14Web, the first page that appears is the welcome.jsp, when it should be appear the login page! The application bypass the login page...but I don't know why it happens!
I'm using RAD6 and Websphere6 AS.
Could you help me please??Hi ,
do u know which BADI tiggers first ?
first u need to export from the first BADI
like this
*Exporting Results to ABAP Memory for Future Calc.
IF GT_TQA[] IS NOT INITIAL.
EXPORT LT_TQA FROM GT_TQA TO MEMORY ID 'TQA'.
ENDIF.
and import in another BADI
IMPORT LT_TQA TO GT_TQA FROM MEMORY ID 'TQA'.
regards
Prabhu -
Hi to all, I have a problem with the constraint names. I need to delete the table name that is used like prefix in the constraint name.
Example:
- Actual : DBO_MYDATABASE_FK_Ho_Ka
- Desired : FK_Ho_Ka
The constraint names are FK_Ho_Ka in the creation database script, but if I import the database schema, I have DBO_MYDATABASE_FK_Ho_Ka, but I only need the constraint name.
Thanks so much :)Thanks for your time :)
I did a migration from Microsoft SQL Server 2005 to Oracle 11g database. Then, I need to use the same Entity Framework model to use with Sql Server and Oracle. Then, I need that the constraint names must be the same in the two databases.
I did the migration with Oracle Sql Developer and all works fine. The resulted migration script has the constraint name like FK_UJ_UK (that it's OK) but when I import the database schema or do the Entity Framework model, I have this constraint name DBO_MYDATABASE_FK_UJ_UK.
Edited by: Bluegene on Dec 11, 2008 9:35 AM -
Handling unique constraint exception
Hi,
I have a problem with handling constraint exception. I'm wondering is there a way to get the value that violates unique constraint. Use case is following, user creates document and then adds 50 records and manually enters inventory and serial numbers that should be unique he tries to commit but since he entered let's say inventory number that already exists in database I get exception and I can only show him error message "you've entered non unique inventory or serial numbers" so then he has to go record by record and try to figure where is the mistake. it would be much easier if I could tell him that there's a duplicate inventory and serial number in record number 34. is this possible?
thanks in advance,
Tomislav.Tomislav,
May be a good case to use a custom DBTransactionImpl, as detailed [url http://forums.oracle.com/forums/thread.jspa?threadID=700740&tstart=0]here. Something like this, perhaps (just off the top of my head):
public void postChanges(TransactionEvent te)
try
super.postChanges(te);
catch (DMLConstraintException ex)
Row r = ex.getEntityRow();
AttributeDef attrs[] = r.getStructureDef().getAttributeDefs();
int numAttrs = attrs.length;
String msg = "Duplicate key found. Primary key values: ";
for (int i = 0; i < numAttrs; i++)
if (attrs.isPrimaryKey())
msg = msg + attrs[i].getName() + ":" + r.getAttribute(i).toString() + " ";
throw new JboException(msg);
Note that this code would catch all DML exceptions, not just unique key violations. That would be left as an exercise for the reader ;)
John -
Question on PSI: Setting Constraint Type
In our current project, we are using the PSI to copy multiple tasks from one section of the project and paste at the end in order to create new set of tasks within the project. Below is the code snippet from our solution. We, first, create a new task object.
And then we unto newly created blank task, we copy the task from the source task (from another section of the project). Then, we assign new task ID GUID. Everything gets copied correctly when comparing the original task and newly created task. One property
we have question is Task_Contraint_Type. The source task’s Task_Contraint_Type is “As soon as possible” and when we make the copy (as in the code below and upon saving the project data back to Project Server and publish/check-in the project, when we open the
project, the newly created task’s constraint type is “This task has a ‘Start No Earlier Than’ constraint on
Date” (See image below). We expected “As soon as possible” because the source task was “As soon as possible” However, this was not the case.
As a result, we modified the code (see bold) so that during the copy/create new task, we set Task_Constaint_Type to “As soon as possible”. However, this still resulted, again, in “This task has a ‘Start No Earlier’…” constraint. The workaround for now was
after we finish copy all tasks, we then grab the dataset again and then update all tasks once again to set the Task_Constraint_Type to “As soon as possible”. However, this results in doing the work twice and can be potential performance hit as we noticed that
calling “QueueAddToProject” took a lot of time as project gets fairly large (we create project of size 25k tasks). Do you know why setting Task_Constaint_Type duing the initial task creation yields different value?
// Create a new task object
Project.ProjectDataSet.TaskRow newTask = _tasksDataset.Task.NewTaskRow();
// Copy data from the source task to newly created task
newTask.ItemArray = _tasksDataset.Task[i].ItemArray.Clone() as object[];
// Make a new GUID to be the new task's GUID
Guid taskId = Guid.NewGuid();
// Assign differentiating properties to the new task
newTask.PROJ_UID = _projectUid;
newTask.TASK_UID = taskId;
newTask.TASK_DUR = (int)PSLibrary.Task.DurationFormat.Day;
newTask.TASK_CONSTRAINT_TYPE = 0; //
0 = As soon as possible
newTask.StatusManager = _projectOwnerUid;Hi all,
It turns out that calling:
newTask.SetTASK_START_DATENull()
newTask.SetTASK_FINISH_DATENull()
and then:
newTask.TASK_CONSTRAINT_TYPE = 0;
solves the problem of the constraint not being set. -
Time constraint in 0008 infotype - any report for this siituation?
Hi,
I need some help to solution a big problem with time constraint and 0008 infotype.
Resume:
when I put the "2" time constraint, all the history of 0008 entries are changed...
For exemple:
Old (before "2" time constraint):
0 - 01.11.2007 - 31.12.9999 - 1000,00
0 - 01.10.2007 - 31.10.2007 - 900,00
NEW (after "2" time constraint):
0 - 01.11.2007 - 31.12.9999 - 1000,00
0 - 01.10.2007 - 01.10.2007 - 900,00
BR - 01.10.2007 - 01.10.2007 - 900,00
OR
0 - 01.11.2007 - 31.12.9999 - 1000,00
BR - 01.10.2005 - 01.10.2005 - 900,00
there aren't logical situation, all the records have a lot of errors...
Are there any report that corrects this situation????
Regards!!!!
SandraDaniel,
thanks for your response, and here's some more info:
- I've use the time contraint in multiple playlists, that have worked just fine before adding the time constraint;
- initially, after adding a time constraint (usually something like "time" "is less than" "10:00") everything seemed fine;
- only a few days later I noticed that my playlist hadn't been updated correctly. For example, one of my playlists consists of songs rated 4 and I limit to 50 songs by least recently played; with over 900 songs rated 4, after a song was played it should disappear from that playlist for a while but some songs didn't; also, sometimes I would see less than 50 songs in that playlist;
- after removing the time constraint the playlist updated correctly again
I know that the fact this only appears after a few days (or that I've only noticed it a few days later) makes it pretty tough to narrow down but that's all I've got so far.
Thanks again,
Heiko. -
Process Composer Mapping Problem
Hi, BPM experts.
I'm trying to make Process of Purchase Order,
but, Error occurs at Input Mapping.
i suppose cause is xsd type.
target item is "timeZoneCode". xsd type is token.
please tell me how to set value to timeZoneCode ?
or,please tell me how to investigate the mapping error
best regards.
YukiHi Arafat
Thank you for your answer.
I want to set fixed value to timeZoneCode.
could you tell me how to write code in [fx].
now I have written "1".
Built Error is below
==========================================
Error: Exception during constraint check of processes. Check Your model for problems.
Error: Constraint validation found errors
at com.sap.tc.glx.BpemTask.constraintCheck(BpemTask.java:352)
at com.sap.tc.glx.BpemTask.execute(BpemTask.java:135)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
at org.apache.tools.ant.Task.perform(Task.java:364)
at org.apache.tools.ant.Target.execute(Target.java:341)
at org.apache.tools.ant.Target.performTasks(Target.java:369)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
at com.sap.tc.buildplugin.techdev.ant.util.AntRunner.run(AntRunner.java:114)
at com.sap.tc.buildplugin.DefaultAntBuildAction.execute(DefaultAntBuildAction.java:57)
at com.sap.tc.buildplugin.DefaultPlugin.handleBuildStepSequence(DefaultPlugin.java:196)
at com.sap.tc.buildplugin.DefaultPlugin.performBuild(DefaultPlugin.java:168)
at com.sap.tc.buildplugin.DefaultPluginV3Delegate$BuildRequestHandler.handle(DefaultPluginV3Delegate.java:66)
at com.sap.tc.buildplugin.DefaultPluginV3Delegate.requestV3(DefaultPluginV3Delegate.java:48)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.sap.tc.buildtool.v2.impl.PluginHandler2.maybeInvoke(PluginHandler2.java:403)
at com.sap.tc.buildtool.v2.impl.PluginHandler2.request(PluginHandler2.java:149)
at com.sap.tc.buildtool.v2.impl.PluginHandler2.build(PluginHandler2.java:87)
at com.sap.tc.buildtool.PluginHandler2Wrapper.execute(PluginHandler2Wrapper.java:59)
at com.sap.tc.devconf.internal.DCProxyMake.make(DCProxyMake.java:301)
at com.sap.tc.devconf.internal.DCProxy.make(DCProxy.java:1339)
at com.sap.tc.devconf.internal.DCProxy.make(DCProxy.java:3637)
at com.sap.ide.dii05.lib.internal.commands.dc.BuildJob.build(BuildJob.java:376)
at com.sap.ide.dii05.lib.internal.commands.dc.BuildJob.doInWorkerThread(BuildJob.java:190)
at com.sap.ide.dii05.util.api.job.JdiJob$1.doInWorkerThread(JdiJob.java:77)
at com.sap.ide.dii05.util.internal.job.InternalJdiJob$3$1.run(InternalJdiJob.java:198)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1797)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1779)
at com.sap.ide.dii05.util.internal.job.InternalJdiJob$3.run(InternalJdiJob.java:207)
at com.sap.ide.dii05.util.internal.job.BusyBackgroundIndicator.showWhile(BusyBackgroundIndicator.java:74)
at com.sap.ide.dii05.util.internal.job.InternalJdiJob.internalRun(InternalJdiJob.java:188)
at com.sap.ide.dii05.util.internal.job.InternalDiiJob.runInternal(InternalDiiJob.java:305)
at com.sap.ide.dii05.util.internal.job.InternalDiiJob.runR(InternalDiiJob.java:203)
at com.sap.ide.dii05.util.internal.job.InternalDiiJob.run(InternalDiiJob.java:191)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Error: C:\NWDS\NWDS7.1ehp1.jdi\LocalDevelopment\t2\D9446D8B0B8D4F408D184E617FC71282\default\logs\build.xml:125: Constraint validation found errors
at com.sap.tc.glx.BpemTask.execute(BpemTask.java:142)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
at org.apache.tools.ant.Task.perform(Task.java:364)
at org.apache.tools.ant.Target.execute(Target.java:341)
at org.apache.tools.ant.Target.performTasks(Target.java:369)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
at com.sap.tc.buildplugin.techdev.ant.util.AntRunner.run(AntRunner.java:114)
at com.sap.tc.buildplugin.DefaultAntBuildAction.execute(DefaultAntBuildAction.java:57)
at com.sap.tc.buildplugin.DefaultPlugin.handleBuildStepSequence(DefaultPlugin.java:196)
at com.sap.tc.buildplugin.DefaultPlugin.performBuild(DefaultPlugin.java:168)
at com.sap.tc.buildplugin.DefaultPluginV3Delegate$BuildRequestHandler.handle(DefaultPluginV3Delegate.java:66)
at com.sap.tc.buildplugin.DefaultPluginV3Delegate.requestV3(DefaultPluginV3Delegate.java:48)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.sap.tc.buildtool.v2.impl.PluginHandler2.maybeInvoke(PluginHandler2.java:403)
at com.sap.tc.buildtool.v2.impl.PluginHandler2.request(PluginHandler2.java:149)
at com.sap.tc.buildtool.v2.impl.PluginHandler2.build(PluginHandler2.java:87)
at com.sap.tc.buildtool.PluginHandler2Wrapper.execute(PluginHandler2Wrapper.java:59)
at com.sap.tc.devconf.internal.DCProxyMake.make(DCProxyMake.java:301)
at com.sap.tc.devconf.internal.DCProxy.make(DCProxy.java:1339)
at com.sap.tc.devconf.internal.DCProxy.make(DCProxy.java:3637)
at com.sap.ide.dii05.lib.internal.commands.dc.BuildJob.build(BuildJob.java:376)
at com.sap.ide.dii05.lib.internal.commands.dc.BuildJob.doInWorkerThread(BuildJob.java:190)
at com.sap.ide.dii05.util.api.job.JdiJob$1.doInWorkerThread(JdiJob.java:77)
at com.sap.ide.dii05.util.internal.job.InternalJdiJob$3$1.run(InternalJdiJob.java:198)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1797)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1779)
at com.sap.ide.dii05.util.internal.job.InternalJdiJob$3.run(InternalJdiJob.java:207)
at com.sap.ide.dii05.util.internal.job.BusyBackgroundIndicator.showWhile(BusyBackgroundIndicator.java:74)
at com.sap.ide.dii05.util.internal.job.InternalJdiJob.internalRun(InternalJdiJob.java:188)
at com.sap.ide.dii05.util.internal.job.InternalDiiJob.runInternal(InternalDiiJob.java:305)
at com.sap.ide.dii05.util.internal.job.InternalDiiJob.runR(InternalDiiJob.java:203)
at com.sap.ide.dii05.util.internal.job.InternalDiiJob.run(InternalDiiJob.java:191)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Caused by: Constraint validation found errors
at com.sap.tc.glx.BpemTask.constraintCheck(BpemTask.java:352)
at com.sap.tc.glx.BpemTask.execute(BpemTask.java:135)
========================================================
Best regards,
Yuuki
Edited by: Yuki Fujioka on Aug 25, 2009 6:50 AM
Edited by: Yuki Fujioka on Aug 25, 2009 6:52 AM
Edited by: Yuki Fujioka on Aug 25, 2009 6:52 AM
Edited by: Yuki Fujioka on Aug 25, 2009 6:53 AM -
Deferred Constraints - error on inserting
Hi there,
i've got a very courios problem with deferred constraints. My table creates are:
CREATE TABLE mitglied
( svnr NUMBER(10) NOT NULL,
instr VARCHAR(20) NOT NULL,
CONSTRAINT mitglied_pk PRIMARY KEY (svnr));
CREATE TABLE abteilung
( instr VARCHAR(20) NOT NULL,
geleitetVon NUMBER(10) NOT NULL,
stvVon NUMBER(10) NOT NULL,
CONSTRAINT abteilung_pk PRIMARY KEY (instr),
CONSTRAINT abteilung_geleitetVon_fk FOREIGN KEY (geleitetVon)
REFERENCES mitglied(svnr) INITIALLY DEFERRED DEFERRABLE,
CONSTRAINT abteilung_stvVon_fk FOREIGN KEY (stvVon)
REFERENCES mitglied(svnr) INITIALLY DEFERRED DEFERRABLE);
ALTER TABLE mitglied
ADD CONSTRAINT mitglied_fk FOREIGN KEY (instr)
REFERENCES abteilung(instr) INITIALLY DEFERRED DEFERRABLE;My Inserts (from sql-file):
INSERT INTO mitglied VALUES ('1833040984', 'Edwin Neugebauer', '1984', '20-JAN-2005', 'Posaune');
<all of the other "mitglied"-inserts>
INSERT INTO abteilung VALUES ('Posaune', '1833040984', '1512101070');
<all of the other "abteilung"-inserts>
COMMIT;The Error msg:
Error starting at line 79 in command:
INSERT INTO mitglied VALUES ('1833040984', 'Edwin Neugebauer', '1984', '20-JAN-2005', 'Posaune')
Error report:
SQL Error: ORA-02091: transaction rolled back
ORA-02291: integrity constraint (U0426435.MITGLIED_FK) violated - parent key not found
(it's the same for all of the other mitglied-inserts), and of course, I get also errors on the abteilung-inserts.
I've already tried to solve this problem by using "SET AUTOCOMMIT OFF" in sqlplus, but that wasn't the point.
What's wrong with my Constraints?Please post a complete example cut-n-paste from SQL*Plus window that shows the exact output step by step (as like below).
It apparently works for me as shown below.
SQL> CREATE TABLE mitglied
2 ( svnr NUMBER(10) NOT NULL,
3 mName VARCHAR(30) NOT NULL,
4 gJahr INTEGER NOT NULL,
5 aDat DATE NOT NULL,
6 instr VARCHAR(20) NOT NULL,
7 CONSTRAINT mitglied_pk PRIMARY KEY (svnr));
Table created.
SQL> CREATE TABLE abteilung
2 ( instr VARCHAR(20) NOT NULL,
3 geleitetVon NUMBER(10) NOT NULL,
4 stvVon NUMBER(10) NOT NULL,
5 CONSTRAINT abteilung_pk PRIMARY KEY (instr),
6 CONSTRAINT abteilung_geleitetVon_fk FOREIGN KEY (geleitetVon)
7 REFERENCES mitglied(svnr) INITIALLY DEFERRED DEFERRABLE,
8 CONSTRAINT abteilung_stvVon_fk FOREIGN KEY (stvVon)
9 REFERENCES mitglied(svnr) INITIALLY DEFERRED DEFERRABLE);
Table created.
SQL> ALTER TABLE mitglied
2 ADD CONSTRAINT mitglied_fk FOREIGN KEY (instr)
3 REFERENCES abteilung(instr) INITIALLY DEFERRED DEFERRABLE;
Table altered.
SQL> INSERT INTO mitglied VALUES ('1833040984', 'Edwin Neugebauer', '1984', to_date('20-JAN-2005', 'dd-mon-yyyy'), 'Posaune');
1 row created.
SQL> INSERT INTO abteilung VALUES ('Posaune', '1833040984', '1512101070');
1 row created.
SQL> commit ;
commit
ERROR at line 1:
ORA-02091: transaction rolled back
ORA-02291: integrity constraint (OPS$LAPTOP\KKISHORE.ABTEILUNG_STVVON_FK)
violated - parent key not found
SQL>Message was edited by:
Kamal Kishore -
Implementing constraints in sql
Hi,
I have posted this message before but not got any +ve reply can some one please help me.......
I am facing a small problem i am doing a database for a supermarket i am encountering a small problem in the following area:
I have two tables:
1) orders :orderno,date
2) products:productno,price
3) new table:orderno,productno,quantity_ordered
an order can have any one number of products(should have atleast one) and a product can be any number of orders(no orders also).Now since this is a many to many on both sides im trying to resolve it by making a new table(new table)
how do i make sure that an order has atleast product ie that an orderno in order table should also be present in the new table that im creating .Can any one suggest a solution for this wether to use a trigger or check or what
please help as im stuck at this pointHi,
I have posted this message before but not got any +ve reply can some one please help meThis is not because you create too many thread on the same wubject that you will have more chance to have any help.
problem in implementing constraint
implementing constraints in sql
If you need absolutely a response, create an iTAR on Oracle support... here there are only volonteers.
You can read http://www.catb.org/~esr/faqs/smart-questions.html
Nicolas.
Maybe you are looking for
-
USB port does not work properly on Tecra M3
I need help with my Tecra M3 USB problems. It has 2 USB ports. Awhile back the USB ports refused to recognise any non-driver USB memory sticks (I do not have any driver required sticks to try). Recently I've had to re-install my Siemens ADSL modem, d
-
Should I auto update iTunes and Quicktime?
the System update asks me to update iTunes and Quicktime but I think the versions are incompatible to this version. This computer is old dog slow. Would it be slower if i upgraded to the latest OS? Is it even possible. Thanks. Will
-
Function Module SO_OBJECT_SEND
Hi Gurus, Can we send the attachments using Function Module 'SO_OBJECT_SEND'. ? If so please do let me know the code for filling the attachment and using this FM. Promise to reward points. Thanks & Regards Mac
-
For loading AuC's through AS91, the field capitalized on is a required field. How to make it optional. I have seen in the screen layout, there are fields under Posting Information, "capitalization date" which is opitonal but did not see Capitalized o
-
Hi all, Does anybody know if Auto-Id sends handling unit information to R3?? I explain, I refer when you do packing in AII and the return message (APL2) is sent to R3 if you can pass in the message the handling unit which is going to be in the delive