Schema name of compiling entity automatically prepended - DATA CORRUPTION

- Synopsis -
Forms 6i is prepending the schema name of the user who compiled the form when the schema name is unspecified. When a schema name is unspecified, it should use existance and synonym rules associated with the runtime user. Forms new mode of operation is incorrect and may have caused DATA CORRUPTION on our system.
- Main Text -
When creating a .fmx under Dev 6i, the user name of the user who compiled the form gets automatically prepended to database functions, procedures, and tables, which are called in a form function or procedure. But this incorrect implicit user/schema name remains hidden from the Developer.
Forms should not do this, it should, as it used to, allow the database to handle which schema is to be referenced using synonym and existance rules based on the user running the form, not the user who compiled the form.
This is EXTREMELY BAD. I'm a 12 year veteran of Forms, OCP certified, and this has caused potential DATA CORRUPTION in our database. In our database, we have a main and a test schema, both with all of the same schema elements. We found out that there was a problem when data that was being pulled back from a function was being pulled from the other schema, because the FMB was compiled under that other schema's username.
The fact that forms will behave this way is not apparent through the Developer either. The prepended schema name does not show up in the procedure or function call. I had to go in to the .fmx file with a hex editor to determine that forms was doing this "for" me.
If there is some option that tells Forms not to prepend the schema name, please let me know, but I already looked through every entry in Help with the word schema and didn't find anything.
For any whom work at Oracle, this should be fixed immediately and sent out on the next revision of Developer. This has potentially disastrous affects on data. If a fix has already been made please let me know.
Thanks,
Rob Erwin
[email protected]

Hi John,
Yes, we're running against Oracle7. Well, at least I know how to fix the problem, now I just have to find time to update the database.
Thanks,
Rob

Similar Messages

  • Schema name is not showing in the Data load

    Hi All,
    I am trying to load a CSV file using oracle apex data load option. The options are using a new table and file upload(.csv). In the load data page, the schema name is not listing my current schema because of which i could not to upload the CSV file.
    Can anyone please help on this ?
    I am using oracle apex 4.1.1
    Regards
    Rajendrakumar.P

    Raj,
    Did you export this application from another workspace perhaps? I have seen in the past that if you create a data load page based on schema A and then import that application and set it to parse as schema B, it will not work.
    The solution - although unsupported - is to simply alter the parse-as schema reference in the APEX export file. A more supported version would be to re-create the data load pages in the target application, so that it picks up on the proper parse-as schema.
    Thanks,
    - Scott -
    http://spendolini.blogspot.com
    http://www.enkitec.com

  • How can I automatically prepend comment blocks to stored procedures?

    How can I automatically prepend comment blocks to stored procedures?
    In my organization, the standard is to comment all stored procedures with a comment block that looks like this:
    /*-- =============================================
    -- Created by: <Owner>
    -- Created date: 01/08/2012
    -- Purpose: Inserts new setting value, code and description
    -- Modifications:
    -- Modified by: <Owner>
    -- Modification date: 01/08/2012
    -- Purpose: Inserts new setting value, code and description
    -- =============================================*/Thanks.
    select * from v$version;
    BANNER                                                                        
    Oracle Database 11g Express Edition Release 11.2.0.2.0 - Production             
    PL/SQL Release 11.2.0.2.0 - Production                                          
    CORE     11.2.0.2.0     Production  Edited by: xDeviates on 01-ago-2012 7:37
    Edited by: xDeviates on 01-ago-2012 8:31

    Hi,
    If I want to write a package called pk_fubar, I copy the following script and call it fubar.sql
    --     ==========  package_name.sql starts here  ==========
    --     Package_Name.sql
    SPOOL     &home_dir\package_name.lst
    PROMPT     .     H   H  EEEE     A    DDDD
    PROMPT     .     H   H  E       A A   D   D
    PROMPT     .     HHHHH  EEE    A   A  D   D
    PROMPT     .     H   H  E      AAAAA  D   D
    PROMPT     .     H   H  EEEEE  A   A  DDDD
    @@package_name_head
    PROMPT     .     BBBB    OOO   DDDD   Y   Y
    PROMPT     .     B   B  O   O  D   D   Y Y
    PROMPT     .     BBBB   O   O  D   D    Y
    PROMPT     .     B   B  O   O  D   D    Y
    PROMPT     .     BBBB    OOO   DDDD     Y
    @@package_name_body
    SPOOL     OFF
    @@package_name_test
    -- EXIT
    --     ==========  package_name_head.sql starts here  ==========
    CREATE OR REPLACE PACKAGE     pk_package_name
    AS
    FUNCTION     sign_in
    (     in_user_name     IN     VARCHAR2
    ,     in_password_txt     IN     VARCHAR2
    RETURN     PLS_INTEGER
    END     pk_package_name;
    SHOW ERRORS;
    GRANT     EXECUTE     ON pk_package_name     TO schema_name_some_role;
    --     ==========  package_name_body.sql starts here  ==========
    CREATE OR REPLACE PACKAGE BODY     pk_package_name
    AS
    --  Procedures related to SCHEMA_NAME ...
    --  2012 July 23 -- Package started with proc_x.  (Frank Kulash)
    --     **   local procedures and variables   **
    --     **   x   **
    --     **   initialization section   **
    --     The following code is executed once per session, when the package is loaded.
    BEGIN
         set_var     ( 'DT_FMT_TXT'
              , 'YYYY-MM-DD HH24:MI:SS'
    END     pk_package_name;
    SHOW ERRORS;
    --     ==========  package_name_test.sql starts here  ==========
    --     PACKAGE_NAME_TEST.SQL -- Test procedures in schema_name.pk_package_name
    SET     DOCUMENT     OFF
    SET     SERVEROUTPUT     ON     SIZE     10000
    ALTER SESSION     SET NLS_DATE_FORMAT = 'DD-Mon-YYYY HH24:MI:SS';
    SPOOL     @@package_name_test.lst
    PROMPT
    PROMPT     ***********************
    PROMPT     **  Testing x  **
    PROMPT     ***********************
    PROMPT
    SPOOL     OFFThen I replace package_name with fubar, and schema_name with the actual schema name. Finally, I cut off parts from the end to create fubar_test.sql, fubar_body.sql and fubar_head.sql. You could easily include a multi-line procedure comment template in this script. Every time you add a procedure or function, ciopy and paste that comment template, and then modify the copy.

  • Schema Name is not identified in persistence.xml

    Hi
    i am calling the schema in persistence.xml, schema name is not identified, if i give in entity level it working.
    <property name="toplink.jdbc.schema" value="mySchema"/>
    my persistance.xml folows
    <persistence-unit name="TestDB2" transaction-type="RESOURCE_LOCAL">
    <provider>oracle.toplink.essentials.PersistenceProvider</provider>
    <class>com.test.jpa.TblCustAddress</class>
    <class>com.test.jpa.TblCustomer</class>
    <class>com.test.jpa.TblCustContact</class>
    <exclude-unlisted-classes>false</exclude-unlisted-classes>
    <properties>
    <property name="toplink.jdbc.url" value="url"/>
    <property name="toplink.jdbc.user" value="userName"/>
    <property name="toplink.jdbc.driver" value="com.ibm.db2.jcc.DB2Driver"/>
    <property name="toplink.jdbc.password" value="Password"/>
    <property name="toplink.jdbc.schema" value="mySchema"/>
    </properties>
    </persistence-unit>
    please help me on this.......
    srini

    Hi Vinay,
    I am using the three entityclasses, SimpleSessionCustomizer and one mainclass see the below.
    persistence.xml
    <persistence-unit name="TestDB2" transaction-type="RESOURCE_LOCAL">
    <provider>oracle.toplink.essentials.PersistenceProvider</provider>
    <provider>org.apache.openjpa.persistence.PersistenceProviderImpl</provider>
    <class>com.test.jpa.TblCustAddress</class>
    <class>com.test.jpa.TblCustomer</class>
    <class>com.test.jpa.TblCustContact</class>
    <exclude-unlisted-classes>false</exclude-unlisted-classes>
    <properties>
    <property name="toplink.jdbc.url" value="jdbc:db2://host:port/TESTDATA"/>
    <property name="toplink.jdbc.user" value="user"/>
    <property name="toplink.jdbc.driver" value="com.ibm.db2.jcc.DB2DataSource"/>
    <property name="toplink.jdbc.password" value="password"/>
    <property name="toplink.session.customizer" value="com.test.jpa.impl.SampleSessionCustomizer" />
    </properties>
    </persistence-unit>
    EntityClass  One:
    * To change this template, choose Tools | Templates
    * and open the template in the editor.
    package com.test.jpa;
    import java.io.Serializable;
    import java.util.Collection;
    import java.util.Date;
    import javax.persistence.Basic;
    import javax.persistence.CascadeType;
    import javax.persistence.Column;
    import javax.persistence.Entity;
    import javax.persistence.Id;
    import javax.persistence.Lob;
    import javax.persistence.OneToMany;
    import javax.persistence.Table;
    import javax.persistence.Temporal;
    import javax.persistence.TemporalType;
    import javax.persistence.UniqueConstraint;
    * @author Srinivasulu.Kristnam
    @Entity
    @Table(name = "tblCustomer", schema="POLINFO", uniqueConstraints = {@UniqueConstraint(columnNames = {"txtGivenName1", "PK_customer"}), @UniqueConstraint(columnNames = {"FK_contact", "PK_customer"}), @UniqueConstraint(columnNames = {"txtLatestAgt", "txtType", "PK_customer"}), @UniqueConstraint(columnNames = {"txtType", "PK_customer"}), @UniqueConstraint(columnNames = {"txtLegacyID", "PK_customer"}), @UniqueConstraint(columnNames = {"FK_address", "FK_contact", "PK_customer"})})
    //@NamedQueries({@NamedQuery(name = "TblCustomer.findAll", query = "SELECT t FROM TblCustomer t"), @NamedQuery(name = "TblCustomer.findByPKcustomer", query = "SELECT t FROM TblCustomer t WHERE t.pKcustomer = :pKcustomer"), @NamedQuery(name = "TblCustomer.findByFKcustomer", query = "SELECT t FROM TblCustomer t WHERE t.fKcustomer = :fKcustomer"), @NamedQuery(name = "TblCustomer.findByFKcontact", query = "SELECT t FROM TblCustomer t WHERE t.fKcontact = :fKcontact"), @NamedQuery(name = "TblCustomer.findByFKaddress", query = "SELECT t FROM TblCustomer t WHERE t.fKaddress = :fKaddress"), @NamedQuery(name = "TblCustomer.findByTxtCustomerID", query = "SELECT t FROM TblCustomer t WHERE t.txtCustomerID = :txtCustomerID"), @NamedQuery(name = "TblCustomer.findByTxtLegacyID", query = "SELECT t FROM TblCustomer t WHERE t.txtLegacyID = :txtLegacyID"), @NamedQuery(name = "TblCustomer.findByTxtNationalID", query = "SELECT t FROM TblCustomer t WHERE t.txtNationalID = :txtNationalID"), @NamedQuery(name = "TblCustomer.findByTxtSSNID", query = "SELECT t FROM TblCustomer t WHERE t.txtSSNID = :txtSSNID"), @NamedQuery(name = "TblCustomer.findByTxtSex", query = "SELECT t FROM TblCustomer t WHERE t.txtSex = :txtSex"), @NamedQuery(name = "TblCustomer.findByDteDOB", query = "SELECT t FROM TblCustomer t WHERE t.dteDOB = :dteDOB"), @NamedQuery(name = "TblCustomer.findByTxtAgtCd", query = "SELECT t FROM TblCustomer t WHERE t.txtAgtCd = :txtAgtCd"), @NamedQuery(name = "TblCustomer.findByTxtLatestAgt", query = "SELECT t FROM TblCustomer t WHERE t.txtLatestAgt = :txtLatestAgt"), @NamedQuery(name = "TblCustomer.findByTxtFamilyName", query = "SELECT t FROM TblCustomer t WHERE t.txtFamilyName = :txtFamilyName"), @NamedQuery(name = "TblCustomer.findByTxtGivenName1", query = "SELECT t FROM TblCustomer t WHERE t.txtGivenName1 = :txtGivenName1"), @NamedQuery(name = "TblCustomer.findByTxtGivenName2", query = "SELECT t FROM TblCustomer t WHERE t.txtGivenName2 = :txtGivenName2"), @NamedQuery(name = "TblCustomer.findByTxtNickname", query = "SELECT t FROM TblCustomer t WHERE t.txtNickname = :txtNickname"), @NamedQuery(name = "TblCustomer.findByTxtCreatedby", query = "SELECT t FROM TblCustomer t WHERE t.txtCreatedby = :txtCreatedby"), @NamedQuery(name = "TblCustomer.findByTxtChangedby", query = "SELECT t FROM TblCustomer t WHERE t.txtChangedby = :txtChangedby"), @NamedQuery(name = "TblCustomer.findByTxtOffice", query = "SELECT t FROM TblCustomer t WHERE t.txtOffice = :txtOffice"), @NamedQuery(name = "TblCustomer.findByDteCreated", query = "SELECT t FROM TblCustomer t WHERE t.dteCreated = :dteCreated"), @NamedQuery(name = "TblCustomer.findByDteLastupd", query = "SELECT t FROM TblCustomer t WHERE t.dteLastupd = :dteLastupd"), @NamedQuery(name = "TblCustomer.findByTxtStatus", query = "SELECT t FROM TblCustomer t WHERE t.txtStatus = :txtStatus"), @NamedQuery(name = "TblCustomer.findByTxtType", query = "SELECT t FROM TblCustomer t WHERE t.txtType = :txtType"), @NamedQuery(name = "TblCustomer.findByTxtFindphone", query = "SELECT t FROM TblCustomer t WHERE t.txtFindphone = :txtFindphone"), @NamedQuery(name = "TblCustomer.findByTxtFindpostCd", query = "SELECT t FROM TblCustomer t WHERE t.txtFindpostCd = :txtFindpostCd"), @NamedQuery(name = "TblCustomer.findByDteExternupd", query = "SELECT t FROM TblCustomer t WHERE t.dteExternupd = :dteExternupd"), @NamedQuery(name = "TblCustomer.findByTxtSource", query = "SELECT t FROM TblCustomer t WHERE t.txtSource = :txtSource"), @NamedQuery(name = "TblCustomer.findByTxtID", query = "SELECT t FROM TblCustomer t WHERE t.txtID = :txtID"), @NamedQuery(name = "TblCustomer.findByTxtEmail", query = "SELECT t FROM TblCustomer t WHERE t.txtEmail = :txtEmail"), @NamedQuery(name = "TblCustomer.findByTxtURL", query = "SELECT t FROM TblCustomer t WHERE t.txtURL = :txtURL"), @NamedQuery(name = "TblCustomer.findByTxtSicCd", query = "SELECT t FROM TblCustomer t WHERE t.txtSicCd = :txtSicCd"), @NamedQuery(name = "TblCustomer.findByIntStamp", query = "SELECT t FROM TblCustomer t WHERE t.intStamp = :intStamp"), @NamedQuery(name = "TblCustomer.findByTxtClientkey", query = "SELECT t FROM TblCustomer t WHERE t.txtClientkey = :txtClientkey"), @NamedQuery(name = "TblCustomer.findByTxtExceptionCd", query = "SELECT t FROM TblCustomer t WHERE t.txtExceptionCd = :txtExceptionCd"), @NamedQuery(name = "TblCustomer.findByTxtScoregroup", query = "SELECT t FROM TblCustomer t WHERE t.txtScoregroup = :txtScoregroup"), @NamedQuery(name = "TblCustomer.findByTxtImportanceRating", query = "SELECT t FROM TblCustomer t WHERE t.txtImportanceRating = :txtImportanceRating"), @NamedQuery(name = "TblCustomer.findByTxtTerritory", query = "SELECT t FROM TblCustomer t WHERE t.txtTerritory = :txtTerritory"), @NamedQuery(name = "TblCustomer.findByTxtRegno", query = "SELECT t FROM TblCustomer t WHERE t.txtRegno = :txtRegno"), @NamedQuery(name = "TblCustomer.findByDteIncorp", query = "SELECT t FROM TblCustomer t WHERE t.dteIncorp = :dteIncorp"), @NamedQuery(name = "TblCustomer.findByTxtIncorpCountry", query = "SELECT t FROM TblCustomer t WHERE t.txtIncorpCountry = :txtIncorpCountry"), @NamedQuery(name = "TblCustomer.findByTxtSourceOrigin", query = "SELECT t FROM TblCustomer t WHERE t.txtSourceOrigin = :txtSourceOrigin"), @NamedQuery(name = "TblCustomer.findByTxtFullName", query = "SELECT t FROM TblCustomer t WHERE t.txtFullName = :txtFullName")})
    public class TblCustomer implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "PK_customer", nullable = false, length = 12)
    private String pKcustomer;
    @Column(name = "FK_customer", length = 12)
    private String fKcustomer;
    @Column(name = "FK_contact", length = 12)
    private String fKcontact;
    @Column(name = "FK_address", length = 12)
    private String fKaddress;
    @Basic(optional = false)
    @Column(name = "txtCustomerID", nullable = false, length = 12)
    private String txtCustomerID;
    @Basic(optional = false)
    @Column(name = "txtLegacyID", nullable = false, length = 10)
    private String txtLegacyID;
    @Column(name = "txtNationalID", length = 20)
    private String txtNationalID;
    @Column(name = "txtSSNID", length = 20)
    private String txtSSNID;
    @Column(name = "txtSex")
    private Character txtSex;
    @Column(name = "dteDOB")
    @Temporal(TemporalType.TIMESTAMP)
    private Date dteDOB;
    @Column(name = "txtAgtCd", length = 10)
    private String txtAgtCd;
    @Column(name = "txtLatestAgt", length = 10)
    private String txtLatestAgt;
    @Column(name = "txtFamilyName", length = 30)
    private String txtFamilyName;
    @Column(name = "txtGivenName1", length = 35)
    private String txtGivenName1;
    @Column(name = "txtGivenName2", length = 35)
    private String txtGivenName2;
    @Column(name = "txtNickname", length = 100)
    private String txtNickname;
    @Column(name = "txtCreatedby", length = 12)
    private String txtCreatedby;
    @Column(name = "txtChangedby", length = 12)
    private String txtChangedby;
    @Column(name = "txtOffice", length = 12)
    private String txtOffice;
    @Column(name = "dteCreated")
    @Temporal(TemporalType.TIMESTAMP)
    private Date dteCreated;
    @Column(name = "dteLastupd")
    @Temporal(TemporalType.TIMESTAMP)
    private Date dteLastupd;
    @Column(name = "txtStatus", length = 10)
    private String txtStatus;
    @Lob
    @Column(name = "binMark")
    private byte[] binMark;
    @Column(name = "txtType", length = 10)
    private String txtType;
    @Column(name = "txtFindphone", length = 20)
    private String txtFindphone;
    @Column(name = "txtFindpostCd", length = 10)
    private String txtFindpostCd;
    @Column(name = "dteExternupd")
    @Temporal(TemporalType.TIMESTAMP)
    private Date dteExternupd;
    @Column(name = "txtSource", length = 10)
    private String txtSource;
    @Column(name = "txtID", length = 10)
    private String txtID;
    @Column(name = "txtEmail", length = 60)
    private String txtEmail;
    @Column(name = "txtURL", length = 60)
    private String txtURL;
    @Column(name = "txtSicCd", length = 10)
    private String txtSicCd;
    @Basic(optional = false)
    @Column(name = "intStamp", nullable = false)
    private int intStamp;
    @Column(name = "txtClientkey", length = 12)
    private String txtClientkey;
    @Column(name = "txtExceptionCd", length = 10)
    private String txtExceptionCd;
    @Column(name = "txtScoregroup", length = 10)
    private String txtScoregroup;
    @Column(name = "txtImportanceRating", length = 10)
    private String txtImportanceRating;
    @Column(name = "txtTerritory", length = 10)
    private String txtTerritory;
    @Column(name = "txtRegno", length = 20)
    private String txtRegno;
    @Column(name = "dteIncorp")
    @Temporal(TemporalType.TIMESTAMP)
    private Date dteIncorp;
    @Column(name = "txtIncorpCountry", length = 10)
    private String txtIncorpCountry;
    @Column(name = "txtSourceOrigin", length = 15)
    private String txtSourceOrigin;
    // @Basic(optional = false)
    // @Lob
    //@Column(name = "CustTimestamp", nullable = false)
    // @Transient
    // private byte[] custTimestamp;
    @Column(name = "txtFullName", length = 100)
    private String txtFullName;
    @OneToMany(cascade = {CascadeType.PERSIST,CascadeType.REMOVE}, mappedBy = "fKcustomer")
    private Collection<TblCustAddress> tblCustAddressCollection;
    @OneToMany(cascade = CascadeType.PERSIST, mappedBy = "fKcustomer")
    private Collection<TblCustContact> custContacts;
    public Collection<TblCustContact> getCustContacts() {
    return custContacts;
    public void setCustContacts(Collection<TblCustContact> custContacts) {
    this.custContacts = custContacts;
    public TblCustomer() {
    public TblCustomer(String pKcustomer) {
    this.pKcustomer = pKcustomer;
    public TblCustomer(String pKcustomer, String txtCustomerID, String txtLegacyID, int intStamp/*, byte[] custTimestamp*/) {
    this.pKcustomer = pKcustomer;
    this.txtCustomerID = txtCustomerID;
    this.txtLegacyID = txtLegacyID;
    this.intStamp = intStamp;
    //this.custTimestamp = custTimestamp;
    public String getPKcustomer() {
    return pKcustomer;
    public void setPKcustomer(String pKcustomer) {
    this.pKcustomer = pKcustomer;
    public String getFKcustomer() {
    return fKcustomer;
    public void setFKcustomer(String fKcustomer) {
    this.fKcustomer = fKcustomer;
    public String getFKcontact() {
    return fKcontact;
    public void setFKcontact(String fKcontact) {
    this.fKcontact = fKcontact;
    public String getFKaddress() {
    return fKaddress;
    public void setFKaddress(String fKaddress) {
    this.fKaddress = fKaddress;
    public String getTxtCustomerID() {
    return txtCustomerID;
    public void setTxtCustomerID(String txtCustomerID) {
    this.txtCustomerID = txtCustomerID;
    public String getTxtLegacyID() {
    return txtLegacyID;
    public void setTxtLegacyID(String txtLegacyID) {
    this.txtLegacyID = txtLegacyID;
    public String getTxtNationalID() {
    return txtNationalID;
    public void setTxtNationalID(String txtNationalID) {
    this.txtNationalID = txtNationalID;
    public String getTxtSSNID() {
    return txtSSNID;
    public void setTxtSSNID(String txtSSNID) {
    this.txtSSNID = txtSSNID;
    public Character getTxtSex() {
    return txtSex;
    public void setTxtSex(Character txtSex) {
    this.txtSex = txtSex;
    public Date getDteDOB() {
    return dteDOB;
    public void setDteDOB(Date dteDOB) {
    this.dteDOB = dteDOB;
    public String getTxtAgtCd() {
    return txtAgtCd;
    public void setTxtAgtCd(String txtAgtCd) {
    this.txtAgtCd = txtAgtCd;
    public String getTxtLatestAgt() {
    return txtLatestAgt;
    public void setTxtLatestAgt(String txtLatestAgt) {
    this.txtLatestAgt = txtLatestAgt;
    public String getTxtFamilyName() {
    return txtFamilyName;
    public void setTxtFamilyName(String txtFamilyName) {
    this.txtFamilyName = txtFamilyName;
    public String getTxtGivenName1() {
    return txtGivenName1;
    public void setTxtGivenName1(String txtGivenName1) {
    this.txtGivenName1 = txtGivenName1;
    public String getTxtGivenName2() {
    return txtGivenName2;
    public void setTxtGivenName2(String txtGivenName2) {
    this.txtGivenName2 = txtGivenName2;
    public String getTxtNickname() {
    return txtNickname;
    public void setTxtNickname(String txtNickname) {
    this.txtNickname = txtNickname;
    public String getTxtCreatedby() {
    return txtCreatedby;
    public void setTxtCreatedby(String txtCreatedby) {
    this.txtCreatedby = txtCreatedby;
    public String getTxtChangedby() {
    return txtChangedby;
    public void setTxtChangedby(String txtChangedby) {
    this.txtChangedby = txtChangedby;
    public String getTxtOffice() {
    return txtOffice;
    public void setTxtOffice(String txtOffice) {
    this.txtOffice = txtOffice;
    public Date getDteCreated() {
    return dteCreated;
    public void setDteCreated(Date dteCreated) {
    this.dteCreated = dteCreated;
    public Date getDteLastupd() {
    return dteLastupd;
    public void setDteLastupd(Date dteLastupd) {
    this.dteLastupd = dteLastupd;
    public String getTxtStatus() {
    return txtStatus;
    public void setTxtStatus(String txtStatus) {
    this.txtStatus = txtStatus;
    public byte[] getBinMark() {
    return binMark;
    public void setBinMark(byte[] binMark) {
    this.binMark = binMark;
    public String getTxtType() {
    return txtType;
    public void setTxtType(String txtType) {
    this.txtType = txtType;
    public String getTxtFindphone() {
    return txtFindphone;
    public void setTxtFindphone(String txtFindphone) {
    this.txtFindphone = txtFindphone;
    public String getTxtFindpostCd() {
    return txtFindpostCd;
    public void setTxtFindpostCd(String txtFindpostCd) {
    this.txtFindpostCd = txtFindpostCd;
    public Date getDteExternupd() {
    return dteExternupd;
    public void setDteExternupd(Date dteExternupd) {
    this.dteExternupd = dteExternupd;
    public String getTxtSource() {
    return txtSource;
    public void setTxtSource(String txtSource) {
    this.txtSource = txtSource;
    public String getTxtID() {
    return txtID;
    public void setTxtID(String txtID) {
    this.txtID = txtID;
    public String getTxtEmail() {
    return txtEmail;
    public void setTxtEmail(String txtEmail) {
    this.txtEmail = txtEmail;
    public String getTxtURL() {
    return txtURL;
    public void setTxtURL(String txtURL) {
    this.txtURL = txtURL;
    public String getTxtSicCd() {
    return txtSicCd;
    public void setTxtSicCd(String txtSicCd) {
    this.txtSicCd = txtSicCd;
    public int getIntStamp() {
    return intStamp;
    public void setIntStamp(int intStamp) {
    this.intStamp = intStamp;
    public String getTxtClientkey() {
    return txtClientkey;
    public void setTxtClientkey(String txtClientkey) {
    this.txtClientkey = txtClientkey;
    public String getTxtExceptionCd() {
    return txtExceptionCd;
    public void setTxtExceptionCd(String txtExceptionCd) {
    this.txtExceptionCd = txtExceptionCd;
    public String getTxtScoregroup() {
    return txtScoregroup;
    public void setTxtScoregroup(String txtScoregroup) {
    this.txtScoregroup = txtScoregroup;
    public String getTxtImportanceRating() {
    return txtImportanceRating;
    public void setTxtImportanceRating(String txtImportanceRating) {
    this.txtImportanceRating = txtImportanceRating;
    public String getTxtTerritory() {
    return txtTerritory;
    public void setTxtTerritory(String txtTerritory) {
    this.txtTerritory = txtTerritory;
    public String getTxtRegno() {
    return txtRegno;
    public void setTxtRegno(String txtRegno) {
    this.txtRegno = txtRegno;
    public Date getDteIncorp() {
    return dteIncorp;
    public void setDteIncorp(Date dteIncorp) {
    this.dteIncorp = dteIncorp;
    public String getTxtIncorpCountry() {
    return txtIncorpCountry;
    public void setTxtIncorpCountry(String txtIncorpCountry) {
    this.txtIncorpCountry = txtIncorpCountry;
    public String getTxtSourceOrigin() {
    return txtSourceOrigin;
    public void setTxtSourceOrigin(String txtSourceOrigin) {
    this.txtSourceOrigin = txtSourceOrigin;
    // public byte[] getCustTimestamp() {
    // return custTimestamp;
    // public void setCustTimestamp(byte[] custTimestamp) {
    // this.custTimestamp = custTimestamp;
    public String getTxtFullName() {
    return txtFullName;
    public void setTxtFullName(String txtFullName) {
    this.txtFullName = txtFullName;
    public Collection<TblCustAddress> getTblCustAddressCollection() {
    return tblCustAddressCollection;
    public void setTblCustAddressCollection(Collection<TblCustAddress> tblCustAddressCollection) {
    this.tblCustAddressCollection = tblCustAddressCollection;
    @Override
    public int hashCode() {
    int hash = 0;
    hash += (pKcustomer != null ? pKcustomer.hashCode() : 0);
    return hash;
    @Override
    public boolean equals(Object object) {
    // TODO: Warning - this method won't work in the case the id fields are not set
    if (!(object instanceof TblCustomer)) {
    return false;
    TblCustomer other = (TblCustomer) object;
    if ((this.pKcustomer == null && other.pKcustomer != null) || (this.pKcustomer != null && !this.pKcustomer.equals(other.pKcustomer))) {
    return false;
    return true;
    @Override
    public String toString() {
    return "com.test.jpa.TblCustomer[pKcustomer=" + pKcustomer + "]";
    }

  • Passing a Schema Name to a Procedure

    Hi,
    I'm hoping there's a really simple answer to this...
    We have an Oracle database containing many schemata, all customer schemata are identical but hold different data pertaining to each customer.
    We also have a 'reporting' schema which has select privileges on all the other schemata.
    In this reporting schema we have various ref cursor returning procedures, and we use dot notation to reference the required schema - E.g. 'select * from SCHEMA1.Customers'.
    What I'd like to do is pass a schema name as a parameter to a procedure so the one procedure could cover all schemata. - E.g. call p_GetCustomers('SchemaNameParameter'). The procedure would then return the customer data for a given schema.
    All I've come up with (thus far) is using EXECUTE IMMEDIATE.
    E.g. (very simplified)
    create or replace procedure p_GetCustomers(pSchema in varchar2) as
    vExecuteString varchar2(100);
    begin
    vExecuteString := 'select * from '|| pSchema ||'.ICustomers';
    execute immediate vExecuteString ;
    end;
    This does the job in extremely simple procedures/functions, but we have some heavy-duty procedures that would make it extremely hard to do the concatenation as they mention the schema all over the place.
    What I'd ideally like is something like...
    create or replace procedure p_GetCustomers(pSchema in varchar2) as
    begin
    select * from pSchema.Customers;
    end;
    But the above won't compile (table or view does not exist...).
    I'd be extremely grateful if somebody could advise on this...
    Thanking you in advance (and hope!)...
    Mike
    Oracle 10.g - Windows - Oracle SQL Developer 1.1.2

    The owner of the procedure needs to have the ALTER SESSION system privilege granted directly to them, but that is all. The SET CURRENT_SCHEMA <name> just defines the namespace to look in, it does not make you that user. The reporting user (presumably the procedure owner) still needs to have SELECT privileges on all of the tables.
    SQL> show user
    USER is "OPS$ORACLE"
    SQL> CREATE USER a IDENTIFIED BY a;
    User created.
    SQL> GRANT CREATE SESSION, ALTER SESSION to a;
    Grant succeeded.
    SQL> CREATE TABLE t (id NUMBER, descr VARCHAR2(10));
    Table created.
    SQL> INSERT INTO t VALUES (1, 'OP$ORACLE');
    1 row created.
    SQL> COMMIT;
    Commit complete.
    SQL> GRANT SELECT ON t TO a;
    Grant succeeded.
    SQL> connect mpprod/********
    Connected.
    SQL> CREATE TABLE t (id NUMBER, descr VARCHAR2(10));
    Table created.
    SQL> INSERT INTO t VALUES (1, 'MPPROD');
    1 row created.
    SQL> COMMIT;
    Commit complete.
    SQL> GRANT SELECT ON t TO a;
    Grant succeeded.
    SQL> connect a/a
    Connected.
    SQL> ALTER SESSION SET CURRENT_SCHEMA = ops$oracle;
    Session altered.
    SQL> SELECT * FROM t;
            ID DESCR
             1 OP$ORACLE
    SQL> ALTER SESSION SET CURRENT_SCHEMA = mpprod;
    Session altered.
    SQL> SELECT * FROM t;
            ID DESCR
             1 MPPRODJohn

  • How to exclude schema name from exported files (PL SQL Developer)

    Dear all,
    Just one question: I am using PL SQL Developer. My goal is to export some data (as .sql and .dmp files) from one database and to import them into the another database (both databases have identical structure - test database and production, just different database names and names of schema. In order to make it possible, I need to exclude schema name from generated export file. I believe that it is possible to do it automatically by setting up parameters of PL SQL Developer. How?
    Thank you in advance,
    Kindest regards,
    Dragana

    In the meantime, I have found the answer on my previous question:
    Actually, the initial idea (how to exclude schema name from exported files) was wrong. No need for any intervention.
    Trick is: Schema name can be changed during the import of exported files (PL SQL Developer during import gives possibility: From User (old schema) To User (new schema) .
    Hope that this will be useful info for others.
    Dragana

  • Any Function module or BAPIs are available to get scheme name for the inter

    I have internal order no value in table  AUFK-AUFNR ,  and the internal order corresponding Scheme value is available in IMPR-PRNAM . Now I want to inner join both the tables to extract the data , but there is no common field . Is there any Function module or BAPIs are available to get scheme name for the internal orders?

    look at DB-VIEW  "V_IVP_OR".
    Regards,
    Laurent

  • Using dbms_datapump package to export the schema with the schema name as pa

    Hi,
    I am using the pl/sql block to export schema using dbms_datapump package,Now I want to pass the scheme name as the parameter to the procedure and get the .dmp and .log files with the schema name included.
    CREATE OR REPLACE PROCEDURE export
    IS
    h1 number;
    begin
    h1 := dbms_datapump.open (operation => 'EXPORT', job_mode => 'SCHEMA', job_name => 'export1', version => 'COMPATIBLE');
    dbms_datapump.set_parallel(handle => h1, degree => 1);
    dbms_datapump.add_file(handle => h1, filename => 'EXPDAT.LOG', directory => 'DATA_PUMP_DIR', filetype => 3);
    dbms_datapump.set_parameter(handle => h1, name => 'KEEP_MASTER', value => 0);
    dbms_datapump.metadata_filter(handle => h1, name => 'SCHEMA_EXPR', value => 'IN(''CHECKOUT'')');
    dbms_datapump.set_parameter(handle => h1, name => 'ESTIMATE', value => 'BLOCKS');
    dbms_datapump.add_file(handle => h1, filename => 'EXPDAT%U' || to_char(sysdate,'dd-mm-yyyy') || '.DMP', directory => 'DATA_PUMP_DIR', filetype => 1);
    dbms_datapump.set_parameter(handle => h1, name => 'INCLUDE_METADATA', value => 1);
    dbms_datapump.set_parameter(handle => h1, name => 'DATA_ACCESS_METHOD', value => 'AUTOMATIC');
    dbms_datapump.start_job(handle => h1, skip_current => 0, abort_step => 0);
    dbms_datapump.detach (handle => h1);
    exception
    when others then
    raise_application_error(-20001,'An error was encountered - '||SQLCODE||' -ERROR- '||SQLERRM);
    end;
    Thank you in advanced
    Sri

    user12062360 wrote:
    Hi,
    I am using the pl/sql block to export schema using dbms_datapump package,Now I want to pass the scheme name as the parameter to the procedure and get the .dmp and .log files with the schema name included.
    OK, please proceed to do so
    >
    CREATE OR REPLACE PROCEDURE export
    IS
    h1 number;
    begin
    h1 := dbms_datapump.open (operation => 'EXPORT', job_mode => 'SCHEMA', job_name => 'export1', version => 'COMPATIBLE');
    dbms_datapump.set_parallel(handle => h1, degree => 1);
    dbms_datapump.add_file(handle => h1, filename => 'EXPDAT.LOG', directory => 'DATA_PUMP_DIR', filetype => 3);
    dbms_datapump.set_parameter(handle => h1, name => 'KEEP_MASTER', value => 0);
    dbms_datapump.metadata_filter(handle => h1, name => 'SCHEMA_EXPR', value => 'IN(''CHECKOUT'')');
    dbms_datapump.set_parameter(handle => h1, name => 'ESTIMATE', value => 'BLOCKS');
    dbms_datapump.add_file(handle => h1, filename => 'EXPDAT%U' || to_char(sysdate,'dd-mm-yyyy') || '.DMP', directory => 'DATA_PUMP_DIR', filetype => 1);
    dbms_datapump.set_parameter(handle => h1, name => 'INCLUDE_METADATA', value => 1);
    dbms_datapump.set_parameter(handle => h1, name => 'DATA_ACCESS_METHOD', value => 'AUTOMATIC');
    dbms_datapump.start_job(handle => h1, skip_current => 0, abort_step => 0);
    dbms_datapump.detach (handle => h1);
    exception
    when others then
    raise_application_error(-20001,'An error was encountered - '||SQLCODE||' -ERROR- '||SQLERRM);
    end;
    EXCEPTION handler is a bug waiting to happen.
    eliminate it entirely

  • Function not found when package name exists with same name as schema name

    Hi all, any help would be appreciated :)
    I found an issue with pl/sql resolving a functions location when the db has a package name with the same as the db schema name.
    My example:
    -- arbitrary test function, not in any package
    create or replace FUNCTION testFunc
         inTest     IN VARCHAR2
    RETURN VARCHAR2
    AS
    BEGIN
    RETURN 'a';
    END;
    -- There is a package called "FM" with functions that are not referenced or used in this example and the db schema is "FM".
    -- The following PL/SQL fails with the message: "ORA-00904: "FM"."TESTFUNC": invalid identifier"
    select cursor (select testFunc('a') from dual) from dual;
    -- The following PL/SQL works:
    select * from (select testFunc('a') from dual);
    As mentioned the function testFunc is NOT in the FM package. This issue does not happen when I remove the FM package. So it seems like there is an issue with cursors calling functions when there exists any package with the same name as the db schema.
    Can anyone tell me why this happens and also what I can add to force the function that is not in any package to be referenced (without Oracle trying to look in the FM package)?
    DB: Oracle 11.2.0.2
    thanks!
    Paul

    Hi Paul,
    In general I would not advice to have schema and objects with the same name.
    Here is what documentation is saying here: How Name Resolution Differs in PL/SQL and SQL
    PL/SQL uses the same name-resolution rules as SQL when the PL/SQL compiler processes a SQL statement, such as a DML statement. For example, for a name such as HR.JOBS, SQL matches objects in the HR schema first, then packages, types, tables, and views in the current schema.
    PL/SQL uses a different order to resolve names in PL/SQL statements such as assignments and subprogram calls. In the case of a name HR.JOBS, PL/SQL searches first for packages, types, tables, and views named HR in the current schema, then for objects in the HR schema.As you can see above when using PL/SQL for your case Oracle searches first for packages, types, tables, and views named FM in the current schema, then for objects in the FM schema.
    And because a package FM is found it is raising an error due to the fact that the procedure could not be found in that package.
    I hope this clarify.
    Regards.
    Al

  • Need to know schema name and table name associated with a column-URGENT

    Hi folks,
    I need to know the schema name and the table name associated with a column. Though jdbc has the api to getTableName and getSchemaName, some database vendor like oracle does return empty upon call of mentioned methods. I found that oracle driver does not support that ……
    Can any one give me the solution? It is urgent. Or do you suggest any third pary jdbc driver which can provide those?
    Thanks
    Angelina

    Angelina,
    Your question has been discussed several times previously in this forum. Search this forum's archives for "getTableName". Oracle JDBC driver does not implement this (because "it is not feasible" -- according to Oracle).
    First of all, I would suggest that you could probably change your application's logic so that you would not need this functionality (but I guess that is not feasible either, right :-)
    Alternatively, you could try querying the Oracle database data dictionary.
    Good Luck,
    Avi.

  • Default schema names in multi-tier landscape

    Hi folks,
    We have an interesting problem due to having different named default schemas in each of our 3 hana systems.  For example lets say these are our default schemas in our development, staging, and production HANA systems;
    DEV_SCHEMA
    QA_SCHEMA
    PROD_SCHEMA
    Each of these replicating data from their corresponding SAP source systems.
    Now, we have a view that is developed on DEV hana box and uses DEV_SCHEMA.  When this view content is imported to QA or PROD we handle easily with schema mapping.  All is well and good although we are not really a fan of this different naming and us developers did not choose this naming (self defense plea here for us brilliant developers whom never make such mistakes... PS: HI LARS! - Go Germany!)
    Now we are setting up a connection from BW into HANA using system connection and inside this is a parameter called 'db user'.  Although it's called db user it's actually looking for a SCHEMA name.  If BW DEV is querying from HANA DEV this schema name would be DEV_SCHEMA.  However if BW_QA is querying from HANA_QA then the name would need to be QA_SCHEMA but in our BW landscape we are locked in QA and PROD and normally can not and/or do not want to edit objects in non-native systems.  Ideally what we need is our default schemas in HANA to have the same exact name throughout the HANA landscape.
    All this said, I can see that it would be great to re-name our entire HANA landscape however that would be a HUGE monumental undertaking as all systems would need to be re-replicated again (at least I think).
    Just curious if anybody else has named their schemas differently on each tier?  What are most people doing?  Naming the default schemas the same consistently or are you using schema mapping?
    Thanks,
    -Patrick

    Hi Luke,
    I am new to the project and there seems to be no original version.  At some point a bunch of the destination field names were changed on the admin console and errors resulted from it both due to mismatched joins and the use of two word field names.  I have documentation of the names for the set of tables in the function area but am having trouble with how everything matches up in the bottom half..  I'll keep working on it
    Z

  • Change schema name without doing export and import

    Is there a way of changing the name of a database schema without having to create a new user and exportng objects from the old schema into the new schema?
    Are there any system tables that can be changed to modify schema name without creating a new schema?

    SQL> select user#,name from user$ where user#=55;
    USER# NAME
    55 HR
    SQL> desc hr.employees
    Name Null? Type
    ----------------------------------------- -------- ---------------------------- EMPLOYEE_ID NOT NULL NUMBER(6)
    FIRST_NAME VARCHAR2(20)
    LAST_NAME NOT NULL VARCHAR2(25)
    EMAIL NOT NULL VARCHAR2(25)
    PHONE_NUMBER VARCHAR2(20)
    HIRE_DATE NOT NULL DATE
    JOB_ID NOT NULL VARCHAR2(10)
    SALARY NUMBER(8,2)
    COMMISSION_PCT NUMBER(2,2)
    MANAGER_ID NUMBER(6)
    DEPARTMENT_ID NUMBER(4)
    SQL> update user$ set name='RH' where user#=55;
    1 row updated.
    SQL> commit;
    Commit complete.
    SQL> select user#,name from user$ where user#=55;
    USER# NAME
    55 RH
    SQL> desc rh.employees
    ERROR:
    ORA-04043: object rh.employees does not exist
    SQL> desc hr.employees
    Name Null? Type
    ----------------------------------------- -------- ---------------------------- EMPLOYEE_ID NOT NULL NUMBER(6)
    FIRST_NAME VARCHAR2(20)
    LAST_NAME NOT NULL VARCHAR2(25)
    EMAIL NOT NULL VARCHAR2(25)
    PHONE_NUMBER VARCHAR2(20)
    HIRE_DATE NOT NULL DATE
    JOB_ID NOT NULL VARCHAR2(10)
    SALARY NUMBER(8,2)
    COMMISSION_PCT NUMBER(2,2)
    MANAGER_ID NUMBER(6)
    DEPARTMENT_ID NUMBER(4)
    conclusion:
    changing the name in user$ does not change then schema name

  • How to know database name and schema name

    Hi ,
    Once after logging in the database,how is it possible to know the current database and schema which we r using?Is there any system table where we can get the database names and schema names?
    please help me out.itz urgent.
    Regards,
    Sravan

    Probably not.
    If the database name is the name of the current database, it would be essentially redundant. If the database name is the name of some other database, in order to get the names of all the tables in the specified schema, you could create a database link to the remote system (which assumes you have a login and password to the remote database with appropriate privileges, that the database server's tnsnames.ora file has an entry for the remote database, etc) and query the remote data dictionary tables. Even if you could do that, however, you could not dynamically create triggers on the remote database since DDL over a database link.
    In theory, you could also load an appropriate JDBC driver into the database and write a Java stored procedure that would connect to the remote database (again, with an appropriate user name & password, host name, and port number) and issue DDL against that remote database. I have a hard time believing, however, that this would be a particularly beneficial approach. It would be easier just to put the appropriate code into each database that needs triggers generated or to have a separate Java application that generates triggers for a number of different databases.
    Justin

  • Transform the schema name with APPLY_DML_HANDELER

    Hello:
    I have referred following notes, but I was trying to transform the schema name from schema_name_A to Schema_name_B in APPLY_DML_HANDELER, which does not seem like working.
    264035.1 How To Transform Schema Name In Streams
    309575.1 How To Transform A Schema Name In Streams for DML and Simple DDL Operations
    313766.1 Streams Heterogeneous Apply To SQL*Server
    Please confirm, if what I am trying to do it doable or not? Below is handler code.
    CREATE OR REPLACE PROCEDURE APPLY_DML_HANDLER(in_any_data IN SYS.ANYDATA) IS
    v_in_lcr SYS.lcr$_ROW_RECORD;
    v_in_lcr_status PLS_INTEGER;
    BEGIN
    v_in_lcr_status := in_any_data.GETOBJECT(v_in_lcr);
    v_in_lcr.set_object_owner('CSRREP');
    v_in_lcr.EXECUTE(TRUE);
    END;
    All gets compiled good and runs, but dba_apply_errors shows Ora-23416.
    Thanks,
    Rohit

    Hi Rohit,
    ORA-23416: table "string"."string" does not contain a primary key constraint
    Cause: The master table does not constaint a primary key constraint or the primary key constraint has been disabled.
    Action: Create a primary key constraint on the master table or enable the existing constraint.
    It is doable. I've done already done that in 9i. Be conscious that that kind of handler is executed for each LCR. So, that's highly paid.
    I think there are new features to do it in a better way in 10g but I haven't tried it yet.
    I had a bug somewhat similar that I fixed doing the following:
    dbms_rule_adm.grant_object_privilege(
    privilege => SYS.DBMS_RULE_ADM.EXECUTE_ON_RULE_SET,
    object_name => v_ruleset_name,
    grantee => v_new_owner
    );

  • Access other schema's table without specify the schema name

    Hi, need ur help again,
    I would like to access other schema's table without specify the schema name. for example,
    select * from hr.jobs;
    What priviledges i need if i want to select the data in this way:
    select * from jobs;
    Thanks!

    Public synonyms have their place, but are not generally a good idea as they will cause conflicts with other schemas and applications. Another think that you can do is issue the
    ALTER SESSION set CURRENT_SCHEMA = schema;
    The CURRENT_SCHEMA (8i and above) parameter changes the current schema of the session to the specified schema. Subsequent nqualified references to schema objects during the session will resolve to objects in the specified schema. The setting persists for the duration of the session or until you issue another ALTER SESSION SET CURRENT_SCHEMA statement. CURRENT_SCHEMA is a session parameter only, not an initialization parameter.
    This setting offers a convenient way to perform operations on objects in a schema other than that of the current user without having to qualify the objects with the schema name. This setting changes the current schema, but it does not change the session user or the current user, nor does it give you any additional system or object privileges for the session.

Maybe you are looking for

  • ABAP Sample code for HR_MAINTAIN_MASTERDATA

    Hi folks, I want to delimit a record in the HR master Table wi the help of Function Module HR_MAINTAIN_MASTERDATA, but its not updating HR master table correctly so please send me some sample code for that function module. usefull points will rewarde

  • Can't turn off password protected sharing - Windows 7

    When I turn off password protected sharing in the network and sharing center's advanced settings, I save settings but when I go back in, it's turned on again.  Turning it off doesn't stick. This is what seess to be forcing a password and prevents me

  • Migrating to Windows 7

    Hello all, I will soon be migrating to Windows 7. I was wondering if you have any tips or tricks I need to know before hand to avoid any snags. I have backed everything up to external media. 1. Do I need to de-authorize the system before doing the fr

  • Virtual Machine Issue

    Good Morning all, I am currently in the middle of setting up my personal home domain. I currently have the following setup: - Server running 2012 R2 and this is my Domain Controller - My DNS and DHCP is currently on my Sky broadband router (this is j

  • How do I move docs from an app to my mac

    I have the pages app that I use for a mileage log. For the life of me I can't get the spreadsheet from my iphone to my mac to open in numbers or excel. Can you give me a path where to find it or how to email it to my mac from my iphone 4? Cheers.