Using Synonyms in DI

Post Author: HintonBR
CA Forum: Data Integration
Does anyone know of a good workaround to be able to use Oracle synonyms as data sources?  I know that if the synonym and the underlying object (table or view) have the same name I can rename the owner of the object (if say the object was in one schema and the synonym was defined in the schema I was connecting with) and that will fact the system into accepting the synonym. I imagine that only works because DI was able to get the metadata first from the real object.  In fact you can't reimport objects that have been renamed to use the synonym because it can't find the metadata now.  Not to mention this workaround doesn't work for any object where the synonym and the underlying object don't have the same name. Synonyms are important to us to provide an abstraction between our ETL and the upstream data sources so that we aren't dependent on object names, schemas, etc... so has a fairly serious impact to our architecture not to be able to use them.  Anyone have any ideas? Thanks,Bryan

Post Author: wdaehn
CA Forum: Data Integration
I would have used database views as the abstraction layer rather than synonyms. The advantage would be that for views you can see the dependencies, for synonyms not that easy as they are just textual replacements inside Oracle.

Similar Messages

  • Migrating from SQL to ORACLE 11g : naming length Issue using synonyms...

    Hi,
    In sql I have maximum length of objects is 98 char
    now i m migrating it into oracle , i m using synonyms for it ..
    it is showing synonyms created ...
    but it gets converted into encrypted forms,
    due to this i m not able to use actual synonyms that i have created
    so tell me how can i create synonyms of more than 30 characters
    If this is not possible , then wht else solution by which i can solve ma problem.
    please give me solution asap!!!!!!!

    Create synonym name with more than 30 character.

  • Unable to create dimensions in schemas that use synonyms

    I have three schemas (s1, s2 and s3) that use synonyms to reference different tables. S1 and S2 have all tables, equally distributed in their schema. S3 is an end user who has just synonyms.
    I tried creating dimensions in any of them, table or view not found error is encountered.
    I created required tables in my schema (user: meka) and I was successfully able to create dimensions. The following command worked in "meka", not any of the three schemas (s1, s2 and s3).
    CREATE DIMENSION country
         level city_id is lu_city.CITY_ID
              level state_id is lu_state.STATE_ID
              level country_id is lu_country.COUNTRY_ID
    hierarchy country_hier (
    city_id CHILD OF
    state_id CHILD OF
    country_id
    JOIN KEY lu_city.STATE_ID references state_id
    JOIN KEY lu_state.COUNTRY_ID references country_id
    ATTRIBUTE city_id DETERMINES (lu_city.CITY_NAME)
    ATTRIBUTE state_id DETERMINES (lu_state.STATE_NAME)
    I tried a few combinations, including specifying fully qualified table names (s1.lu_city.city_id, etc); created views at user S3 tried the same. All of them were unsuccessful. I am using Oracle 11g R2, here is screen shot:
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
    Data Mining and Real Application Testing options
    Q: How can I create a dimension in a schema where tables do not exist. They exist in another schema.
    Edited by: user8967661 on Jan 12, 2010 2:12 PM

    This is resolved.

  • Using synonyms in name search

    Hello,
    i'm trying to use synonyms in an oracle namesearch. I setup a name seqarch like in the second example described in the oracle text application developer's guide at http://download.oracle.com/docs/cd/E18283_01/text.112/e16594/search.htm
    Now the name i'm searching for might contain a '&', for example 'B & V'.
    I'd like to find this text when i enter 'B&V', B & V' or even 'B and V'.
    I found a thread about setting up a thesaurus with synonyms for '&' and 'and' at "and" and Ampersand or special characters
    Now i wonder how to combine this.
    Thanks for help in advance,
    Dirk

    In the following example, I started with the code from the second example in the link provided. I added one row of data containing the "B & V" for testing. I added "&" and "and" to the thesaurus as synonyms. I added a function to format the search string by adding an extra space around "&", removing duplicate spaces, adding "{" and "}" around each reserved keyword, trimming the result, and returning it. I then modified the query to use the function. That seems to be all that is necessary. It does not seem to be necessary to change the stoplist or printjoins, due to the way the rest of the code is written. I added comment lines to show where I made changes. I did not change the procedure, but you may want to modify it as the usage of regexp seems to be only outputting the last four digits of the phone.
    SCOTT@orcl_11gR2> create table emp (
      2        first_name    varchar2(30),
      3        middle_name   varchar2(30),
      4        last_name     varchar2(30),
      5        email            varchar2(30),
      6        phone            varchar2(30));
    Table created.
    SCOTT@orcl_11gR2> insert into emp values
      2  ('John', 'Black', 'Smith', '[email protected]', '123-456-7890');
    1 row created.
    SCOTT@orcl_11gR2>
    SCOTT@orcl_11gR2> -- added row of data:
    SCOTT@orcl_11gR2> set define off
    SCOTT@orcl_11gR2> insert into emp values
      2  ('Jane', 'Doe', 'word B & V word', '[email protected]', '321-654-0987');
    1 row created.
    SCOTT@orcl_11gR2>
    SCOTT@orcl_11gR2> create or replace procedure empuds_proc
      2       (rid in rowid, tlob in out nocopy clob) is
      3         tag varchar2(30);
      4         phone varchar2(30);
      5  begin
      6    for c1 in (select FIRST_NAME, MIDDLE_NAME, LAST_NAME, EMAIL, PHONE
      7              from emp
      8              where rowid = rid)
      9    loop
    10         tag :='<email>';
    11         dbms_lob.writeappend(tlob, length(tag), tag);
    12         if (c1.EMAIL is not null) then
    13             dbms_lob.writeappend(tlob, length(c1.EMAIL), c1.EMAIL);
    14         end if;
    15         tag :='</email>';
    16         dbms_lob.writeappend(tlob, length(tag), tag);
    17         tag :='<phone>';
    18         dbms_lob.writeappend(tlob, length(tag), tag);
    19         if (c1.PHONE is not null) then
    20           phone := nvl(REGEXP_SUBSTR(c1.PHONE, '\d\d\d\d($|\s)'), ' ');
    21           dbms_lob.writeappend(tlob, length(phone), phone);
    22         end if;
    23         tag :='</phone>';
    24         dbms_lob.writeappend(tlob, length(tag), tag);
    25         tag :='<fullname>';
    26         dbms_lob.writeappend(tlob, length(tag), tag);
    27         if (c1.FIRST_NAME is not null) then
    28           dbms_lob.writeappend(tlob, length(c1.FIRST_NAME), c1.FIRST_NAME);
    29           dbms_lob.writeappend(tlob, length(' '), ' ');
    30         end if;
    31         if (c1.MIDDLE_NAME is not null) then
    32           dbms_lob.writeappend(tlob, length(c1.MIDDLE_NAME), c1.MIDDLE_NAME);
    33           dbms_lob.writeappend(tlob, length(' '), ' ');
    34         end if;
    35         if (c1.LAST_NAME is not null) then
    36           dbms_lob.writeappend(tlob, length(c1.LAST_NAME), c1.LAST_NAME);
    37         end if;
    38         tag :='</fullname>';
    39         dbms_lob.writeappend(tlob, length(tag), tag);
    40       end loop;
    41    end;
    42  /
    Procedure created.
    SCOTT@orcl_11gR2> show errors
    No errors.
    SCOTT@orcl_11gR2> begin
      2    ctx_ddl.create_preference('empuds', 'user_datastore');
      3    ctx_ddl.set_attribute('empuds', 'procedure', 'empuds_proc');
      4    ctx_ddl.set_attribute('empuds', 'output_type', 'CLOB');
      5  end;
      6  /
    PL/SQL procedure successfully completed.
    SCOTT@orcl_11gR2> begin
      2    ctx_ddl.create_section_group('namegroup', 'BASIC_SECTION_GROUP');
      3    ctx_ddl.add_ndata_section('namegroup', 'fullname', 'fullname');
      4    ctx_ddl.add_ndata_section('namegroup', 'phone', 'phone');
      5    ctx_ddl.add_ndata_section('namegroup', 'email', 'email');
      6  end;
      7  /
    PL/SQL procedure successfully completed.
    SCOTT@orcl_11gR2> begin
      2    ctx_thes.create_thesaurus ('nicknames');
      3    ctx_thes.create_relation ('nicknames', 'John', 'syn', 'Jon');
      4  end;
      5  /
    PL/SQL procedure successfully completed.
    SCOTT@orcl_11gR2>
    SCOTT@orcl_11gR2> -- added synonym to thesaurus:
    SCOTT@orcl_11gR2> begin
      2    ctx_thes.create_relation ('nicknames', '&', 'syn', 'and');
      3  end;
      4  /
    PL/SQL procedure successfully completed.
    SCOTT@orcl_11gR2>
    SCOTT@orcl_11gR2> begin
      2       ctx_ddl.create_preference('NDATA_WL', 'BASIC_WORDLIST');
      3       ctx_ddl.set_attribute('NDATA_WL', 'NDATA_ALTERNATE_SPELLING', 'FALSE');
      4       ctx_ddl.set_attribute('NDATA_WL', 'NDATA_BASE_LETTER', 'TRUE');
      5       ctx_ddl.set_attribute('NDATA_WL', 'NDATA_THESAURUS', 'NICKNAMES');
      6       ctx_ddl.set_attribute('NDATA_WL', 'NDATA_JOIN_PARTICLES',
      7        'de:di:la:da:el:del:qi:abd:los:la:dos:do:an:li:yi:yu:van:jon:un:sai:ben:al');
      8  end;
      9  /
    PL/SQL procedure successfully completed.
    SCOTT@orcl_11gR2> create index name_idx on emp (first_name)
      2  indextype is ctxsys.context
      3  parameters
      4    ('datastore  empuds
      5        section    group namegroup
      6        wordlist   ndata_wl');
    Index created.
    SCOTT@orcl_11gR2>
    SCOTT@orcl_11gR2> -- added function to format search string:
    SCOTT@orcl_11gR2> create or replace function format_string
      2    (p_string in varchar2)
      3    return varchar2
      4  as
      5    v_string     varchar2 (32767) := ' ' || p_string || ' ';
      6  begin
      7    -- add extra spaces around ampersand:
      8    v_string := replace (v_string, '&', ' & ');
      9    -- remove duplciate spaces:
    10    while instr (v_string, '  ') > 0
    11    loop
    12        v_string := replace (v_string, '  ', ' ');
    13    end loop;
    14    -- add { and } around each reserved word:
    15    for r in
    16        (select keyword,
    17             ' ' || keyword || ' ' keyword2
    18         from      v$reserved_words)
    19    loop
    20        v_string := replace (upper (v_string), r.keyword2, ' {' || r.keyword || '} ');
    21    end loop;
    22    return ltrim (rtrim (v_string));
    23  end format_string;
    24  /
    Function created.
    SCOTT@orcl_11gR2> show errors
    No errors.
    SCOTT@orcl_11gR2> -- examples of usage of function:
    SCOTT@orcl_11gR2> select format_string ('B & V') from dual;
    FORMAT_STRING('B&V')
    B {&} V
    1 row selected.
    SCOTT@orcl_11gR2> select format_string ('B and V') from dual;
    FORMAT_STRING('BANDV')
    B {AND} V
    1 row selected.
    SCOTT@orcl_11gR2> select format_string ('B&V') from dual;
    FORMAT_STRING('B&V')
    B {&} V
    1 row selected.
    SCOTT@orcl_11gR2>
    SCOTT@orcl_11gR2> -- query modified to apply foramt_string function to :name variable:
    SCOTT@orcl_11gR2> var name varchar2(80);
    SCOTT@orcl_11gR2> exec :name := 'Jon Blacksmith'
    PL/SQL procedure successfully completed.
    SCOTT@orcl_11gR2> column first_name  format a10
    SCOTT@orcl_11gR2> column middle_name format a11
    SCOTT@orcl_11gR2> column last_name   format a9
    SCOTT@orcl_11gR2> column phone          format a12
    SCOTT@orcl_11gR2> column email          format a22
    SCOTT@orcl_11gR2> select first_name, middle_name, last_name, phone, email, scr
      2  from   (select /*+ FIRST_ROWS */
      3                first_name, middle_name, last_name, phone, email, score(1) scr
      4            from   emp
      5            where  contains
      6                  (first_name,
      7                   'ndata (phone,'       || format_string (:name) || ') OR
      8                 ndata (email,'       || format_string (:name) || ') OR
      9                 ndata (fullname,' || format_string (:name) || ')',
    10                   1) > 0
    11            order  by score (1) desc)
    12  where  rownum <= 10;
    FIRST_NAME MIDDLE_NAME LAST_NAME PHONE        EMAIL                         SCR
    John       Black       Smith     123-456-7890 [email protected]         93
    1 row selected.
    SCOTT@orcl_11gR2> -- enter new values for :name and re-run query:
    SCOTT@orcl_11gR2> exec :name := 'B & V'
    PL/SQL procedure successfully completed.
    SCOTT@orcl_11gR2> /
    FIRST_NAME MIDDLE_NAME LAST_NAME PHONE        EMAIL                         SCR
    Jane       Doe         word B &  321-654-0987 [email protected]           61
                           V word
    1 row selected.
    SCOTT@orcl_11gR2> exec :name := 'B and V'
    PL/SQL procedure successfully completed.
    SCOTT@orcl_11gR2> /
    FIRST_NAME MIDDLE_NAME LAST_NAME PHONE        EMAIL                         SCR
    Jane       Doe         word B &  321-654-0987 [email protected]           80
                           V word
    1 row selected.
    SCOTT@orcl_11gR2> exec :name := 'B&V'
    PL/SQL procedure successfully completed.
    SCOTT@orcl_11gR2> /
    FIRST_NAME MIDDLE_NAME LAST_NAME PHONE        EMAIL                         SCR
    Jane       Doe         word B &  321-654-0987 [email protected]           61
                           V word
    1 row selected.
    SCOTT@orcl_11gR2> exec :name := 'B something V'
    PL/SQL procedure successfully completed.
    SCOTT@orcl_11gR2> /
    no rows selected
    SCOTT@orcl_11gR2>
    SCOTT@orcl_11gR2> -- cleanup:
    SCOTT@orcl_11gR2> drop function format_string;
    Function dropped.
    SCOTT@orcl_11gR2> exec ctx_ddl.drop_preference('ndata_wl');
    PL/SQL procedure successfully completed.
    SCOTT@orcl_11gR2> exec ctx_thes.drop_thesaurus ('nicknames');
    PL/SQL procedure successfully completed.
    SCOTT@orcl_11gR2> exec ctx_ddl.drop_section_group('namegroup');
    PL/SQL procedure successfully completed.
    SCOTT@orcl_11gR2> exec ctx_ddl.drop_preference('empuds');
    PL/SQL procedure successfully completed.
    SCOTT@orcl_11gR2> drop procedure empuds_proc;
    Procedure dropped.
    SCOTT@orcl_11gR2> drop table emp;
    Table dropped.
    SCOTT@orcl_11gR2>

  • Oracle Best Practices Discussion Pros/Cons of using Synonyms

    Please share your experience given the Pros/Cons of Developing Enterprise Database Applications using public and private Synonyms.
    My recommendation to developers on my team is to avoid using Public Synonyms in their code and instead Fully Qualify the database object by schema owner.
    Pros: When you drop a schema, you do not drop the public synonyms that they created. Therefore if you have to use synonym, make it private and not public.
    Please share your experience!

    Fahd Mirza wrote:
    Well I rarely use public synonyms and that only case of db links. For example, I have a scenario, in which I have hooked up a MS SQLSERVER database with Oracle database through Heterogenous Services. I am accessing the SQLSERVER table in real time, through HS, in Oracle in real time, and then from this Oracle environment I have created db links to many other interested databases. In those interested database, I have created public synonyms over those dblinks.
    It's so transparent for the interested databases. But I have documented this whole configuration in great detail for any upcoming DBA, just in case I leave, or expire or anything. Sounds interesting - this might be worth 'cleaning' and publishing to OTN's Articles. If you are interested in pursuing this, you might want to contact Justin (Community Forum) or myself ([email protected])

  • How to use synonyms on multiple word search ?

    We use context with multiword search like this one :
    select * from my_table where contains(my_text,'the small building near the river')>0
    Now we have specific synonyms in a thesaurus. How do we write the contains clause ?
    contains(my_text,'syn(the,thes) and syn(small,thes) and syn(building,thes) and syn(near,thes) and syn (river,thes)')>0 does not fin the synonym for "small building"="house" for instance
    contains(my_text,'syn(the small building near the river,thes)')>0 does only for synonyms on the full sentence.
    More generally is there an Oracle Document which describes how to use SYN, FUZZY and combine them, since
    the reference documentation gives only limited information on this ?
    Have a nice day

    The thesaurus functionality is not currently built for stuff like this.
    if you want to combine fuzzy and thesaurus, I am assuming you want to do fuzzy first, to correct any misspelling,
    then thesaurus on the "corrected" spellings? You'd have to do something like:
    1. take the query and run ctx_query.explain to break it down and do the fuzzy expansion
    2. work through the fuzzy expansion and build a new query string by sticking SYN() around each
    expanded word
    As for thesaurus expansion and phrase, these are not compatible. Thesaurus expansions use "," and "|", and so
    you cannot have a phrase of thesaurus expansions.
    I see what you're getting at, but you would need sub phrase detection, phrase equivalence, etc., which is
    currently beyond the thesaurus function capability.
    You can use themes (ABOUT) on phrases, and it will do something like what you are describing. You might want
    to check that out.

  • Can't access User type using Synonyms/Grant

    Hi,
    We have a Stored Proc and it accepts a usertype. We are sending info from Java using JDBC and trying to get the results back. If I use the owner of the schema for connection it works fine. If I use a different schema user which has synonyms and grant access to the storeproc and userobject program does not work. Here is the stripped down code. If any one faced this problem please respond to [email protected].
    In the program I used QStore_user as user. QStore_user has Synonyms for USERTABLE, GET_NEXT_ID. Owner of these objects is QSTORE_OWNER. QSTORE_OWNER provided Grant 'Execute' to both of these for QSTORE_USER. If I change the java code to use QSTORE_OWNER it works fine.
    Java Sample Program
    ====================
    * This sample can be used to check the JDBC installation.
    * Just run it and provide the connect information.
    // You need to import the java.sql package to use JDBC
    import java.sql.*;
    import oracle.sql.*;
    import oracle.jdbc.driver.*;
    import oracle.jdbc.dbaccess.*;
    // We import java.io to be able to read from the command line
    import java.io.*;
    class JdbcArrayCheckup
    public static void main(String args[])
    throws SQLException, IOException
    // Load the Oracle JDBC driver
    DriverManager.registerDriver(new oracle.jdbc.OracleDriver());
    System.out.print("Connecting to the database...");
    System.out.flush();
    System.out.println("Connecting...");
    Connection conn = DriverManager.getConnection
    ("jdbc:oracle:thin:@DKING-W2K:1521:WASDB", "qstore_user", "qstore_user");
    System.out.println("connected.");
    Object[] elements = {"Sasi","Mahesh","Deepak"};
    String currentName = "Sasi";
    ArrayDescriptor arrayDesc = ArrayDescriptor.createDescriptor("USERTABLE", conn);
         System.out.println("Got Array Descriptor");
         oracle.sql.ARRAY inp_array = new oracle.sql.ARRAY(arrayDesc,conn,elements);
         System.out.println("inp_array = " + inp_array);
    // Create a Callable statement
         CallableStatement callStmt = conn.prepareCall("{? = call GET_NEXT_ID(?,?)}");
         System.out.println("created callable statement");
         // Call setArray to set input array
         callStmt.setArray(2,inp_array);
         System.out.println("set Array done for User ID array");
         callStmt.setString(3,currentName);
         System.out.println("set String done for Policy ID");
         callStmt.registerOutParameter(1,Types.VARCHAR);
         System.out.println("registered out Parameters");
         // Execute the query
         ResultSet rset = callStmt.executeQuery();
         System.out.println("executed query");
         String userID = callStmt.getString(1);
         System.out.println("after getting next assigned ID = " + userID);
         // close the result set, the statement and connect
    rset.close();
    callStmt.close();
    conn.close();
    System.out.println("Your JDBC installation is correct.");
    Database Temp Function
    ======================
    function GET_NEXT_ID (input_userid_list USERTABLE,
         input_policy_id varchar2
    return VARCHAR2
         is
         counter NUMBER;
         return_user_id varchar2(30);
         /* UserTable is defined as follows -
         create or replace type usertable as table of varchar2(30);
         BEGIN
              for counter in 1..input_userid_list.COUNT LOOP
                   dbms_output.put_line('tempuser id = ' || input_userid_list(counter) );
              end loop;
              dbms_output.put_line('out of the loop');
              return_user_id := 'Mahesh';
              return return_user_id;
    END GET_NEXT_ID;
    DataType
    ===========
    create or replace type usertable as table of varchar2(30)
    Error
    =======
    Connecting to the database...Connecting...
    connected.
    Exception in thread "main" java.sql.SQLException: ORA-21700: object does not exi
    st or is marked for delete
    ORA-06512: at "SYS.DBMS_PICKLER", line 16
    ORA-06512: at "SYS.DBMS_PICKLER", line 52
    ORA-06512: at line 1
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:168)
    at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:208)
    at oracle.jdbc.ttc7.Oall7.receive(Oall7.java, Compiled Code)
    at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java, Compiled Cod
    e)
    at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:822
    at oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.ja
    va, Compiled Code)
    at oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.jav
    a:1371)
    at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStateme
    nt.java:1900)
    at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePrepar
    edStatement.java:363)
    at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStat
    ement.java:407)
    at oracle.jdbc.oracore.OracleTypeADT.initMetadata(OracleTypeADT.java:420
    at oracle.jdbc.oracore.OracleTypeADT.init(OracleTypeADT.java:343)
    at oracle.sql.ArrayDescriptor.initPickler(ArrayDescriptor.java:1002)
    at oracle.sql.ArrayDescriptor.<init>(ArrayDescriptor.java:132)
    at oracle.sql.ArrayDescriptor.createDescriptor(ArrayDescriptor.java:97)
    at JdbcArrayCheckup.main(JdbcArrayCheckup.java:36)
    press any key to exit...
    If you do not want this console to remain after the VM exits,
    clear the "Keep Executed App Console" setting in your Visual Cafe
    environment options
    Other INFo
    ===========
    Running select * from all_synonyms where table_owner = 'QSTORE_OWNER' under QSTORE_USER results in
    QSTORE_USER     USERTABLE     QSTORE_OWNER     USERTABLE     
    QSTORE_USER     GET_NEXT_ID     QSTORE_OWNER     GET_NEXT_ID     
    select * from all_tab_privs where table_schema = 'QSTORE_OWNER' under QSTORE_OWNER results in
    QSTORE_OWNER     QSTORE_USER     QSTORE_OWNER     GET_NEXT_ID     EXECUTE     NO
    QSTORE_OWNER     QSTORE_USER     QSTORE_OWNER     USERTABLE     EXECUTE     NO

    Might be possible that the usernmae & password you are using is not working on the route ... make sure that you are using correct username & password .... if not then reset the router so that the password also gets resetted & you can use Admin password without any username ...
    Once resetted you need to reconfigure the router ... .& open the port 8080 for remote access ....

  • Automatic Row Processing (DML) using synonym name instead of table

    I want my APEX form to select info using the table name but perform all the DML (add, change, delete) using the synonym name. I created the form using the wizard and went into the "Process Row of xxx" process that was created. I tried changing the table name to synonym name under the 'Source: Automatic Row Processing (DML)' section, but it still uses the table name. Is this possible or do I need to manually create processes using the synonym names

    Hi,
    when I change the Table Name property in the "Automatic Row Processing (DML)" process to a non existing table it raises an error when I run the page and try to save something. So it's actually using the value.
    Does the synonym point to the same table or a different table? What is the intention behind selecting from the table but updating through the synonym?
    Patrick
    My APEX Blog: http://www.inside-oracle-apex.com/
    The APEX Builder Plugin: http://builderplugin.oracleapex.info/
    The ApexLib Framework: http://apexlib.sourceforge.net/

  • Search using synonym of a keyword

    Lightroom 3.6 and 4: Is it possible to search by synonym of a keyword? It was possible in LR2 (if I remember it correctly) and after LR3 the feature has been gone and looks like it's still not possible. I have huge controlled vocabulary keyword database with synonyms and translations for stock usage and can’t search using synonims. And this is so frustrating!

    Actually I don't even tried to search for synonyms in smart collections. And if my smart collection search for a keyword I frequently know main keyword for photos I want to appear.
    I need a search for synonyms possibility in Filter Keywords input line. When I assign keywords I'am not always remember main keyword, sometimes it's latin or russian or english synonym.
    But I agree the Keyword List filter should reveal synonyms.
    If there will be just a main keyword for typed synonym it will be sufficient (it worked this way in LR2).

  • Can I use Synonyms Name with Dot?

    I want to try thing like this:
    I have set default schema for user 'AAAUser' as 'AAA' and 'BBBUser' as 'BBB'
    and
    create synonyms called 'DB_1.AAA.table_1' which link to 'DB_AAA..table_1'
    and 'DB_1.BBB.table_1' which link to 'DB_BBB..table_1'.
    So if I use AAAUser login to DB_1 and execute SQL:
    Select * from DB_1..table_1
    since the default schema of AAAUser is AAA, so the table is changed from DB_1..table_1 to DB_1.AAA.table_1
    and there is synonym called DB_1.AAA.table_1, so it will link to DB_AAA..table_1.
    And the same, if i use BBBUser login to DB_1 and call DB_1..table_1, will finally reach DB_BBB..table_1.
    However, so far, it doesn't really work! I faced 2 issues:
    1. If there is a table with the same name called dbo.table_1 in DB_1, even the default schema is AAA, the sql will go DB_1.dbo.table_1 directly! (I have already proved that if there is no same table name, the default schema AAA is used!)
    2. I have tested the synonym:
    select * from DB_1.AAA.table_1;
    It doesn't work! but if i run:
    select * from [DB_1.AAA.table_1];
    It works!!
    Why it that? Does it mean that My design above will never work?
    Thanks!
    Cliff

    I am not able to understand what you are trying to achieve, but I think the root of your confusion is captured here:
    select * from DB_1.AAA.table_1;
    It doesn't work! but if i run:
    select * from [DB_1.AAA.table_1];
    These two SELECT are very different. The first SELECT accesses the object table_1 in the schema AAA in database DB_1. If table_1 is a synonym that may lead you to a different table.
    The second SELECT accesses the object DB_1.AAA.table_1 in your default schema in the current database. There is no connection the database DB_1 or the schema AAA in that database here. The dots are just characters in the object name just like the D, B, underscore
    and so on.
    And specifically, the first SELECT cannot lead you to the object in the second SELECT, unless table_1 is a synonym with the value [DB_1.AAA.table_1].
    Erland Sommarskog, SQL Server MVP, [email protected]

  • Form creation using Synonym

    Hi,
    Is there any way to create a Form using a Synonym?
    Mohan

    You could create a view as a select * from it like this
    CREATE OR REPLACE PUBLIC SYNONYM emp_sym FOR emp;
    CREATE OR REPLACE FORCE VIEW emp_vw AS
    (SELECT *
    FROM emp_sym);
    -- then create your form on emp_vwCheers
    Ben

  • Using Synonyms With CATSEARCH

    Is it possible to search via synonyms when using the CATSEARCH function? If so, how is this done?

    Example:
    SCOTT@orcl_11g> CREATE TABLE test_tab
      2    (test_col  VARCHAR2 (30))
      3  /
    Table created.
    SCOTT@orcl_11g> INSERT ALL
      2  INTO test_tab VALUES ('cat')
      3  INTO test_tab VALUES ('dog')
      4  INTO test_tab VALUES ('dogs')
      5  SELECT * FROM DUAL
      6  /
    3 rows created.
    SCOTT@orcl_11g> CREATE INDEX test_idx ON test_tab (test_col)
      2  INDEXTYPE IS CTXSYS.CTXCAT
      3  /
    Index created.
    SCOTT@orcl_11g> SELECT * FROM test_tab
      2  WHERE  CATSEARCH (test_col, CTX_THES.SYN ('dog'), NULL) > 0
      3  /
    TEST_COL
    dog
    dogs
    SCOTT@orcl_11g>

  • The problem of use synonym of a remote table to create folder in BI

    1: i have a table TB1 on DBserver1. and there are foreign key constraint FK1 on TB1(id:PK)->TB2(id:FK).
    2: Now I create a DB link db1.world link to DBserver1 in DBserver2.
    3: Then I create synonym SY1 and SY2 in DBserver2. (synonym SY1 and SY2 link to TB1 and TB2 in DbServer2)
    4: I have a EUL on DBserver2 and this EUL has two folder which created form SY1 and SY2. but the join on the fold can't work. the reason is the foreign key constraint FK1 is unavailable on DBServer2.
    any one can give me a light for this issue.
    Thanks

    I'm not sure you'll get an answer here. You might try one of the more RDBMS-centric forums.
    Jim

  • No Records When Query Using Synonym

    Hello
    I have a view called v_employees in schema scott and select grant is provided to schema tom in same database.
    When I run a sql query from schema scott I could see records as results.
    I have a created a synonym in schema tom
    CREATE SYNONYM EMPLOYEES FOR scott.v_employees.When I run .select * from EMPLOYEES. from schema tom, I cannot see any results.
    What could be the reason for this?

    jeneesh wrote:
    Please post the query of the view..
    select text
    from dba_views
    where view_name = 'V_EMPLOYEES'
    and owner = 'SCOTT';
    This return
    select * from v_dept d, v_emp emp e
    where d.emp_no = e.empnoI have given grant select on all underlying objects to user tom, but not able to see any results.
    Cannot create public synonym for this user.
    Regards

  • Using table synonyms in Spatial 8.1.7 - ORA-13203 error

    I'm using Oracle Spatial 8.1.7, and I'm encountering an "ORA-13203: failed to read USER_SDO_GEOM_METADATA" error when I try to run an SDO_RELATE query on a table that is a synonym of another table.
    The table is called T_TRB1_BIN and the synonym is called S_TRB1_BIN. I can load T_TRB1_BIN just fine.
    My USER_SDO_GEOM_METADATA view has a TABLE_NAME entry for T_TRB1_BIN. I tried changing it to S_TRB1_BIN, but to no avail.
    So, am I correct in assuming that you cannot use synonyms on spatial tables if they are used in spatial queries? If so, does this apply to 9i as well?
    Thank you.

    I'm not 100% positive, but it looks like this does apply to 9i as well (synonym support doesn't work correctly, unless you use a synonym name equal to the table name).
    Also, I believe this support has been added in 10i (but not 100% sure).

Maybe you are looking for

  • Mini DV to Video only shows in black and white

    I bought a mini dv to video from an apple shop so that i could watch films on my tv. I connected it to my tv at home and it worked perfectly, but when i try to connect it to my parents tv it only shows in black and white... both tvs are of roughly th

  • Cost of replacing 20GB ipod classic with 120GB ipod classic in india

    my IPOD classic of 20GB is not functioning and the support center have said that I can go in for a replacement of this device by submission of this one and paying for a 120GB replacement one. Has anyone done the same in India. 

  • Thread problem, need help

    I ran into this problem when I am trying to understand Thread.currentThread(). My programming halts at AsyncReadSocket.run at some point if I do not remove in the main(String[] arg) t.setDaemon(true); Can anybody explain what might be the problem? pu

  • Widget: "screenshot plus", not working in leopard, etc...

    widget: "screenshot plus", not working in leopard. another bug? kids digital camera opens iphoto but doesnt appear on desktop to eject w/out errors. another bug? if i havnt registered leopard yet, can i sell it, cuz i think i might not want it now.

  • XDK Install

    The lib folder's readme file suggests loading the two java archives into scott as an example. In a standard 8.1.7 install these java archives (albeit older versions I think) are owned by SYS. Are you supposed to install the latest release in each sch