Hi Thomas,
I dont have a complaint with DDL syntax in oracle mode not being 100%
identical to oracle,however its nice to have the same functionality available using a
different syntax.
As a general note it would be fine even if the internal mode drop foreign key
statement works in oracle mode,it saves switching modes and is much more convenient.
How can i switch modes in jdbc and odbc? In jdbc i pass it in
the connect string and would have to get a new connection in a different mode.In odbc
i set the mode in odbc manager and i dont see how i can change this at run time.
regards,
Ajit
P.S:In my particular case i a using repmcli in batch mode and mode switching is not a
problem so your soln works,Thanks.
However is it advisable to use different MODEs to access/modify the same table
(simultaeously or otherwise)?Are there any known issues with this?
-----Original Message-----
From: Anhaus, Thomas [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 03, 2003 8:15 PM
To: ajit_cus
Subject: RE: dropping foreign key in oracle mode
Hi Ajit,
the oracle mode does not guarantee, that all ORACLE DDL statements are supported.
It must be seen as a feature to simplify porting of ORACLE applications, but we don't
want to provide an ORACLE clone.
The problem with your alter table statement is that ORACLE and SAPDB have different
name spaces, i.e. in SAPDB it is possible to have a 'normal' constraint and a foreign
key constraint of one table with the same names.
In this case we cannot decide which constraint has to be dropped.
One could implement that the constraint is dropped, if the name is unique;
however I can't promise you that this will be done in the near future.
Best Regards
Thomas
-----Original Message-----
From: ajit_cus [mailto:[EMAIL PROTECTED]]
Sent: Montag, 3. Februar 2003 12:45
To: Anhaus, Thomas; [EMAIL PROTECTED]
Subject: RE: dropping foreign key in oracle mode
Hi Thomas,
Strangely enough i can create a foreign key constraint in SQLMODE ORACLE using regular
oracle syntax.
ALTER TABLE <tablename> ADD CONSTRAINT <cname> FOREIGN KEY(<columnname>) REFERENCES
<tablename>(<columnname>) ON DELETE CASCADE
i am curious as to why the droping does not work? Is this delibrate or will support be
added at a later stage?(I assume some way of droping fk constraints is necessary)
Also is it advisable to use different MODEs to access the same table (simultaeously
or otherwise)?
Note:i create tables in oracle mode.
regards,
Ajit
-----Original Message-----
From: Anhaus, Thomas [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 03, 2003 3:26 PM
To: '[EMAIL PROTECTED]'
Cc: ajit_cus
Subject: RE:dropping foreign key in oracle mode
Ajit wrote :
>How do i drop a foreign key in SQLMODE ORACLE?
>alter table <tablename> drop constraint <Referential constraint>
>says invalid constraint name
>the internal syntax of drop foreign key does not work in sqlmode oracle
Sorry, but you can't drop a foreign key in oracle mode.
You have to switch to SAPDB mode and drop the foreign key using the
following syntax :
ALTER TABLE <tablename> DROP FOREIGN KEY <constraint name>
Regards,
Thomas
--
Thomas Anhaus
SAP DB, SAP Labs Berlin
[EMAIL PROTECTED]
http://www.sapdb.org/
_______________________________________________
sapdb.general mailing list
[EMAIL PROTECTED]
http://listserv.sap.com/mailman/listinfo/sapdb.general
_______________________________________________
sapdb.general mailing list
[EMAIL PROTECTED]
http://listserv.sap.com/mailman/listinfo/sapdb.general