Skip to Main Content

Oracle Database Discussions

Announcement

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

Difference between Service Name and SID.

PsystecMay 26 2017 — edited Jun 2 2017

Hello Fellow Earthlings

I'm a bit new when it comes to creating Oracle drivers and I was the lucky winner assigned to make an oracle driver.

My driver works but, the connection string that the driver creates bypasses TNSnames, meaning its a bit of a manual string creation.

Currently my driver only replaces the SID variable and does not cater for Service_Names.

I know that Service Names are used in Cluster's and SID is a unique DB name usually, but beyond this is know nothing more.

Questions:

What is the difference between a Service Name and SID in the TNSnames? (technical answer if possible)

Can I use both in the TNSnames?

Kind Regards and thanks in advance.

This post has been answered by ddf_dba on May 26 2017
Jump to Answer

Comments

Timo Hahn
Answer

This should be done in the DB to avoid wrong data in the db. There you can add a check constraint to check if a record matches your criteria the throw a DB error. This error is picked up from the framework and published to the UI.
Another method would be to do this in java. Here you can add a business logic and check the criteria. See
Developing Fusion Web Applications with Oracle Application Development Framework (0 Bytes)Timo

Marked as Answer by User_7TK0D · Sep 2 2022
dvohra21

You can create an Alternate Key Constraint on the EO and then use the UniqueKey Validation to validate the key value at commit time. Detail at https://docs.oracle.com/middleware/12212/adf/develop/GUID-92542726-9FC2-435D-8BAC-F140CB0DC579.htm#ADFFD413

User_7TK0D

@dvohra21
May I ask why my alt keys is null?
image.png

dvohra21

Could be because an Alternate Key is not defined. Is an Alt Key defined? Please refer https://docs.oracle.com/middleware/12212/adf/develop/GUID-631716A4-95D2-41A0-A56B-FB168F5268AA.htm#ADFFD212

User_7TK0D

@dvohra21
Hello, I already added the Alternate Key and selected the UniqueKey Validation. But how can i put validation if the status is NEW/PENDING with same person number and cycle, it will throw an error or else it will insert only if the status is already set to PROCESSED

dvohra21

Since creating an alternate key essentially creates indexing on the table in the database. It will fail if duplicate records are already there**.** To remove duplicates either use advanced find to manually delete or update records or duplicate detection job to delete the record. This usually happens when multiple records exist that have the same combined alternate key in the target system. Run an advanced find for the fields that make up the alternate key on the entity in question and I'm sure you will find duplicate results. Changing the values of one of those duplicate records (across every pair of duplicates) will allow the key to be created once there are no duplicates.

User_7TK0D

@timo-hahn1 @dvohra21
Thanks for your help. I used the method validator for validating the ADF table.

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

Post Details

Locked on Jun 30 2017
Added on May 26 2017
24 comments
60,201 views